Code::Blocks with C/C++ Compiler


@kuru, try to modify configure, change the first line from
Code:
#!/bin/sh
to
Code:
#!/bin/bash
That should help.

Also, be sure to have typed in your password when launching the Codeblocks Command Line.
Oh thats new for me..can i make a little sh with grep to change that automatic then i Type shtobash.sh?

Can you post an example for that?
Maybe then much more will compile here with this good Hint :D
 
Never had problems finding libs with scripts like configure with #!bin/sh, at least using ext4 partition or after updating those libs.

It would be great if you could update Libpng to 1.6.23, Sqlite to 3.13.0 and OpenSSL 1.0.2h.

QT was updated to 5.7 with some NEON ARM optimizations, like QtGui scaling, but 5.6.1 is long term release.
 
Last edited:
I was able to compile QT programs, and they work fine, until i tried with QupZilla that needs Qt5Webkit.

/mnt/utmp/codeblocks/qt5/lib/libQt5WebKit.so: undefined reference to 'QWindowSystemInterface::registerTouchDevice(QTouchDevice*)'

QtWebkit is not included anymore with QT, but you can still find new versions made by community here:

https://download.qt.io/community_releases/5.6/5.6.0/
 
Found another problem when compiling VICE emulator.

Libpng should be compiled with configure instead of cmake.

But doing this, makes QT programs fail to compile at linking time.

mnt/utmp/codeblocks/qt5/lib/libQt5Gui.so: undefined reference to `yespng_set_error_fn@PNG16_0'

Maybe it could be a good excuse to compile QT 5.6.1 or QT5.7.1 when it's ready.
 
Strange that you have this link error @canseco . You can probably temporarly fix the link issue by adding -lpng16 to the libs, but I'll also take a look at that yes.
 
Strange that you have this link error @canseco . You can probably temporarly fix the link issue by adding -lpng16 to the libs, but I'll also take a look at that yes.
On my Compiling Adventures...i encountered sometimes near the Same png16 Errors.
Tried to add libpng16 but it did not compiled here because unknown Errors.
Thx for looking for this Error :D
 
Last edited:
when this error happens, it means some mismatch between the .h and the .so.
to fix, you have to be sure that all version are either 1.2 1.4, or 1.6.
So, instead of
Code:
#include <libpng.h>
try to use
Code:
#include <libpng16/libpng.h>
for 1.6 or
Code:
#include <libpng14/libpng.h>
for 1.4,
and use the correct libpng.so on the link... It should fix it.
 
Hi, I'm having some trouble with GTK. Currently trying to build exo-0.11.0 but it seems like the .h files bundled with the Code::Blocks PND are referring to others which aren't in the expected place.

"configure" was satisfied. For the "make" stage, I hacked my way past the first 3 errors, but gdkconfig.h isn't in there at all, so I paused there.

Code:
/mnt/utmp/codeblocks/usr/include/gtk/gtk.h:32:21: fatal error: gdk/gdk.h: No such file or directory

/mnt/utmp/codeblocks/usr/include/gdk/gdkscreen.h:31:19: fatal error: cairo.h: No such file or directory

/mnt/utmp/codeblocks/usr/include/gdk/gdktypes.h:37:25: fatal error: pango/pango.h: No such file or directory

/mnt/utmp/codeblocks/usr/include/gdk/gdktypes.h:55:23: fatal error: gdkconfig.h: No such file or directory
 
but gdkconfig.h isn't in there at all
Such config headers usually include stuff that actually depends on what was compiled into the binary, for that reason they are often being bundled with the library instead of the other headers (i.e. usr/lib/gtk*/include).

I don't know how well pkg-config works with the whole Code::Blocks environment, but it should take care of all required include paths, including these config headers.
 
@HelenF : if you take the gdk.h for example.

If you
Code:
find /mnt/utmp/codeblocks -name gdk.h
you will see the file is in /mnt/utmp/codeblocks/usr/include/gtk-2.0/gdk/gdk.h

Now, if you do
Code:
pkg-config --cflags gtk+-2.0
you will see that in the long list of flags, you'll see the correct -I/mnt/utmp/codeblocks/usr/include/gtk-2.0 along many other flags (and some inside the usr/lib folder as @Letalis Sonus wrote).
I'm not sure what's wrong with your configure, but it should find it.
On thing you can do, is editing the configure script and change
Code:
#!/bin/sh
to
Code:
#!/bin/bash
It helps sometime.
 
Thanks, I've learned some things.

Such config headers usually include stuff that actually depends on what was compiled into the binary, for that reason they are often being bundled with the library instead of the other headers (i.e. usr/lib/gtk*/include).
Ah, so it is (I was only searching the include folders).

you will see that in the long list of flags, you'll see the correct -I/mnt/utmp/codeblocks/usr/include/gtk-2.0 along many other flags
Yes, I see it.


Changing to /bin/bash didn't make any difference.

I tried in a new appdata, since I've had the old one for a long time and clearly don't remember everything I've done to it. Now I'm one step backwards: make is failing on the previous package, libxfce4ui-4.12.1 :

Code:
libtool: warning: '/mnt/utmp/codeblocks/usr/lib/libgobject-2.0.la' seems to be moved
/mnt/utmp/codeblocks/usr/bin/grep: /usr/lib/libgobject-2.0.la: No such file or directory
/mnt/utmp/codeblocks/usr/bin/sed: can't read /usr/lib/libgobject-2.0.la: No such file or directory
libtool:   error: '/usr/lib/libgobject-2.0.la' is not a valid libtool archive

Also, what is the recommended setup for CPAN in this environment?
 
The warning is fine. But there errors, I have to fix them (I'll have to change some ".la" files that have those incorrect references.did you used the last beta version ?

(CPAM should be usable in codeblocks command line)
 
I'm using 2.2.0.13 from the repo. But libxfce4ui-4.12.1 was successful with my old codeblocks appdata (thus the "step backwards"). When renaming the appdata, I also deleted the source folders for these xfce libs and re-extracted to make sure nothing was left over.

It later occurred to me to try building in Slackware - all the packages built with no problem, and the result seems to work in SZ with a not-too-big amount of libs copied. So I'm probably going to use that one.
 
Where is the beta version? I saw you also just recommended it to someone in another thread, but I can't find it.
 
The new version is now on the repo.

Update v2.30.14
  • Updated GCC to 6.1.0
  • Updated Codeblocks
  • Codeblocks use a smaller font
  • Updated Qt to 5.7.0
  • Updated many libs!

And here an incomplete (but more detailled) change log
Code:
********** 10/12/2015
* gcc             5.3

********** 18/12/2015
+ SOIL            1.16

********** 01/01/2016
+ capstone        3.0.4
+ radare2        fresh from git
+ unicorn        fresh from git
+ freebasic        latest version

********** 02/01/2016
+ hack to enable ucontext (need recompile)
* gcc            5.3.0 recompile to have GO lang working (use ucontext)
+ d0_blind_id    fresh from git

********** 06/01/2016
+ audiere        1.9.4

********** 10/01/2016
* valgrind         3.11 (to avoid issue with openssl, use OPENSSL_armcap=0 env) (to avoid issue with GLES, use --undef-value-errors=no arg)
+ valkirie        2.0 (Qt4 frontend for valgrind)
* SDL_sound        1.0.3 (all format enabled)

********** 11/01/2016
* SMPEG            latest from svn
* mpg123        latest from svn
* codeblocks    latest from svn (build 10640)

********** 16/01/2016
* xcb-proto     1.8 (update to python 2.7.10 from wxpython)
* libxcb        1.9 (with xkb and xinput enabled)
+ libxkbcommon    latest from git
+ libxkfile        latest from git
+ libfcitx        4.2.8.6

********** 16/01/2016
* openal-soft    latest from git (with alsa, oss and portaudio backend)

********** 28/02/2016
* openal-soft    latest from git (plus some Neon optim for Lerp32 and disabling UHL filter)
+ jsoncpp        latest from git
+ metakit        latest from git

********** 06/03/2016
+ byacc            latest version
+ libbsd        latest from git
* SDL2            latest from hg, without link to libGL

********** 29/03/2016
+ CGMlib        latest from git

********** 06/04/2016
* codeblocks    latest from svn

********** 18/04/2016
* libpng        1.6.21
* Qt            5.6.0 but it seems WebEngine is not working (fortunatly, WebKit still works)

********* 02/05/2016
* gcc            6.1.0

********* 18/06/2016
* openssl        1.02h
* sqlite        3.13.0
* libpng        1.6.23

********* 07/07/2016
* google protobus    latest from git
* Qt            5.7.0
* QtWebKit        5.7.0

********* 10/07/2016
* ruby            2.1.10

********* 10/07/2016
+ chrpath        0.16    a tool to alter/remove RPATH/RUNPATH

********* 23/07/2016
* libjsoncpp    latest from git
* cmake            3.6.1
+ libvncserver    latest from git
+ FreeRDP        latest from git

********* 26/07/2016
+ libindicator
* json-glib        1.2.0
+ libdbus-indicator
+ libappindicator

********* 07/08/2016
+ loki            latest from svn
+ raknet        latest from git

********* 13/08/2016
* curl             7.50.1
* libpng         1.6.24
* giflib         5.1.4
* libtiff         4.0.6
* openjpeg         2.1.1
* libwebp         0.5.1
+ lcms2         2.8
* libgpg-error    1.24
* gnutls         3.4.14
+ qtchooser        configured with qt4 & qt5

********* 15/08/2016
+ sdl-gu        latest from git, with GL 1.x and GLES2 on SDL2 backend (untested, probably not working for GLES2 on newer driver)
 
Hi all :)

@ptitSeb : I'm trying to compile an application depending on libmagic. The configure script complained the development files were missing, so I assumed libmagic was not part of your package. I successfully compiled libmagic from source and installed it in /mnt/utmp/codeblocks.

Unfortunately, the configure script is still failing. What am I doing wrong ? I know I can add some flags after the ./configure command, but I don't really know the correct syntax :$

Could you please give me a hand ?

On a side note, I'd also like to add PowerPacker Decrunch to my Amiga CLI Tools package, but there are only a couple of *.cpp files and one *.h files in the github repository. What am I supposed to do with these ?

Thanks for your help and cheers,

Magic Sam
 
Back
Top