|Subject:||Re: [Tinycc-devel] Odd problem when using variables defined in header files for a .dll|
|Date:||Thu, 16 Mar 2017 10:43:47 +1100|
|User-agent:||Mozilla/5.0 (X11; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0 SeaMonkey/2.46|
Thankyou for your help Grischka and Steven, I now have things working.
I've had a fiddle with the three magic keywords that I've seen so far:
Attached is a fixed version of my earlier small example
(tccdll_exampleB). Here are the definitions I use in it:
Using dllimport in main.c seems to do absolutely nothing. 'extern' is what fixes the problem on this end.
Using extern in the thedll.c seems to do absolutely nothing (other than make the compiler unhappy if you apply it to int Fred). dllexport is what fixes the problem on this end.
Is this how things are supposed to behave?
You can even run the entire pdcurses + demo directly from source code
I thought I encountered header-file errors when I tried this, I'll have to see how things go again. I was probably using the old/stable version of TCC.
Alternatively you could patch TCC to treat dllimport as extern
Is there any sort of situation where this would cause issues? Given that the dllimport keyword does not actually seem to do anything at the moment, I'm not sure.
Otherwise: I'll have a go at registering and patching.
William Hales wrote:
Description: Zip archive
|[Prev in Thread]||Current Thread||[Next in Thread]|