Author Topic: Building Code::Blocks Error  (Read 6507 times)

Offline sarun

  • Multiple posting newcomer
  • *
  • Posts: 14
Building Code::Blocks Error
« on: June 09, 2012, 02:19:52 pm »
I've just install Ubuntu 12.04 LTS and checkout the Code::Blocks SVN 8034. Run ./bootstrap and ./configure --with-contrib-plugins=all. It's OK. But when I run make, I got an error:
Quote
./gizmosled/src/ledctrl.cpp:17:31: fatal error: wx/gizmos/ledctrl.h: No such file or directory
compilation terminated.
make[6]: *** [ledctrl.lo] Error 1
make[5]: *** [all-recursive] Error 1
make[4]: *** [all-recursive] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1
After looking through the source tree and wxWidgets include files, I think that it's selected the wrong "include" directory for building. It should use wx in source tree (trunk/src/plugins/contrib/wxContribItems/wxled/gizmosled/include/wx/gizmos) but it's looking for include files in wxWidget installation directory, so the "gizmos" directory not found and cause the error. How could I fix this problem?


[attachment deleted by admin]

Offline xunxun

  • Almost regular
  • **
  • Posts: 187
Re: Building Code::Blocks Error
« Reply #1 on: June 09, 2012, 03:11:50 pm »
Did /usr/local/include/wx-2.8/wx/gizmos/ledctrl.h exist?

Because you set the wx include path : /usr/local/include/wx-2.8
Regards,
xunxun

Offline sarun

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: Building Code::Blocks Error
« Reply #2 on: June 09, 2012, 03:13:43 pm »
Did /usr/local/include/wx-2.8/wx/gizmos/ledctrl.h exist?

Because you set the wx include path : /usr/local/include/wx-2.8
No, it's in source tree trunk/src/plugins/contrib/wxContribItems/wxled/gizmosled/include/wx/gizmos/ledctrl.h.
Do you mean I need to move that include folder to  /usr/local/include?

Offline xunxun

  • Almost regular
  • **
  • Posts: 187
Re: Building Code::Blocks Error
« Reply #3 on: June 09, 2012, 04:24:31 pm »
Well, sorry, I thought it was wx's include file.

You can add trunk/src/plugins/contrib/wxContribItems/wxled/gizmosled/include/ to include path.

I think build system lack it with some reasons.
Regards,
xunxun

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: Building Code::Blocks Error
« Reply #4 on: June 09, 2012, 04:54:53 pm »
I will commit a fix soon (currently testing it).
Sorry for the inconvenience.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: Building Code::Blocks Error
« Reply #5 on: June 09, 2012, 05:58:07 pm »
Should be fixed in svn r8035.
Can you test it and give feedback ?

Offline sarun

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: Building Code::Blocks Error
« Reply #6 on: June 10, 2012, 03:55:25 pm »
The result is: it's still error. But thanks for the editing guidline of yours so I can fix a bug. Can you commit this edit to revision 8036?

(root)/trunk/src/plugins/contrib/wxContribItems/wxled/Makefile.am revision 8035.
Code
SUBDIRS = gizmosled/include/wx/gizmos lcdWindow/include/wx led/include/wx ledpanel/include/wx

INCLUDES = -I$(srcdir)/wxled/gizmosled/include \
 $(WX_CXXFLAGS) \
-I$(srcdir)/ledpanel/include \
-I$(srcdir)/lcdWindow/include \
-I$(srcdir)/led/include

wxcontribitemsdir=$(libdir)/codeblocks/wxContribItems

wxcontribitems_LTLIBRARIES = libwxled.la

libwxled_la_LDFLAGS = -version-info 0:1:0

libwxled_la_LIBADD = $(WX_LIBS)

libwxled_la_SOURCES = \
./gizmosled/src/ledctrl.cpp \
./lcdWindow/src/lcdwindow.cpp\
./led/src/led.cpp \
./ledpanel/src/advancedmatrixobject.cpp \
./ledpanel/src/font75.cpp \
./ledpanel/src/font77.cpp \
./ledpanel/src/matrixobject.cpp \
./ledpanel/src/wxledfont.cpp \
./ledpanel/src/wxledpanel.cpp
to
Code
SUBDIRS = gizmosled/include/wx/gizmos lcdWindow/include/wx led/include/wx ledpanel/include/wx

INCLUDES = -I$(srcdir)/gizmosled/include \
 $(WX_CXXFLAGS) \
-I$(srcdir)/ledpanel/include \
-I$(srcdir)/lcdWindow/include \
-I$(srcdir)/led/include

wxcontribitemsdir=$(libdir)/codeblocks/wxContribItems

wxcontribitems_LTLIBRARIES = libwxled.la

libwxled_la_LDFLAGS = -version-info 0:1:0

libwxled_la_LIBADD = $(WX_LIBS)

libwxled_la_SOURCES = \
./gizmosled/src/ledctrl.cpp \
./lcdWindow/src/lcdwindow.cpp\
./led/src/led.cpp \
./ledpanel/src/advancedmatrixobject.cpp \
./ledpanel/src/font75.cpp \
./ledpanel/src/font77.cpp \
./ledpanel/src/matrixobject.cpp \
./ledpanel/src/wxledfont.cpp \
./ledpanel/src/wxledpanel.cpp

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: Building Code::Blocks Error
« Reply #7 on: June 10, 2012, 04:42:18 pm »
Please use "svn diff" to create a patch next time, it's much easier to find out what has changed.

Nevertheless:
committed to trunk (svn r8036).