User forums > Help
Strange Syntax Error Using MIPS Compiler
Authentic:
Recently I installed Code::Blocks and everything worked with the mingw compiler. But after following this guide (to the letter) I find myself unable to build even the simplest valid C programs: https://github.com/glankk/n64. The error is always the same:
--- Code: ---||=== Build: Debug in test (compiler: n64) ===|
c:\msys64\opt\n64-toolchain\bin\..\lib\gcc\mips64\7.2.0\..\..\..\..\mips64\bin\ld.exe:--defsym|1|syntax error|
||error: ld returned 1 exit status|
||=== Build failed: 2 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|
--- End code ---
I am using Code::Blocks 16.01, and here is an example of a c file that won't build:
--- Code: ---int main() {
return 0;
}
--- End code ---
I don't want to waste anyone's time if this is a simple problem, but I really cannot find a solution. Do I need to rebuild the compiler?
stahta01:
Post a full rebuild log of your simple program and post the simple program.
http://wiki.codeblocks.org/index.php/FAQ-Compiling_(errors)#Q:_How_do_I_troubleshoot_a_compiler_problem.3F
I am trying to build the n64 compiler, right now. But, I have a slow internet connection and a slow computer.
Likely something changed in the Compiler or Code::Blocks (CB) that requires the CB settings to be changed.
Tim S.
stahta01:
While waiting for the downloads to finish, I am guessing n64.conf is not correct and needs edited to fix this error.
NOTE: It looks like this git project expects an CB "Custom makefile" project instead of a normal CB project like you are trying to use.
But, till you post the requested full build log I will not know what you are trying to use for certain.
Tim S.
Authentic:
Thank you for responding! I am going to start rebuilding the compiler now to see if that works. Here is the build log:
--- Code: ---Build started on: 20-10-2017 at 12:53.57
Build ended on: 20-10-2017 at 12:53.57
-------------- Build: Debug in test (compiler: n64)---------------
mips64-g++.exe -o bin\Debug\test.exe obj\Debug\test.o -T "C:\Program Files (x86)\CodeBlocks\n64-master"/ldscripts/gl-n64.ld -Wl,--defsym,start=0x -specs=nosys.specs -flto -Wl,--gc-sections
c:/msys64/opt/n64-toolchain/bin/../lib/gcc/mips64/7.2.0/../../../../mips64/bin/ld.exe:--defsym:1: syntax error
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 0 second(s))
2 error(s), 0 warning(s) (0 minute(s), 0 second(s))
--- End code ---
stahta01:
Try putting "n64-master" in a place that does NOT have spaces or special chars in the path.
Please post a full re-build log if you still have problems.
Re-build does not mean build.
Edited: added my re-build log; minus the clean portain.
--- Code: ----------------- Build: Debug in test (compiler: n64)---------------
mips64-gcc.exe -Wall -g -ffunction-sections -fdata-sections -flto -ffat-lto-objects -I C:\Users\stahta01\devel\open_source_code\no_version_control\n64-master/include -IC:\Users\stahta01\devel\open_source_code\no_version_control\n64-master\include -c C:\Users\stahta01\devel\open_source_code\no_version_control\test\test\main.c -o obj\Debug\main.o
mips64-g++.exe -o bin\Debug\test.exe obj\Debug\main.o -T C:\Users\stahta01\devel\open_source_code\no_version_control\n64-master/ldscripts/gl-n64.ld -Wl,--defsym,start=0x80000400 -specs=nosys.specs -flto -Wl,--gc-sections
Output file is bin\Debug\test.exe with size 3.04 KB
--- End code ---
Tim S.
Navigation
[0] Message Index
[#] Next page
Go to full version