User forums > Help

Strange Syntax Error Using MIPS Compiler

<< < (2/2)

Authentic:
I moved n64-master to c:/users/trevor/desktop/. No dice...


--- Code: ----------------- Clean: Debug in test (compiler: n64)---------------

Cleaned "test - Debug"

-------------- Build: Debug in test (compiler: n64)---------------

mips64-gcc.exe -Wall -g -ffunction-sections -fdata-sections -flto -ffat-lto-objects -I C:\Users\Trevor\Desktop\n64-master/include -IC:\Users\Trevor\Desktop\n64-master\include -c "C:\Users\Trevor\Documents\Code Blocks\projects\test\test.c" -o obj\Debug\test.o
mips64-g++.exe  -o bin\Debug\test.exe obj\Debug\test.o  -T C:\Users\Trevor\Desktop\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:
Then, the issue is likely because "-Wl,--defsym,start=0x" the value 0x is wrong. But, I have no idea where the value is set.
I was hoping the linker script was the place it was set; and, the reason it failed was the spaces.

From Compiler Custom Vars.

--- Code: ---GLDFLAGS
--- End code ---

--- Code: ----T $(LDSCRIPT) -Wl,--defsym,start=0x$(address) -specs=nosys.specs -flto -Wl,--gc-sections
--- End code ---

For some reason your value of $(address) is blank; but, I have no idea where that value is located.

Tim S.

stahta01:
Found out why it worked for me; and, how to maybe fix the problem.
I had built the template cb project and codeblocks remember the address custom variable from it.

Project -> Build Options
Select top level project in left pane
Click on Tab "Custom Variables"
Click on add
Enter address in key box
Enter 80000400 in value box
Click on OKs

Tim S.

Authentic:
It compiles now, no warnings or errors! Thank you so much!

Navigation

[0] Message Index

[*] Previous page

Go to full version