tinycc-devel
[Top][All Lists]
Advanced

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

[Tinycc-devel] Windows build broken after 'A gcc preprocessor option -dD


From: Christian Jullien
Subject: [Tinycc-devel] Windows build broken after 'A gcc preprocessor option -dD added' commit on March 3
Date: Sun, 15 Mar 2015 09:03:58 +0100

Hi all,

 

This commit:

author

seyko <address@hidden>

Tue, 3 Mar 2015 11:25:57 +0000 (14:25 +0300)

 

 

 

diff --git a/tcc.c b/tcc.c

index 7b19114..ce03d3b 100644 (file)

--- a/tcc.c

+++ b/tcc.c

@@ -47,6 +47,7 @@ static void help(void)

            "  -Usym       undefine 'sym'\n"

            "  -P          do not output a #line directive\n"

            "  -P1         use a #line directive in output instead of the gcc style\n"

+           "  -dD         put a define directive in the output (inside a comment)\n"

            "Linker options:\n"

            "  -Ldir       add library path 'dir'\n"

            "  -llib       link with dynamic or static library 'lib'\n"

@@ -307,6 +308,8 @@ int main(int argc, char **argv)

         start_time = getclock_us();

 

     tcc_set_output_type(s, s->output_type);

+    if (s->output_type == TCC_OUTPUT_PREPROCESS)

+       print_defines();

 

     /* compile or add each files or library */

     for(i = ret = 0; i < s->nb_files && ret == 0; i++) {

 

On Windows, using build-tcc.bat, results to

C:\Users\jullien\AppData\Local\Temp\ccGAI2YU.o:tcc.c:(.text.startup+0x49a): undefined reference to `print_defines'

collect2.exe: error: ld returned 1 exit status.

 

If I add tccpp.c in libtcc, I get:

 

C:\Users\jullien\AppData\Local\Temp\cc5OdrSb.o:tccpp.c:(.text+0x3c0): multiple definition of `print_defines'

C:\Users\jullien\AppData\Local\Temp\ccqQyUPS.o:libtcc.c:(.text+0x2d30): first defined here

collect2.exe: error: ld returned 1 exit status

 

Which does not help a lot.

 

If I comment:

+    if (s->output_type == TCC_OUTPUT_PREPROCESS)

+       print_defines();

 

It compiles and runs nicely.

 

What is the right way to have print_defines included on Windows?

 

Seyko2, can you please investigate?

 

Tia

 

Christian


reply via email to

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