Author Topic: Code::Blocks doesn't compile on Ubuntu Linux with wx 2.5  (Read 39617 times)

Offline Funto

  • Multiple posting newcomer
  • *
  • Posts: 81
Code::Blocks doesn't compile on Ubuntu Linux with wx 2.5
« on: July 25, 2005, 05:02:12 pm »
I'm trying to compile Code::Blocks on my Ubuntu Linux Hoary system, with wxWidgets 2.5.3 but it doesn't work; most of the problems are due to the wxString class, and using the _() macro solves the problem; however there are a lot of wxStrings in the project...

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Code::Blocks doesn't compile on Ubuntu Linux with wx 2.5
« Reply #1 on: July 25, 2005, 05:25:08 pm »
Yes, it's a known problem. Codeblocks doesn't support unicode yet.

The tested configuration is wxwidgets 2.6.1 (with the patch) compiled WITHOUT unicode support. The compilation instructions are in the wiki.

Offline Funto

  • Multiple posting newcomer
  • *
  • Posts: 81
Re: Code::Blocks doesn't compile on Ubuntu Linux with wx 2.5
« Reply #2 on: July 25, 2005, 06:36:24 pm »
Ok...so if I want to compile I have to change my wxWidgets installation :(

When do you think Code::Blocks is going to support Unicode mode?
Oh yet another thing : is it planned for it to support cross-compiling with MinGW under Linux?

PS : this IDE is really, really a great work, thanks for it, I think it's going to become my main IDE under both platforms :)
PS2 : what do you think about adding SCons support via a plug-in?

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: Code::Blocks doesn't compile on Ubuntu Linux with wx 2.5
« Reply #3 on: July 25, 2005, 06:45:05 pm »
Ok...so if I want to compile I have to change my wxWidgets installation :(

When do you think Code::Blocks is going to support Unicode mode?

After 1.0 is released, which won't be long (RC1 will be released today).

PS2 : what do you think about adding SCons support via a plug-in?

You might want to talk with RShadow. He 's creating a SCons build system for C::B, but not a plugin AFAIK. Search the forums for SCons to find the topic.

Yiannis.
Be patient!
This bug will be fixed soon...

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: Code::Blocks doesn't compile on Ubuntu Linux with wx 2.5
« Reply #4 on: July 25, 2005, 06:55:43 pm »
Funto,

did you install wx2.5.3 with apt-get?
Because I have yet to see a binary wx package supporting gtk2 (C::B only supports gtk2)...
I suggest you download wxGTK-2.6.1 and build it. It's trivial to compile and a *lot* newer than 2.5.3 you 're currently using.

From personal experience though, the most stable C::B under linux is with wxGTK-2.4.2.

Yiannis.

PS: I use Ubuntu 5.04 too and I 'm *thinking* of releasing a .deb for it.
Be patient!
This bug will be fixed soon...

Offline Funto

  • Multiple posting newcomer
  • *
  • Posts: 81
Re: Code::Blocks doesn't compile on Ubuntu Linux with wx 2.5
« Reply #5 on: July 25, 2005, 07:16:38 pm »
Wooow there even will be a SCons support O_o
That's amazing, it's the best IDE I know...:)
I've just imported my existing SCons-Linux/VC++-Windows project under Code::Blocks, no problem, the importer works well...congrats ;)

Quote
did you install wx2.5.3 with apt-get?
Yes, I did.

Quote
Because I have yet to see a binary wx package supporting gtk2 (C::B only supports gtk2)...
Under Ubuntu, the wx-2.4 package only supports GTK1 and is compiled in ANSI mode while the wx-2.5 package uses Unicode and GTK2.

Well, I think I will compile wx 2.6/GTK2 by myself and install it in ANSI mode...

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Code::Blocks doesn't compile on Ubuntu Linux with wx 2.5
« Reply #6 on: July 25, 2005, 07:22:43 pm »
PS: I use Ubuntu 5.04 too and I 'm *thinking* of releasing a .deb for it.

I vote for that one! :)

Offline Funto

  • Multiple posting newcomer
  • *
  • Posts: 81
Re: Code::Blocks doesn't compile on Ubuntu Linux with wx 2.5
« Reply #7 on: July 25, 2005, 07:54:47 pm »
Just a tip about porting to Unicode : wxString::c_str() and wxString::fn_str() are different, c_str() is used when passing argument to a wx function/method while fn_str() is used when passing it to normal C functions.

Offline Funto

  • Multiple posting newcomer
  • *
  • Posts: 81
Re: Code::Blocks doesn't compile on Ubuntu Linux with wx 2.5
« Reply #8 on: July 26, 2005, 01:40:17 am »
There isn't any "--disable-unicode" option in wxGTK2.6's ./configure !

If I want to compile it under Linux it seems that I have to use the old wxGTK 2.4...

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: Code::Blocks doesn't compile on Ubuntu Linux with wx 2.5
« Reply #9 on: July 26, 2005, 08:56:14 am »
There isn't any "--disable-unicode" option in wxGTK2.6's ./configure !

If I want to compile it under Linux it seems that I have to use the old wxGTK 2.4...
I don't use any unicode switch in the configure line and it compiles as ansi.
I think you must explicitely use --enable-unicode...

Yiannis.
Be patient!
This bug will be fixed soon...

Offline Funto

  • Multiple posting newcomer
  • *
  • Posts: 81
Re: Code::Blocks doesn't compile on Ubuntu Linux with wx 2.5
« Reply #10 on: July 26, 2005, 01:18:49 pm »
Ah...I didn't know this :D

Nevertheless I will keep trying to compile this with wx 2.4, as it seems that you still experience problems with 2.6 no?

Offline Funto

  • Multiple posting newcomer
  • *
  • Posts: 81
Re: Code::Blocks doesn't compile on Ubuntu Linux with wx 2.5
« Reply #11 on: July 26, 2005, 01:44:59 pm »
After compiling wxDockit, having to hack the code, and adding the -lwxdockit and -I./src/wxDockit/include options to Makefile.unix, I get this :
Quote
[email protected]:~/Desktop/codeblocks-1.0-RC1/src $ make -f Makefile.unix clean
Cleaning target tinyXML...
Cleaning target sdk...
Cleaning target src...
Cleaning target plugin_Astyle...
Cleaning target plugin_CompilerGCC...
Cleaning target plugin_DebuggerGDB...
Cleaning target plugin_CodeCompletion...
Cleaning target plugin_ClassWizard...
Cleaning target plugin_DefMimeHandler...
Cleaning target plugin_PluginsWizard...
Cleaning target plugin_ToDo...
Cleaning target plugin_XPManifest...
Cleaning target console_runner...
[email protected]:~/Desktop/codeblocks-1.0-RC1/src $ make -f Makefile.unix
Compiling sdk/tinyxml/tinystr.cpp...
Compiling sdk/tinyxml/tinyxml.cpp...
Compiling sdk/tinyxml/tinyxmlerror.cpp...
Compiling sdk/tinyxml/tinyxmlparser.cpp...
Linking static library sdk/tinyxml/libtxml.a...
ar: création de sdk/tinyxml/libtxml.a
ranlib sdk/tinyxml/libtxml.a
Compiling sdk/Managers/Managers.cpp...
Compiling sdk/Managers/StdAfx.cpp...
Compiling sdk/autodetectcompilers.cpp...
Compiling sdk/cbeditor.cpp...
Compiling sdk/cbeditorprintout.cpp...
Compiling sdk/cbplugin.cpp...
Compiling sdk/cbproject.cpp...
Compiling sdk/cbworkspace.cpp...
Compiling sdk/compileoptionsbase.cpp...
Compiling sdk/compiler.cpp...
Compiling sdk/compilerfactory.cpp...
Compiling sdk/compileroptions.cpp...
Compiling sdk/compiletargetbase.cpp...
Compiling sdk/configmanager.cpp...
Compiling sdk/configuretoolsdlg.cpp...
Compiling sdk/confirmreplacedlg.cpp...
Compiling sdk/devcpploader.cpp...
Compiling sdk/editarrayfiledlg.cpp...
Compiling sdk/editarrayorderdlg.cpp...
Compiling sdk/editarraystringdlg.cpp...
Compiling sdk/editorbase.cpp...
Compiling sdk/editorcolorset.cpp...
Compiling sdk/editorconfigurationdlg.cpp...
sdk/editorconfigurationdlg.cpp:522:10: attention : #warning "wxComboBox::SetString() doesn't work under non-win32 platforms"
Compiling sdk/editorlexerloader.cpp...
Compiling sdk/editormanager.cpp...
sdk/editormanager.cpp: Dans member function « void
   EditorManager::ActivateNext() »:
sdk/editormanager.cpp:448: attention : comparison between signed and unsigned
   integer expressions
sdk/editormanager.cpp: Dans member function « int
   EditorManager::FindPageFromEditor(EditorBase*) »:
sdk/editormanager.cpp:648: attention : comparison between signed and unsigned
   integer expressions
Compiling sdk/editpathdlg.cpp...
Compiling sdk/edittooldlg.cpp...
Compiling sdk/filegroupsandmasks.cpp...
Compiling sdk/finddlg.cpp...
Compiling sdk/globals.cpp...
Compiling sdk/importers_globals.cpp...
Compiling sdk/incrementalselectlistdlg.cpp...
Compiling sdk/macrosmanager.cpp...
Compiling sdk/managedthread.cpp...
Compiling sdk/manager.cpp...
Compiling sdk/menuitemsmanager.cpp...
Compiling sdk/messagelog.cpp...
Compiling sdk/messagemanager.cpp...
Compiling sdk/msvc7loader.cpp...
Compiling sdk/msvc7workspaceloader.cpp...
Compiling sdk/msvcloader.cpp...
Compiling sdk/msvcworkspaceloader.cpp...
Compiling sdk/multiselectdlg.cpp...
Compiling sdk/newfromtemplatedlg.cpp...
Compiling sdk/personalitymanager.cpp...
Compiling sdk/pipedprocess.cpp...
Compiling sdk/pluginmanager.cpp...
Compiling sdk/pluginsconfigurationdlg.cpp...
Compiling sdk/printing_types.cpp...
Compiling sdk/projectbuildtarget.cpp...
Compiling sdk/projectfileoptionsdlg.cpp...
Compiling sdk/projectlayoutloader.cpp...
Compiling sdk/projectloader.cpp...
Compiling sdk/projectmanager.cpp...
Compiling sdk/projectoptionsdlg.cpp...
Compiling sdk/projectsfilemasksdlg.cpp...
Compiling sdk/projecttemplateloader.cpp...
Compiling sdk/replacedlg.cpp...
Compiling sdk/sdk_events.cpp...
Compiling sdk/searchresultslog.cpp...
Compiling sdk/selecttargetdlg.cpp...
Compiling sdk/simplelistlog.cpp...
Compiling sdk/simpletextlog.cpp...
Compiling sdk/templatemanager.cpp...
Compiling sdk/toolsmanager.cpp...
Compiling sdk/workspaceloader.cpp...
Compiling sdk/xtra_classes.cpp...
Compiling sdk/xtra_res.cpp...
Linking shared library devel/libcodeblocks.so...
Compiling src/app.cpp...
src/resources/icons/app.xpm:2: attention : `char*app[44]' defined but not used
Compiling src/dlgabout.cpp...
Compiling src/dlgaboutplugin.cpp...
Compiling src/environmentsettingsdlg.cpp...
Compiling src/impexpconfig.cpp...
Compiling src/main.cpp...
Compiling src/prefix.c...
Compiling src/printdlg.cpp...
Compiling src/startherepage.cpp...
Linking executable devel/codeblocks.exe...
devel/libcodeblocks.so: undefined reference to `CustomVars::~CustomVars [in-charge]()'
devel/libcodeblocks.so: undefined reference to `CustomVars::Load(wxString const&)'
devel/libcodeblocks.so: undefined reference to `VarsArray::operator=(VarsArray const&)'
devel/libcodeblocks.so: undefined reference to `VarsArray::VarsArray[in-charge](VarsArray const&)'
devel/libcodeblocks.so: undefined reference to `CustomVars::Add(wxString const&, wxString const&)'
devel/libcodeblocks.so: undefined reference to `CustomVars::CustomVars[in-charge]()'
devel/libcodeblocks.so: undefined reference to `ExternalDepsDlg::~ExternalDepsDlg [in-charge]()'
devel/libcodeblocks.so: undefined reference to `ExternalDepsDlg::ExternalDepsDlg[in-charge](wxWindow*, cbProject*, ProjectBuildTarget*)'
devel/libcodeblocks.so: undefined reference to `CustomVars::Save(wxString const&)'
collect2: ld a retourné 1 code d'état d'exécution
make: *** [devel/codeblocks.exe] Erreur 1

What should I do to continue the compilation process?? Here I'm stuck...

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Code::Blocks doesn't compile on Ubuntu Linux with wx 2.5
« Reply #12 on: July 26, 2005, 03:50:52 pm »
Are you sure you obtained the VERSION_1_0 branch from CVS? This is the one used to compile version 1.0.

CVS HEAD needs wxwidgets 2.6.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: Code::Blocks doesn't compile on Ubuntu Linux with wx 2.5
« Reply #13 on: July 26, 2005, 06:59:16 pm »
Are you sure you obtained the VERSION_1_0 branch from CVS? This is the one used to compile version 1.0.

CVS HEAD needs wxwidgets 2.6.

Rick is right. Up-to-date is VERSION_1_0 and Makefile.unix (for wx2.4). Or you could just download the source package and avoid using CVS.

Yiannis.
Be patient!
This bug will be fixed soon...

Offline Funto

  • Multiple posting newcomer
  • *
  • Posts: 81
Re: Code::Blocks doesn't compile on Ubuntu Linux with wx 2.5
« Reply #14 on: July 26, 2005, 07:13:25 pm »
I've just downloaded the source package and get these errors when doing make -f Makefile.unix :

Quote
Linking executable devel/codeblocks.exe...
devel/libcodeblocks.so: undefined reference to `CustomVars::~CustomVars [in-charge]()'
devel/libcodeblocks.so: undefined reference to `CustomVars::Load(wxString const&)'
devel/libcodeblocks.so: undefined reference to `VarsArray::operator=(VarsArray const&)'
devel/libcodeblocks.so: undefined reference to `VarsArray::VarsArray[in-charge](VarsArray const&)'
devel/libcodeblocks.so: undefined reference to `CustomVars::Add(wxString const&, wxString const&)'
devel/libcodeblocks.so: undefined reference to `CustomVars::CustomVars[in-charge]()'
devel/libcodeblocks.so: undefined reference to `ExternalDepsDlg::~ExternalDepsDlg [in-charge]()'
devel/libcodeblocks.so: undefined reference to `ExternalDepsDlg::ExternalDepsDlg[in-charge](wxWindow*, cbProject*, ProjectBuildTarget*)'
devel/libcodeblocks.so: undefined reference to `CustomVars::Save(wxString const&)'
collect2: ld a retourné 1 code d'état d'exécution
make: *** [devel/codeblocks.exe] Erreur 1

Where did you put wxDockit??