tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] undefined reference to tcc_relocate


From: Vladimir Vissoultchev
Subject: Re: [Tinycc-devel] undefined reference to tcc_relocate
Date: Thu, 14 Jul 2016 10:24:22 +0300

Hi,

Are you using MinGW or Cygwin? Here I can compile the sample w/ MinGW just
ok. Final `a.exe` will fail looking for `tcclib.h` -- have to copy it to
`win32\include` to run sample as is.

Probably there is name mangling issues with Cygwin version as `libtcc.dll`
exports are not decorated w/ a leading underscore. Take a look at
`libtcc.def` for what gets exported.

(Note that `pstrcat`, `pstrcpy` and `pstrncpy` should not get exported and
it's a lingering issue w/ win32 build for quite some time now)

cheers,
</wqw>

----
From: Tinycc-devel [mailto:address@hidden
On Behalf Of Joel Bodenmann
Sent: Thursday, July 14, 2016 12:21 AM
To: address@hidden
Subject: [Tinycc-devel] undefined reference to tcc_relocate

Hey guys,

I checked out the latest commit on the mob branch in the git repository
(10th July 2016) and used the win32/build-tcc.bat script to compile TCC on
Windows 10 64-Bit which was successful. I am interested in using libtcc so I
tried to compile the libtcc_test.c example using MinGW (GCC) as the file
win32/tcc-win32.txt explains. However, when compiling I get the following
error message:

$ gcc examples/libtcc_test.c -I libtcc libtcc.dll
/tmp/ccXsnxYD.o:libtcc_test.c:(.text+0x16b): undefined reference to
`tcc_relocate'
/tmp/ccXsnxYD.o:libtcc_test.c:(.text+0x16b): relocation truncated to fit:
R_X86_64_PC32 against undefined symbol `tcc_relocate'
collect2: error: ld returned 1 exit status

I am a bit lost here. Is the implementation of tcc_relocate() somehow
missing in the DLL or am I doing something else wrong? So far I haven't done
anything but following the documentation
I'd appreciate your help a lot!

I am using GCC 5.4.0, the one that comes with Cygwin (64-Bit).


Best regards,
~ Joel

                




reply via email to

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