Author Topic: Compiling C::B 8.02 from sources  (Read 4828 times)

schtroumpfette

  • Guest
Compiling C::B 8.02 from sources
« 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.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: Compiling C::B 8.02 from sources
« Reply #1 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 ).

Or use subversion to download the actual sources, or use the tar-ball from my repo.

schtroumpfette

  • Guest
Re: Compiling C::B 8.02 from sources
« Reply #2 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 ?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7785
    • My Best Post
Re: Compiling C::B 8.02 from sources
« Reply #3 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
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

schtroumpfette

  • Guest
Re: Compiling C::B 8.02 from sources
« Reply #4 on: June 06, 2009, 11:48:34 am »
It's ok !

CodeBlocks runs faster than ever now !

Thanks for explanations ^^