Author Topic: Build errors  (Read 3910 times)

Offline Gloval

  • Single posting newcomer
  • *
  • Posts: 2
Build errors
« on: October 26, 2012, 06:00:36 pm »
Hello everyone. I have a build error with my code blocks, the build log is
*********************************************************************************
-------------- Build: Debug in Demo ---------------

g++ -Wall  -g      -c /home/li/CBProjects/571/DemoApp.cpp -o obj/Debug/DemoApp.o
In file included from /home/li/CBProjects/571/DemoApp.cpp:10:0:
/home/li/CBProjects/571/DemoApp.h:13:20: fatal error: wx/app.h: No such file or directory
compilation terminated.
Process terminated with status 1 (0 minutes, 0 seconds)
1 errors, 0 warnings
*********************************************************************************

It seems that the compiler cannot find wx/app.h . The build option

`wx-config  --version=2.8   --static=no --unicode=yes --debug=yes  --cflags`

failed to expand. But in a terminal, the option expands successfully.

li@li-P35-DS3L:~/CBProjects/571$ wx-config  --version=2.8   --static=no --unicode=yes --debug=yes  --cflags
-I/usr/local/lib/wx/include/gtk2-unicode-debug-2.8 -I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXDEBUG__ -D__WXGTK__ -pthread

By the way, when I changed the build option to
 
`wx-config  --version=2.8   --static=no --unicode=yes --cflags`

restarted CB, this error disappears (although other errors appear), but the build log shows
**************************************************************************
-------------- Build: Debug in Demo ---------------

g++ -Wall  -I/usr/lib/i386-linux-gnu/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread      -c /home/li/CBProjects/571/DemoApp.cpp -o obj/Debug/DemoApp.o
g++ -Wall  -I/usr/lib/i386-linux-gnu/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread      -c /home/li/CBProjects/571/DemoMain.cpp -o obj/Debug/DemoMain.o
........................
**************************************************************************
when I expand

wx-config  --version=2.8   --static=no --unicode=yes --cflags

in a terminal, it gives another version of wx

li@li-P35-DS3L:~/CBProjects/571$ wx-config  --version=2.8   --static=no --unicode=yes --cflags
-I/usr/local/lib/wx/include/gtk2-unicode-debug-2.8 -I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXDEBUG__ -D__WXGTK__ -pthread


Can this problem be solved? Thanks a lot!!!!!!
« Last Edit: October 26, 2012, 06:52:19 pm by Gloval »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7590
    • My Best Post
Re: Build errors
« Reply #1 on: October 26, 2012, 06:08:45 pm »
Rumor has it that the changes like yours requires Code::Blocks to be exited and restarted because the stuff between the tick marks are only read on CB start-up.

Edit: Turn on Full Compiler Logging to see what CB sends to the compiler.

Tim S.

« Last Edit: October 26, 2012, 07:04:19 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Gloval

  • Single posting newcomer
  • *
  • Posts: 2
Re: Build errors
« Reply #2 on: October 26, 2012, 06:39:56 pm »
Thanks a lot. I tried restarting CB but the error still exists.

I also tried replacing

`wx-config  --version=2.8 --static=no --unicode=yes --debug=yes --cflags`

with

-I/usr/local/lib/wx/include/gtk2-unicode-debug-2.8 -I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXDEBUG__ -D__WXGTK__ -pthread

then the build log seems normal

-------------- Build: Debug in Demo ---------------

g++ -Wall  -I/usr/local/lib/wx/include/gtk2-unicode-debug-2.8 -I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXDEBUG__ -D__WXGTK__ -pthread     -c /home/li/CBProjects/571/DemoApp.cpp -o obj/Debug/DemoApp.o