Hi,
I'm sorry for my own stupidity. Both msvc and gcc implicitly generated i386
output, but I'm using x86_64 windows so the TCC_IS_NATIVE flag wasn't defined.
That's why tcc_relocate wasn't exported. Sadly, I discovered this after few
days of digging into the code.
Best wishes,
Antoni Nowinowski
Od: Michael Matz
Wysłano: niedziela, 12 maja, 00:25
Temat: Re: [Tinycc-devel] tcc_relocate is missing in libtcc.dll
Do: tinycc-devel@nongnu.org
Hi,
On Fri, 10 May 2019, Antoni Nowinowski wrote:
> I'm working on small jit project that's already worked with precompiled tcc
> downloaded from bellard.org/tcc/. To be more "professional" I compiled tcc
> from source as described in tcc-win32.txt . Resulting libtcc.dll wasn't
> exporting tcc_relocate (I used both gcc and msvc in both mob and master
> branches).
I can't say much about this as I'm not using Windows, but AFAICS
tcc_relocate isn't defined or declared different from (say)
tcc_compile_string or tcc_add_file, which I assume you're using as well.
So I would be surprised if one is exported but the other isn't. Are you
100% sure the problem is libtcc.dll not exporting a function, and not
something like a missing declaration or the like?
> To my suprise libtcc.dll compiled by tcc contained the missing
> function but it was crashing jit project executable compiled with
> appropriate lib file. Is this expected behaviour?
No.
> If yes, how to achieve effect similar to libtcc_test.c? Finally, why
> libtcc_test.c is gone? Thank you for your patience.
libtcc_test.c is there just fine:
% ls -l tests/libtcc_test.c
-rw-r--r-- 1 matz users 2273 Mär 18 04:20 tests/libtcc_test.c
Ciao,
Michael.
___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel