Hi all,
This commit: author <http://repo.or.cz/w/tinycc.git/search/b7b9f9f51170bd1616ee56acfef9c6bf20b9c f3f?s=seyko;st=author> seyko <http://repo.or.cz/w/tinycc.git/search/b7b9f9f51170bd1616ee56acfef9c6bf20b9c [email protected];st=author> <[email protected]> Tue, 3 Mar 2015 11:25:57 +0000 (14:25 +0300) diff --git a/tcc.c <http://repo.or.cz/w/tinycc.git/blob/7b191147b593106665581ed892dabb205ba444c f:/tcc.c> b/tcc.c <http://repo.or.cz/w/tinycc.git/blob/ce03d3b3cbd235fd783682e9f705570e6d2d86a 6:/tcc.c> index 7b19114 <http://repo.or.cz/w/tinycc.git/blob/7b191147b593106665581ed892dabb205ba444c f:/tcc.c> ..ce03d3b <http://repo.or.cz/w/tinycc.git/blob/ce03d3b3cbd235fd783682e9f705570e6d2d86a 6:/tcc.c> 100644 (file) --- a/tcc.c <http://repo.or.cz/w/tinycc.git/blob/7b191147b593106665581ed892dabb205ba444c f:/tcc.c> +++ b/tcc.c <http://repo.or.cz/w/tinycc.git/blob/ce03d3b3cbd235fd783682e9f705570e6d2d86a 6:/tcc.c> @@ <http://repo.or.cz/w/tinycc.git/blob/7b191147b593106665581ed892dabb205ba444c f:/tcc.c#l47> -47,6 <http://repo.or.cz/w/tinycc.git/blob/ce03d3b3cbd235fd783682e9f705570e6d2d86a 6:/tcc.c#l47> +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" @@ <http://repo.or.cz/w/tinycc.git/blob/7b191147b593106665581ed892dabb205ba444c f:/tcc.c#l307> -307,6 <http://repo.or.cz/w/tinycc.git/blob/ce03d3b3cbd235fd783682e9f705570e6d2d86a 6:/tcc.c#l308> +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
_______________________________________________ Tinycc-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/tinycc-devel
