gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Coding > commandline options in VC++

#6055 - Daikath - Fri May 16, 2003 4:30 am

I am trying to use sprintf in a program of mine but I use MS VC++ 6.0 proffesional edition.

And when I do I get these errors http://rafb.net/paste/results/i2793622.html.

I have gone too Project -> Settings and my command line looks like
Code:

NMAKE /f textoutput.mak


And this is my makefile
http://rafb.net/paste/results/M2485623.html
_________________
?There are no stupid questions but there are a LOT of inquisitive idiots.?

#6102 - tepples - Sat May 17, 2003 4:19 am

Daikath wrote:
I am trying to use sprintf in a program of mine but I use MS VC++ 6.0 proffesional edition.

And when I do I get these errors http://rafb.net/paste/results/i2793622.html

It appears that libgcc isn't getting linked in properly.

Around line 106 of your linker script, I see
Code:
# -------------------------------------------
# Define the linker instruction;
# -------------------------------------------
$(PROJECT).elf : $(O_FILES)
   $(CMPDIR)\gcc $(LDFLAGS) -o $(PROJECT).elf $(O_FILES) -lstdc++ -lgcc -lm  -lc 
   -@echo ------------------------------------------
   -@echo Linking Done
   -@echo ------------------------------------------

Try changing -lgcc -lm -lc to -lgcc -lm -lc -lgcc and see if the error goes away.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.