Author Topic: Include Directory  (Read 7383 times)

RLovelett

  • Guest
Include Directory
« on: December 06, 2007, 02:56:02 am »
I'm new to the whole code blocks app on linux (Ubuntu) (ran it once on Win XP two years ago for a C course I took).  Anyways, now I'm running it on my linux machine and I'm trying to get it to compile wxWidgets.  The problem is that I cannot seem to get the application to understand where my wxWidgets library is (/usr/include/wx-2.8), it keeps telling me

error: wx/app.h : No such file or directory.

I've tried adding the directory to the Linker settings of Link libraries.  I hit add and then typed that path above.  Still same errors.  Do I have to declare it as a Environment Variable?  If so how.  Any help would be greatly appreciated, thanks.  :D

Ryan

Offline sipickles

  • Multiple posting newcomer
  • *
  • Posts: 19
Re: Include Directory
« Reply #1 on: December 06, 2007, 12:12:08 pm »
error: wx/app.h : No such file or directory.

This is a compiler error, nothing to do with the linker :)

I had exactly the same problem and added these to the SEARCH DIRECTORIES :
Some progree
/usr/include/wx-2.8
/usr/lib/wx/include/base-ansi-debug-2.8

Some progress but now my problem has changed to:

In constructor 'wxBusyCursorSuspender::wxBusyCursorSuspender()':
'wxIsBusy' was not declared in this scope


hth
« Last Edit: December 06, 2007, 12:14:07 pm by sipickles »

Offline JGM

  • Lives here!
  • ****
  • Posts: 518
  • Got to practice :)
Re: Include Directory
« Reply #2 on: December 06, 2007, 01:56:20 pm »
error: wx/app.h : No such file or directory.

You could try adding this: `wx-config --cflags` on compiler settings->Other options and this:
`wx-config --libs` on Linker Settings->Other linker options

if it doesn't work try running that command on the terminal to see if you got any output -> wx-config --cflags, if you don't get any output then you don't have wxwidgets correctly installed, use the wxwidgets repositories, is more easy that compiling it and installing your self.

Offline sipickles

  • Multiple posting newcomer
  • *
  • Posts: 19
Re: Include Directory
« Reply #3 on: December 06, 2007, 07:19:07 pm »
If I do wx-config in a terminal, I get an error - not found.

If I do wx-config --libs, I get a list of packages which support this command, but they are installed (I think!)

What package installs wx-config?

Offline JGM

  • Lives here!
  • ****
  • Posts: 518
  • Got to practice :)
Re: Include Directory
« Reply #4 on: December 06, 2007, 07:29:29 pm »
What package installs wx-config?

http://wiki.wxpython.org/InstallingOnUbuntuOrDebian

this is the official up to date repository of wxwidgets

Offline pasgui

  • Almost regular
  • **
  • Posts: 165
    • LGP
Re: Include Directory
« Reply #5 on: December 06, 2007, 07:55:06 pm »
If I do wx-config in a terminal, I get an error - not found.

If I do wx-config --libs, I get a list of packages which support this command, but they are installed (I think!)

What package installs wx-config?

It is provided by the libwxgtk2.8-dev package on Ubuntu.

Best regards, pasgui

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Include Directory
« Reply #6 on: December 07, 2007, 09:09:47 am »
If I do wx-config in a terminal, I get an error - not found.

If I do wx-config --libs, I get a list of packages which support this command, but they are installed (I think!)

What package installs wx-config?

It is provided by the libwxgtk2.8-dev package on Ubuntu.

Best regards, pasgui

Actually, the package is called wx-common.
Be patient!
This bug will be fixed soon...

Offline szurilo

  • Multiple posting newcomer
  • *
  • Posts: 37
Re: Include Directory
« Reply #7 on: December 07, 2007, 02:51:30 pm »
This is strange. I remove all 'wx' thing from my distribution and CB too. Now i install wx2.8.7 and CB nightly 4699 following these pages:
http://wiki.wxpython.org/InstallingOnUbuntuOrDebian
http://jens.lody.name/debian/
When i enter wx-config --cflags the output is:
-I/usr/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1 -D__WXGTK__ -pthread
I also have the gcc error messages like this:
/usr/include/wx-2.8/wx/cursor.h   In constructor 'wxbusyCursorSuspend::wxBusyCursorSuspend()':
/usr/include/wx-2.8/wx/cursor.h   65   error: 'wxIsBusy' was not declared
etc.
My project has to be the right compiler/linker settings bec. it worked yesterday with another wx/CB combo.
What's changed?

Szurilo

Offline szurilo

  • Multiple posting newcomer
  • *
  • Posts: 37
Re: Include Directory
« Reply #8 on: December 07, 2007, 03:16:32 pm »
Ohh and wx-config --libs gives these:
-pthread   -lwx_gtk2u_richtext-2.8 -lwx_gtk2u_aui-2.8 -lwx_gtk2u_xrc-2.8 -lwx_gtk2u_qa-2.8 -lwx_gtk2u_html-2.8 -lwx_gtk2u_adv-2.8 -lwx_gtk2u_core-2.8 -lwx_baseu_xml-2.8 -lwx_baseu_net-2.8 -lwx_baseu-2.8

I think the problem is somewhere in the linking process.

Szurilo

Offline szurilo

  • Multiple posting newcomer
  • *
  • Posts: 37
Re: Include Directory
« Reply #9 on: December 07, 2007, 05:01:14 pm »
Ok problem solved.
When i uninstalled CB, i use - instead of _ in dselect so the CB configure files remained as i suppose.
I found this http://forums.codeblocks.org/index.php/topic,190.15.html where Yiannis told use the --clear-configuration parameter to start CB and clear the old conf. files. Well --clear-configuration didnt exist anymore but a --help told me to use --clean.
CB started with blank page, crashed, i closed, restarted and voila clean,rebuild,run and my program works again. Unfortunatelly this took me 4 hours ;)

Szurilo

RLovelett

  • Guest
Re: Include Directory
« Reply #10 on: December 07, 2007, 07:09:13 pm »
error: wx/app.h : No such file or directory.

You could try adding this: `wx-config --cflags` on compiler settings->Other options and this:
`wx-config --libs` on Linker Settings->Other linker options

if it doesn't work try running that command on the terminal to see if you got any output -> wx-config --cflags, if you don't get any output then you don't have wxwidgets correctly installed, use the wxwidgets repositories, is more easy that compiling it and installing your self.

I've run both of these commands in the command line,  all is well.  The problem is that I now have a new compile error.

Quote
Compiling: HelloWorldApp.cpp
g++: wx-config: No such file or directory
cclplus: error: unrecognized command line option "-fcflags"

I don't have anything I've added to either the compiler settings or linker settings that says "-fcflags", where is that coming from?

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: Include Directory
« Reply #11 on: December 07, 2007, 07:48:43 pm »
You need to add the backticks around the wx-config command: `wx-config --libs`, `wx-config --cflags` (note the ``).
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

RLovelett

  • Guest
Re: Include Directory
« Reply #12 on: December 07, 2007, 08:22:42 pm »
You need to add the backticks around the wx-config command: `wx-config --libs`, `wx-config --cflags` (note the ``).

That did it thanks so much.  I'll see if I cannot figure out what is causing my g++: no input files error.