[Top][All Lists]

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

Re: [Tinycc-devel] Odd problem when using variables defined in header fi

From: William Hales
Subject: Re: [Tinycc-devel] Odd problem when using variables defined in header files for a .dll
Date: Wed, 8 Mar 2017 19:14:33 +1100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0 SeaMonkey/2.46

Hello grischka,

Thankyou, but this does not seem to work.  I just tried adding:

    __declspec(dllimport) extern WINDOW *stdscr;

...to the start of my main.c, and it did not change the resulting program behaviour.  (No warnings or errors either, and I'm using -Wall).

[Screenshot. Let's see if the mailing list supports this.]

Regards, Hales

William Hales wrote:

I have been having a problem with tcc when linking my project against a dll.  The dll and my project share variables through a header file.  This works fine with gcc, but when compiled with tcc my program and the dll end up with completely unique copies of the variables in the .h file, rather than sharing them.

tcc requires 'extern' on the application (program) side, for example

    __declspec(dllimport) extern int foo;

-- gr

reply via email to

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