Author Topic: Compiling Code Block  (Read 13208 times)

Offline puneet_m

  • Multiple posting newcomer
  • *
  • Posts: 73
Compiling Code Block
« on: August 03, 2007, 09:24:18 pm »
How can I compile the source code of codeblock? and where is it located?

Thanks,
Puneet

Offline raph

  • Almost regular
  • **
  • Posts: 242
Re: Compiling Code Block
« Reply #1 on: August 03, 2007, 09:43:15 pm »
Get the sourcecode with your svn client at svn://svn.berlios.de/codeblocks/trunk.
How to compile cb depends on your os. Have a look at the wiki, you will find all information, there.

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Compiling Code Block
« Reply #2 on: August 03, 2007, 09:44:55 pm »
Please read the following article. This would be helpful.
Quote
http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows

You've to download the C::B source from SVN. Following page has appropriate links to download source.
Quote
https://developer.berlios.de/svn/?group_id=5358
Be a part of the solution, not a part of the problem.

Offline puneet_m

  • Multiple posting newcomer
  • *
  • Posts: 73
Re: Compiling Code Block
« Reply #3 on: August 03, 2007, 10:44:48 pm »
When I try to build the source code it gives the following error:

sdk\wxscintilla\src\PlatWX.cpp  633 error:class wxWindow has no member named SetTitle.

What could be the reason for this error?

Offline raph

  • Almost regular
  • **
  • Posts: 242
Re: Compiling Code Block
« Reply #4 on: August 04, 2007, 12:15:12 am »
When I try to build the source code it gives the following error:

sdk\wxscintilla\src\PlatWX.cpp  633 error:class wxWindow has no member named SetTitle.

What could be the reason for this error?
Which version of wxWidgets are you using? You should use wxMSW 2.8.4

Offline puneet_m

  • Multiple posting newcomer
  • *
  • Posts: 73
Re: Compiling Code Block
« Reply #5 on: August 04, 2007, 12:42:21 am »
Infact I was using 2.8.4 and the problem was because of the newer version. I tried using 2.6.4 and it got compiled. But it is giving some linking errors. I have made a monolithic library for wxWidget and am giving the correct path for it.Any ideas as to what could be the reason for this problem.

Offline puneet_m

  • Multiple posting newcomer
  • *
  • Posts: 73
Re: Compiling Code Block
« Reply #6 on: August 10, 2007, 08:10:34 pm »
It shows the following error:

cannot find -lwxxrc

Why does it show this when I have linked all the libraries.

Thanks,
Puneet

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Compiling Code Block
« Reply #7 on: August 11, 2007, 08:15:09 am »
cannot find -lwxxrc

Why does it show this when I have linked all the libraries.

It says it can't find libwxxrc.a. It would be much easier for the people in the forum to identify your problem if you are clear with your question. Let me ask you few.

1. OS version?
2. wxWidgets version?
3. wxWidgets build?
4. Compilation method (makefile or project file)?
5. What does "all the libraries" mean??
6. Did you maintain library order??

If you say it doesn't work without providing necessary details. People, like me, will post one answer - "It works for me!".
« Last Edit: August 11, 2007, 08:17:21 am by Biplab »
Be a part of the solution, not a part of the problem.

Offline puneet_m

  • Multiple posting newcomer
  • *
  • Posts: 73
Re: Compiling Code Block
« Reply #8 on: August 13, 2007, 08:20:08 pm »
OS Version:Windows XP
wxWidgets version : wxWidget 2.6.4
Build Method:
mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1  clean
mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1

Project File, I just use CodeBlocks.cbp and fire build from Code::Blocks

Library Linked:libwxmsw26u.a (since it is monolithic)

Thanks,
Puneet

Offline puneet_m

  • Multiple posting newcomer
  • *
  • Posts: 73
Re: Compiling Code Block
« Reply #9 on: August 14, 2007, 01:24:28 am »
And the error is

:C:/Documents and Settings/pmaheshw/Desktop/codeblocks-1.0rc2/codeblocks-1.0rc2/src/sdk/wxscintilla/src/PlatWX.cpp:(.text$_ZN12wxStringBaseC2EPKcj[wxStringBase::wxStringBase(char const*, unsigned int)]+0x23): undefined reference to `_imp___ZN12wxStringBase8InitWithEPKcjj'
.objs\sdk\wxscintilla\src\ScintillaWX.o: In function `ZNK12wxSCICallTip12AcceptsFocusEv':C:/wxWidgets-2.6.4/include/wx/window.h:(.text$_Z16wxGetTranslationPKc[wxGetTranslation(char const*)]+0x2c): undefined reference to `_imp___ZNK8wxLocale9GetStringEPKcS1_'
.objs\sdk\wxscintilla\src\wxscintilla.o: In function `ZN11wxScintilla12StyleSetSpecEiRK8wxString':C:/Documents and Settings/pmaheshw/Desktop/codeblocks-1.0rc2/codeblocks-1.0rc2/src/sdk/wxscintilla/src/wxscintilla.cpp:2552: undefined reference to `_imp___ZNK8wxString11BeforeFirstEc'
:C:/Documents and Settings/pmaheshw/Desktop/codeblocks-1.0rc2/codeblocks-1.0rc2/src/sdk/wxscintilla/src/wxscintilla.cpp:2553: undefined reference to `_imp___ZNK8wxString10AfterFirstEc'
.objs\sdk\wxscintilla\src\wxscintilla.o: In function `ZN11wxScintilla8SaveFileERK8wxString':C:/Documents and Settings/pmaheshw/Desktop/codeblocks-1.0rc2/codeblocks-1.0rc2/src/sdk/wxscintilla/src/wxscintilla.cpp:2725: undefined reference to `_imp___ZN6wxFileC1EPKcNS_8OpenModeE'
.objs\sdk\wxscintilla\src\wxscintilla.o: In function `ZN11wxScintilla8LoadFileERK8wxString':C:/Documents and Settings/pmaheshw/Desktop/codeblocks-1.0rc2/codeblocks-1.0rc2/src/sdk/wxscintilla/src/wxscintilla.cpp:2737: undefined reference to `_imp___ZN6wxFileC1EPKcNS_8OpenModeE'
.objs\sdk\wxscintilla\src\wxscintilla.o: In function `ZNK6wxRect9GetBottomEv':C:/Documents and Settings/pmaheshw/Desktop/codeblocks-1.0rc2/codeblocks-1.0rc2/src/sdk/wxscintilla/src/wxscintilla.cpp:(.text$_ZeqRK8wxStringPKc[operator==(wxString const&, char const*)]+0x14): undefined reference to `_imp___ZNK8wxString3CmpEPKc'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 1 seconds)
2 errors, 0 warnings
 

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Compiling Code Block
« Reply #10 on: August 14, 2007, 03:01:50 am »
:C:/Documents and Settings/pmaheshw/Desktop/codeblocks-1.0rc2/codeblocks-1.0rc2/src/sdk/wxscintilla/src/PlatWX.cpp:(.text$_ZN12wxStringBaseC2EPKcj[wxStringBase::wxStringBase(char const*, unsigned int)]+0x23): undefined reference to `_imp___ZN12wxStringBase8InitWithEPKcjj'
.objs\sdk\wxscintilla\src\ScintillaWX.o: In function `ZNK12wxSCICallTip12AcceptsFocusEv':C:/wxWidgets-2.6.4/include/wx/window.h:(.text$_Z16wxGetTranslationPKc[wxGetTranslation(char const*)]+0x2c): undefined reference to `_imp___ZNK8wxLocale9GetStringEPKcS1_'
.objs\sdk\wxscintilla\src\wxscintilla.o: In function `ZN11wxScintilla12StyleSetSpecEiRK8wxString':C:/Documents and Settings/pmaheshw/Desktop/codeblocks-1.0rc2/codeblocks-1.0rc2/src/sdk/wxscintilla/src/wxscintilla.cpp:2552: undefined reference to `_imp___ZNK8wxString11BeforeFirstEc'

Please don't use Code::Blocks RC2.  8)

It's an old code which may not compile with latest wx sources. It's use is highly NOT recommended.

1. Remove all traces of C::B RC2 from your PC including the MinGW compiler installed with it.
2. Download and install a latest nightly build of C::B from the following forum.
Quote
http://forums.codeblocks.org/index.php/board,20.0.html
Read the following article for installation details.
Quote
http://forums.codeblocks.org/index.php/topic,3232.0.html
3. Install GCC-3.4.5 (MinGW build) at C:\MinGW (recommended).
4. Download the latest source from SVN (http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows) and compile it. Please note that this article is bit old.

Alternatively you may download latest source tarball from the following link.
Quote
http://www.esnips.com/web/CodeBlocks-SVN-TarBall

Another point you should keep in mind that Path containing Spaces may create problem with certain programs (windres.exe) and this may break compilation. So put the source in a path which doesn't have space in between.

Please note that C::B has moved to wx-2.8. So try to compile the latest source using wx-2.8 (recommended).
« Last Edit: August 14, 2007, 03:11:26 am by Biplab »
Be a part of the solution, not a part of the problem.

Offline puneet_m

  • Multiple posting newcomer
  • *
  • Posts: 73
Re: Compiling Code Block
« Reply #11 on: August 14, 2007, 06:38:01 pm »
Thanks Biplab for your help. It got compiled successfully. But after I run update.bat, it gives the following error --

zip is not recongnized as internal or external command, operable program or batch file.
The system cannot find the file specified.

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Compiling Code Block
« Reply #12 on: August 14, 2007, 07:06:22 pm »
zip is not recongnized as internal or external command, operable program or batch file.
The system cannot find the file specified.

Download the zip.exe from the following link.
Quote
http://www.info-zip.org/Zip.html#Win32
Extract the zip file and put zip.exe in C:\MinGW\bin or any other folder mentioned in %PATH%. :)

Best Regards,

Biplab
Be a part of the solution, not a part of the problem.

Offline puneet_m

  • Multiple posting newcomer
  • *
  • Posts: 73
Re: Compiling Code Block
« Reply #13 on: August 15, 2007, 12:08:00 am »
Thanks Biplab. It is working fine now.


Offline lubos

  • Almost regular
  • **
  • Posts: 131
Re: Compiling Code Block
« Reply #14 on: August 27, 2007, 06:20:41 pm »
Please don't use Code::Blocks RC2.  8)

It's an old code which may not compile with latest wx sources. It's use is highly NOT recommended.
and its the last 'stable' release  :D