Code::Blocks, missing compiler flag and libraries


#1

[color=#0000FF]I can’t build the basic window project generated by the Introjucer using Code::Blocks on Ubuntu 12.04.[/color]
Building with the generated Makefile works flawless, though.

I think the Introjucer is missing out on some options it should set in the *.cbp file.
Since I’m using Code::Blocks for the first time myself, I can’t give a more helpful advice.

To reproduce:

Step 1

Create a new Introjucer Project.
[list]

  • Project Type: GUI Application with a basic window.
  • Create a new Code::Blocks project target.
  • Save
    [/list]

Step 2

[list]- Open the created *.cbp file in Code::Blocks.

  • Build and run (F9).[/list]

[color=#0000FF]-> Compilation Error:[/color]

Step 3

Fix:
Add

to the Extra compiler flags in the Introjucer for Code::Blocks.
(Sidenote: It is not possible to add `freetype-config --cflags’ because the whitespace is interpreted as an argument splitter.)

Retry to compile.

[color=#0000FF]-> Linker Error:[/color]

ld||cannot find -lgdi32| ld||cannot find -luser32| ld||cannot find -lkernel32| ld||cannot find -lcomctl32| ld||cannot find -lcomdlg32| ld||cannot find -limm32| ld||cannot find -lole32| ld||cannot find -loleaut32| ld||cannot find -lopengl32| ld||cannot find -lrpcrt4| ld||cannot find -lshlwapi| ld||cannot find -luuid| ld||cannot find -lversion| ld||cannot find -lwininet| ld||cannot find -lwinmm| ld||cannot find -lws2_32| ld||cannot find -lwsock32|

Step 4 (poor mans “solution”)

Edit the *.cbp file and remove all library=… entries.
Now the binary is built and it works (as long as the libraries are not needed…).


#2

Yes, sorry, but I never intended for the C::B project to work on anything other than Windows - if there are any simple changes you could suggest that’d help, then fire away! But it’s not high on my priority list.


#3

Thank you for the insight!

If I get familiar with Code::Blocks to the point where I can offer some help, I’ll surely do so.