[email protected] wrote:
 Hi, i want TCC to be used with OpenCV
 for scripting purpose with c or scripting that can be
 converted to C and compiled by tcc on the fly when the
 scripts are rewitten, but i´m not able to do it. I have
 uploaded the code to http://www.filedropper.com/circle for checking and
 reproducing the file/error. Basically i got a error from the
 c++ that the argument
 of cvGetSize has the wrong type and if ignoring that, i
 receive the notice that cvGetSize has
 a null pointer as argument. cvGetSize is specified as
 "extern C" and the MinGW gcc
 work without problems. Coul you help please, i have included
 all the files on the zip.

This is because tcc hasn't got yet structure passing in registers
which is required on MS-Windows for structures of size 1,2,4 and 8.

Here CVSize.  For demonstration (not as solution) the hack below
allows your code to run:

#ifdef __TINYC__
        long long s = ((long long(*)(IplImage*))cvGetSize)(img);
        IplImage* gray = ((IplImage*(*)(long long, int, int))cvCreateImage)( s, 
8, 1 );
#else
        IplImage* gray = cvCreateImage( cvGetSize(img), 8, 1 );
#endif

--- grischka


_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to