News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Problem with Code::Blocks and SCons...

Started by Funto, June 26, 2008, 12:05:07 PM

Previous topic - Next topic

Funto

Hi all,

I'm trying to compile my project which uses the SCons construction tool, and so I use the "This is a custom Makefile" option.

This is my Makefile :


all:
scons
release:
scons
debug:
scons debug=1
cleanrelease:
scons -c
cleandebug:
scons debug=1 -c


And this is what I get when trying to compile : "MyProject - release" uses an invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!]. Skipping...

I have 2 targets for my project, "release" and "debug" (without and uppercase).

I have got another project where this method works pretty well, I don't understand the problem...

Thanks in advance for your help :)

stahta01

#1
Check List; I will be adding items as I think of them.

1. Verify the two projects use same compiler setting.
    Project -> "Build Options" is the Select Compiler the same?

2. Verify Custom Makefile related stuff

2a. Project -> "Properties" confirm "this is an custom makefile" is checked

2b. Verify targets names match that of makefile
     Project -> "Properties" look under "build targets" tab
     You should see "release" and "debug" targets to match the makefile you posted above.
     You might need to add virtual target of all.

     Note: you may wish to add targets of "distcleanrelease" and "distcleandebug" to your makefile.
     So it matches what is shown on
     Project -> "Build Options"  tab of "Make commands"
     I would also verify that the "Make commands" shows the same between working and non working project.
     

3. debugging turn on Full Compiler Logging
   (Never did this with custom makefile, might not work.)
   Settings -> "Compiler and Debugger"
   Select the correct compiler
   Change to far right tab of "Other Settings"
   Change "compiler logging" to "Full Command Line"

Tim S
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

Funto

Thanks a lot for all your answers ^^

I have just tried to compile my project and it just worked...
In fact, I use the same project with Windows and with Linux, and it seems that it correctly works with Linux...

When I try again with Windows, I will check your list if it still doesn't work. Thanks for the tip about the "Full compiler log" option, i love this one ! :)