Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: schtroumpfette on June 05, 2009, 05:07:00 pm

Title: Compiling C::B 8.02 from sources
Post by: schtroumpfette on June 05, 2009, 05:07:00 pm
Hello !

I run on Linux and i want to compile C::B from sources: http://www.codeblocks.org/downloads/6

I run first ./configure --prefix=/usr
make -j3

And here is the problem:

g++ -DHAVE_CONFIG_H -I. -I../../src/include -I/usr/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -I../../src/include/wxscintilla/include -I../../src/include -I../../src/include/scripting/include -I../../src/include/scripting/sqplus -I../../src/include/wxFlatNotebook/include -I../../src/src/wxAUI -DENABLE_BINRELOC -DAPP_PREFIX="\"/usr\"" -Ulinux -Uunix  -O2 -ffast-math -g -O2 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -MT prefix.o -MD -MP -MF .deps/prefix.Tpo -c -o prefix.o prefix.cpp
prefix.cpp: In function ‘char* br_extract_dir(const char*)’:
prefix.cpp:396: erreur: invalid conversion from ‘const char*’ to ‘char*’
prefix.cpp: In function ‘char* br_extract_prefix(const char*)’:
prefix.cpp:432: erreur: invalid conversion from ‘const char*’ to ‘char*’

How can i do ?

Thanks.
Title: Re: Compiling C::B 8.02 from sources
Post by: Jenna on June 05, 2009, 05:55:44 pm
You use gcc-4.4 ?

In this case you have to patch the code (see this post: http://forums.codeblocks.org/index.php/topic,10621.0.html (http://forums.codeblocks.org/index.php/topic,10621.0.html) ).

Or use subversion to download the actual sources, or use the tar-ball from my repo.
Title: Re: Compiling C::B 8.02 from sources
Post by: schtroumpfette on June 05, 2009, 11:45:49 pm
I'll try this patch, thanks ^^

But, what is the problem with GCC 4.4 ? It's because it's a prerelease ?
Title: Re: Compiling C::B 8.02 from sources
Post by: stahta01 on June 06, 2009, 02:20:24 am
I'll try this patch, thanks ^^

But, what is the problem with GCC 4.4 ? It's because it's a prerelease ?

It is because the changed the function prototype for a function and it raises an compiler error where it used used with incorrect const-ness.
The change looked correct to me; but, can not remmember the function that was change ar current time.

Tim S
Title: Re: Compiling C::B 8.02 from sources
Post by: schtroumpfette on June 06, 2009, 11:48:34 am
It's ok !

CodeBlocks runs faster than ever now !

Thanks for explanations ^^