[Top][All Lists]

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

[Tinycc-devel] tcc shared libraries with gcc programs

From: Rob Heatherly
Subject: [Tinycc-devel] tcc shared libraries with gcc programs
Date: Wed, 31 Aug 2011 00:00:49 -0700

First post, starting small, be kind ;)  If I should redirect the
question elsewhere, just say the word.

I have compiled a series of personal shared libraries using the latest
mob/git version of tcc on x86_64 gentoo and it handled them very well
(thanks).  I then call them from both tcc and gcc executables.  The
only difference appears to be that I have to remember to add the "-g"
flag when compiling the libraries for gcc to recognize them properly.
Its fine for me as I can just do that, but is this normal and

For context (if needed), one of the shared libraries I have been using
for years is called yLOG (pure ansi, nothing clever) and I compile it

tcc -Wall -Wunsupported -bench -shared -soname libyLOG.so.1 -o
libyLOG.so.1.0  -lrt  yLOG.c

It performs as expected when my main program is compiled with tcc, but
when that same main program is complied with gcc I get the following
when linking...

libyLOG.so: file not recognized: File format not recognized

When I recompile the yLOG library with the tcc "-g" flag, the main gcc
program compiles/links to it with no problem.  Small, but maybe
confusing deal.  Am I missing or doing something classically stupid?

reply via email to

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