main.o syntax error

Started by
1 comment, last by ToastFlambe 17 years, 1 month ago
Awhile back I got curious about assembly language and decided to enable assembly code generation using -S under Build Options -> Other options (this is with Code::Blocks and MingW). Now when I build the program, the linker gives me a "syntax error" message and the .o file opens up in Code::Blocks showing assembly code. The problem is I can't disable this. I've reinstalled both MingW and Code::Blocks and I've tried editing the config file for CB (and of course I've deleted -S from the other options box) and it still does this. Heres the error message: Linking console executable: bin\Debug\hgeGame.exe C:\MinGW\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe:obj\Debug\main.o: file format not recognized; treating as linker script C:\MinGW\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe:obj\Debug\main.o:1: syntax error collect2: ld returned 1 exit status Process terminated with status 1 (0 minutes, 0 seconds) 1 errors, 0 warnings Any ideas?
Advertisement
Do you mean that the error occurred when you disabled assembly again? If so, make sure that you make a full rebuild of the entire project. It's possible that main.o wasn't recompiled when it should have been.
Yep, that worked. Thanks

This topic is closed to new replies.

Advertisement