I restructured my code for readability and now I’m getting a single build error that says, “No such file” in Build Messages. In the Build Log it says,
“collect2.exe: error: ld returned 1 exit status
arm-none-eabi-objcopy.exe: ‘.\build\mygame.elf’: No such file
Process terminated with status 1 (0 minutes, 18 seconds)
1 errors, 153 warnings (0 minutes, 18 seconds)”
Has anyone else come across this error before? I’m kind of at a loss for how to even begin to fix the issue. It appears to not create the elf file needed to create the bin.
Found the issue. It was apparently caused by defining and initializing a variable inside of a header file instead of the corresponding cpp file.
If build fails at collect, it means there was an error so severe, that the .elf file was not created
There are two tabs in the message winw: build log and build messages (?) . Check both when you have issues
Yeah, neither of those places provided any useful information. I ended up migrating the entire codebase to Mbed which luckily gave slightly more descriptive error messages.
We need to check you have verbose output selected. EmBitz gcc compiler will definitely tell you more than enough if maximum verbosity is on.
I couldn’t find it as a setting but you can pass it on command line to the compiler.
Go to project build options, and then on both C and C++ tabs there is a list of other options (parameters passed as -something) in a column on the right.
Add -v to the end of the list, and GCC will output everything but the kitchen sink.
BUT: the error you described (multiple declaration) will most definitely be shown in the build log/build messages
If I ever have a non-descriptive error message again, I’ll make sure to try with the verbose flag included. I won’t need to go through another major restructuring, so I don’t anticipate having any errors this difficult to decipher again.
Thank you for the help!