[SOLVED] C call-in using API
Author: roman.schroeder@team-w.ch (labmouse)
Hi all, I am very new to Uniface. Currently playing around it with Uniface 9.6 win_x86 and and its functionality. Basically, I have a very dummy C executable that should call-in Uniface. Unfortunately, all my experiments are failed. So I hope someone can help me... === MS VS 2015 === #include "stdafx.h" #include <h3gl.h> int main() { printf("Hello world "); unsigned char ver[20], trk[20], pat[20], pla[20], dat[20], opr[20]; int maj, min, mic; uversioninfo(ver, trk, pat, pla, dat, opr, &maj, &min, &mic); printf("version: %d.%d.%d ", maj, min, mic); printf("?: %s ", ver); printf("?: %s ", trk); printf("?: %s ", pat); printf("?: %s ", pla); printf("?: %s ", dat); printf("?: %s ", opr); return (UACT_SUCCESS); } Compiler and Linker go through, but execiting the code I get: "Number 575 is not found in ULIB.DLL"... any idea what is missing? Another example is with GCC #include <stdio.h> #include <stdlib.h> #include <h3gl.h> int main(void) { printf("= Hello World "); unsigned char ver[20], trk[20], pat[20], pla[20], dat[20], opr[20]; int maj, min, mic; uversioninfo(ver, trk, pat, pla, dat, opr, &maj, &min, &mic); printf("version: %d.%d.%d ", maj, min, mic); printf("?: %s ", ver); printf("?: %s ", trk); printf("?: %s ", pat); printf("?: %s ", pla); printf("?: %s ", dat); printf("?: %s ", opr); return (UACT_SUCCESS); } compiler and linked also fine, but when executing: bad exit value... nothing. any help / hints are very welcome! Best, labmouse