Hi Miles, > PS: Not sure if it's related, but I compiled my code with sdcpp, instead > of sdcc. I can't figure out how to give an -MD option to sdcc so that it > passes it on to sdcpp, so I just called sdcpp directly (even though I've > often found it to be problematic to call g++ directly, instead of letting > gcc do it. Does sdcc work the same way?). Here's how I invoked the > compiler: > > sdcpp can.c -debug -Ic:/full/path/to/sdcc/include -MD main.d -o main.rel
sdcpp is SDCC's adaptation of GCC's C preprocessor cpp -- it is not a C++ compiler. The output main.rel is probably plain C -- with all macros expanded. If you want to pass specific options on to the preprocessor, use sdcc -Wp,-debug,-MD,main.d -Ic:/full/path/to/sdcc/include -o main.rel can.c (assuming you want the default target, some 8051; otherwise you would have to include -m z80 or -m pic -p16f877 or ... Same mechanism works for assembler (-Wa,-opt,-opt,arg,arg) and linker (-Wl,-opt,-opt,-opt,arg,-opt). Hope that gets you started, Raphael ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user