Author Topic: linux and pch  (Read 6633 times)

Offline frithjofh

  • Regular
  • ***
  • Posts: 376
linux and pch
« on: December 20, 2007, 09:06:46 pm »
hi everybody,

i'm a bit ashamed, but i surrender: I'm using c::b 4707 on a suse 10.3 x86_64 installation and i can set up and compile and run a simple wxwidgets project generated with the wizard. but when i generate the same project, all settings identical, only changing to use precompiled headers i get the error:

./wx_pch.h         line 14      error: wx/wxprec.h: file not found

the file does exist, it is in a directory supposedly included by the wx-config --cflags

i searched through the forum and found many related topics, but i don't seem to be able to mine the necessary information from it  :(

please help me somebody

regards

nausea
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100

Offline frithjofh

  • Regular
  • ***
  • Posts: 376
Re: linux and pch
« Reply #1 on: December 23, 2007, 04:38:45 pm »
please, somebody give me a hint... :)
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: linux and pch
« Reply #2 on: December 23, 2007, 04:45:52 pm »
What does...
the wx-config --cflags
...output on a console?
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline frithjofh

  • Regular
  • ***
  • Posts: 376
Re: linux and pch
« Reply #3 on: December 23, 2007, 05:44:50 pm »
hi and thanks for the reply,

allready felt a bit deserted ...  :D

the output of wx-config --cflags is this:

-I/usr/lib64/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread

so far a standard wxwidgets project without pch enabled works fine as stated above...

greetings from asturias y feliz navidad

nausea
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100

Offline frithjofh

  • Regular
  • ***
  • Posts: 376
Re: linux and pch
« Reply #4 on: December 30, 2007, 07:15:22 pm »
hello, everybody,

i don't get it. is the solution of mi problem taht obvious, that this thread is regarded closed? but why don't i see it ??

please, i'm begin to feel more stupid on daily basis

regads

nausea
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: linux and pch
« Reply #5 on: December 30, 2007, 09:00:24 pm »
The file "/usr/include/wx-2.8/wx/wxprec.h" definitely exists?

Can you post the full command-line from the build log?

You might have to turn full command line logging on in "Settings -> Compiler and debugger ... -> Global compiler settings -> Other settings -> Compiler logging".
"Other setings" is the rightmost tab in "Global compiler settings".

Offline frithjofh

  • Regular
  • ***
  • Posts: 376
Re: linux and pch
« Reply #6 on: December 31, 2007, 01:28:36 am »
hi everybody,

i have to apologize: aparently the problem was not the pch function, but the checkbox advanced options in the  scripted wizard. i'm working under suse x86_64 on an amd 64 x2 4200 with the revision 4716. i made a test suite of the posible combinations and the variant with the pch enabled definitivly works same as with pch disabled... :oops: :oops: :oops: really ashamed. i opened a project from my windows box to try how it might be working on linux only and it must have happend somewhere around then, just slipped my mind...

still strange: it seems that this advanced options checkbox does only harm on linux even if i don't choose any suboption of that part of the wizzard (there are: use shared library and use unicode build if i remember ...). the project then just does not compile. the only differences in the projects build options are that instead of having the sole `wx-config --cflags` and `wx-config --libs` under its correct place in the respective tabs of the project, they are moved to the build targets and somewhat extended: `wx-config --version=2.8 --static=yes --unicode=yes --debug=yes --cflags` and `wx-config --version=2.8 --static=yes --unicode=yes --debug=yes --libs` in the case of debug target and build target respectively.

so, sorry again for all the panic ... and: whats wrong with that advanced options in the wizzard under linux ????

regards

nausea
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: linux and pch
« Reply #7 on: December 31, 2007, 09:54:55 am »
Have you run the second "wx-config "-line on console ?
I think you don't have a statically linked debug versin of wxWidgets and then the appropriate directory to include is not on disk.
Here is what happened when I run it in a console ( I have the debug-version installed, but to get a statically linked version I would have to compile it myself, but statically linked wx-Widgets is quite large):
Code
jens@debian-inspiron:~$ wx-config --version=2.8 --static=yes --unicode=yes --debug=yes --cflags

  Warning: No config found to match: /usr/bin/wx-config --version=2.8 --static=yes --unicode=yes --debug=yes --cflags
           in /usr/lib/wx/config
  If you require this configuration, please install the desired
  library build.  If this is part of an automated configuration
  test and no other errors occur, you may safely ignore it.
  You may use wx-config --list to see all configs available in
  the default prefix.


Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: linux and pch
« Reply #8 on: December 31, 2007, 10:06:07 am »
As Jens have posted the solution, I'm not repeating it.

Unfortunately wx wizard doesn't check for missing configuration as it does on Windows. There are some reasons for not doing so. That was the reason of not checking the Advanced option by default in the wizard. When you are using the Advanced option on Linux or Mac, you must make sure that the configuration you want to use exists on your system. :)
Be a part of the solution, not a part of the problem.