Author Topic: Problem with Code::Blocks and SCons...  (Read 7053 times)

Offline Funto

  • Multiple posting newcomer
  • *
  • Posts: 81
Problem with Code::Blocks and SCons...
« on: June 26, 2008, 12:05:07 pm »
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 :

Code
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 :)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7785
    • My Best Post
Re: Problem with Code::Blocks and SCons...
« Reply #1 on: June 27, 2008, 02:33:36 am »
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
« Last Edit: June 27, 2008, 02:36:11 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Funto

  • Multiple posting newcomer
  • *
  • Posts: 81
Re: Problem with Code::Blocks and SCons...
« Reply #2 on: June 29, 2008, 10:03:48 pm »
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 ! :)