tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] Question on creating a object file from a program in


From: David Mertens
Subject: Re: [Tinycc-devel] Question on creating a object file from a program in string format
Date: Mon, 27 Jun 2016 19:35:52 -0400

I'm not entirely sure where the problem lies, but if you want to generate an output file, I think you need to call "tcc_output_file". Maybe. At any rate, I'd look through the source code for tcc.c to figure out how to create object files.

David

On Sat, Jun 25, 2016 at 1:06 PM, Jin Qian <address@hidden> wrote:

New to TCC but very interested in its small footprint and fast COMPILE speed.  Tried to create a  object file from a short program in string format,  the resulted "dummy.o"  doesn't have any symbols.  Any idea why?

Here is the modified example.   http://pastebin.com/raw/ntx28sgk
I experimented with removing or adding the call "tcc_relocate" but there is no difference.

C:\temp> gcc -I libtcc  -Llib -ltcc1 examples\libtcc_test.c -L. -llibtcc
it produced a program "a.exe".
C:\temp> a
C:\temp> nm dummy.o
nm: dummy.o: no symbols


Thanks!

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




--
 "Debugging is twice as hard as writing the code in the first place.
  Therefore, if you write the code as cleverly as possible, you are,
  by definition, not smart enough to debug it." -- Brian Kernighan

reply via email to

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