User forums > Help

Errors on Linux when compiling SVN 3795

(1/2) > >>

bughunter2:
The problem is that, when following all instructions given at the Wiki, the compilation of Code::Blocks failed. But on my Windows XP SP2 system, it did work (with the same SVN build - 3795).

I'm using a Slackware 11 system. I have followed all instructions from the Wiki to install wxGTK and it installed successfully. I had to use the '--disable-pch' option for './configure' otherwise the command 'make' failed at some file called 'scriptbindings.XXX' with the error 'had to relocate PCH'.

However, I fixed the PCH error, and continued compiling using 'make', then it failed. It failed compiling the file 'infowindow.cpp', line 165. It says 'wxStaticBitmap' was undeclared.

I fixed the error adding the following line

--- Code: ---#include <wx/wx.h>
--- End code ---
after the following line:

--- Code: ---#ifndef CB_PRECOMP
--- End code ---

I think it is reproducable. I'm using SVN build 3795. I actually haven't got any idea since which version this error occurred since I never before compiled Code::Blocks on a Linux system.

After adding the line I described above, the compilation got another error when compiling 'help_plugin.cpp', it got the following error:


--- Code: ---help_plugin.cpp: In member function `void HelpPlugin::LaunchHelp(const wxString&, bool, const wxString&)':
help_plugin.cpp:373: error: invalid use of undefined type `struct MacrosManager'
../../../../src/include/manager.h:23: error: forward declaration of `struct MacrosManager'

--- End code ---

EDIT: I configured Code::Blocks using './configure --enable-contrib --disable-pch', this might be needed to know, since the 'help_plugin' belongs to the plugins which are only build when '--enable-contrib' is specified (correct me if this isn't true).

Anyone has any idea why it's working on my Windows system but not on Linux?

stahta01:
This is a common issue for stuff I do. I do NOT do Linux much.
Windows build does the opposite of --disable-pch ; Most Linux uses do --disable-pch this results in missing headers files that need to be added for Linux Build like you did.

Just report them to BerliOS or to the nightly build forum. Please mention how you are doing the Build and which SVN & Linux & wxWidgets Version.

Note, It will work best if you can create an Patch file to post or submit.

Tim S

bughunter2:
I reinstalled GTK+ and followed the tutorial on the Wiki again to install Code::Blocks (from SVN).

The previous issue disappeared (maybe it was fixed in the SVN or I did something wrong previously?).


This time I have this error:
In file included from codesnippets.cpp:42:
/opt/wx/2.6/include/wx-2.6/wx/gtk/win_gtk.h:18:21: gdk/gdk.h: No such file or directory
/opt/wx/2.6/include/wx-2.6/wx/gtk/win_gtk.h:19:22: gdk/gdkx.h: No such file or directory
/opt/wx/2.6/include/wx-2.6/wx/gtk/win_gtk.h:20:30: gtk/gtkcontainer.h: No such file or directory
/opt/wx/2.6/include/wx-2.6/wx/gtk/win_gtk.h:21:31: gtk/gtkadjustment.h: No such file or directory
.......... more errors ..........

The build command that generated the error was:
g++ -DHAVE_CONFIG_H -I. -I. -I../../../../src/include -I/opt/wx/2.6/lib/wx/include/gtk2-unicode-release-2.6 -I/opt/wx/2.6/include/wx-2.6 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1 -DNO_GCC_PRAGMA -I../../../../src/include -I../../../../src/include/wxscintilla/include -I../../../../src/include/wxFlatNotebook/include -Ulinux -Uunix -O2 -ffast-math -g -O2 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -MT codesnippets.lo -MD -MP -MF .deps/codesnippets.Tpo -c codesnippets.cpp  -fPIC -DPIC -o .libs/codesnippets.o


I think it can't find the GTK+ installation. I have installed GTK+ to /opt/gtk and I have verified that the installation works by compiling other GTK+ applications.

Any help would be greatly appreciated.

Pecan:
In the Makefile.am for CodeSnippets make sure the following lines
are near the top


--- Code: ---INCLUDES = $(WX_CXXFLAGS) \
        $(WX_GTK2_CFLAGS) \
-I$(top_srcdir)/src/include \
-I$(top_srcdir)/src/include/wxscintilla/include \
        -I$(top_srcdir)/src/include/wxFlatNotebook/include


--- End code ---

bughunter2:
This part:


--- Code: --- $(WX_GTK2_CFLAGS) \
--- End code ---

between...


--- Code: ---INCLUDES = $(WX_CXXFLAGS) \
--- End code ---

...and...


--- Code: ----I$(top_srcdir)/src/include \
--- End code ---

...was missing, why is it needed for codesnippets and not for other plugins?

By the way is it okay if I create a patch and submit it?

EDIT: The only other Makefile.am I found using WX_GTK2_CFLAGS is debuggergdb's one.

Navigation

[0] Message Index

[#] Next page

Go to full version