tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Fw: Using TCC with dll created by g++ (MINGW)


From: grischka
Subject: Re: [Tinycc-devel] Fw: Using TCC with dll created by g++ (MINGW)
Date: Sun, 19 Feb 2012 10:50:56 +0100
User-agent: Thunderbird 2.0.0.24 (Windows/20100228)

address@hidden 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]