Hey all. I'm using a SCONS script to autodetect my source files and build my code on all my platforms. Previously I was using Code::Blocks for Windows, make for Linux and Xcode for mac, which was getting to be a hassle.
Anywho. Everything is lovely and the integration works quite well but for one thing. Errors from the compiler are caught and inexplicably have a period inserted at the beginning of the filename string. So if the compiler whines,Codesrc\uber_world.cpp: In member function 'void uberleben::World::worldUpdate()':
src\uber_world.cpp:76: error: 'BOOGERS' was not declared in this scope
Code::Blocks reports:Code.src\uber_world.cpp|76|error: 'BOOGERS' was not declared in this scope
Note the folder name ".src" (whereas my sources are in src/)
Various suspicions I've more or less disproved were that it stemmed from my compiler's UTF-8 output (which, happily, I fixed while investigating) and that it had to do with SCONS converting the paths from foreslashes to backslashes and in some cases resolving them to absolutes -- the console output clearly shows the relative path, though.
Anyway. Here's hoping this is something silly.
Are you 100% sure that project->GetExecutionDir() is always non-empty?project->GetExecutionDir() returns either the projects base-path, or the makefiles execution-dir.
If it can be empty, your fix is wrong...
I think I'm affected by this bug too. I cannot open source files from the message windows because the file path is wrong. The only workaround is putting symlinks everywhere. The another would be hacking into the makefile but I don't want to do that.Most likely, but without a project where it fails for you, I can not test.
The path CB shows is something like:
<relative path to the makefile>/<relative path to the makefile again><file path which gcc shows>
Was this the bug you fixed? I'm using the CB 10.05 for Linux.
When will the next stable release is planned to come out?
Most likely, but without a project where it fails for you, I can not test.
And how does CB locate the files? Does it parse and understand the makefile? Searches the filesystem?It runs make on your Makefile(s). As simple as that. A Makefile should declare all needed files 7 path's / libs / flags and alike. That's what a Makefile is for. If you Makefile is incomplete, the build will be incomplete. That applied to all other Makefile based projects in the world, with or without IDE.
There is no problem with the makefile.
The problem is that the makefile changes the working directory during the build. If there is an error or warning, CB stupidly assumes the problematic file is at <makefile_path>/<path_the_gcc_reports> if the working directory changes during the build the path will be incorrect, and I cannot open the file by clicking the error or warning message. The same applies when I try to debug, the IDE cannot open file.
Changing the makefile to make CB happy is not an option.