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: Joel Bodenmann
Subject: Re: [Tinycc-devel] undefined reference to tcc_relocate
Date: Thu, 14 Jul 2016 19:17:16 +0200

I compiled this "inside of" Cygwin but using the MinGW compiler. Now I
installed MSYS2 and compiled the same way (using the batch file in the win32
directory) and everything works now. I am not skilled enough to track-down
and fix this issue I'm afraid. All I can say is that compiling using the
batch file inside of Cygwin works well.

Thank you for your help, I appreciate it a lot!


Best regards,
~ Joel

-----Original Message-----
From: Tinycc-devel
[mailto:address@hidden On Behalf Of
Vladimir Vissoultchev
Sent: 14 July, 2016 09:24
To: address@hidden
Subject: Re: [Tinycc-devel] undefined reference to tcc_relocate

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

                


_______________________________________________
Tinycc-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/tinycc-devel





reply via email to

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