Author Topic: Compilation troubles with the wxWidgets and Imagemagick scripts  (Read 12856 times)

Offline Baluarte

  • Multiple posting newcomer
  • *
  • Posts: 16
Compilation troubles with the wxWidgets and Imagemagick scripts
« on: December 01, 2005, 11:42:42 pm »


Hi! I'm a very happy spanish user. Very thanks! The Codeblocks IDE is marvelous. I discovered it by chance a month ago .Now, It is a essential tool for me. The good devcpp days are over unless the codeblocks will be discontinued.
(My god! No!)

However, I have a very big trouble:

I work with MinGW/Msys and I have installed succcesfully the Imagemagick 6.2.5, WxWidgets 2.6.2 , Boost C++ 1.3.3, SDL 1.2.9, Pthreads 2.7.0... "libraries".

Until now I compiled with the GNU Make Option (no "invoked directly" and no Custom Makefile) without problems, but the option has been desactivated in the last CVS... Why? but...don't worry!

When I tried to compile mi code with the direct invocation... the 'canonical' scripts for wxWidgets and ImageMagick are not found.

In this way, I always failed with 


Project   : Plataforma-Modular
Compiler  : GNU GCC Compiler
Directory : C:\Proyectos\Plataforma-Modular\
---------------------------------------------------------------------------------------------
Switching to target: MiEjecutable
g++.exe -Wall `wx-config --cxxflags` `Magick++-config --cxxflags
--cppflags`  -Iinclude -IC:\Coreco\Sapera\Include -IC:\MinGW\include
-IC:\MinGW\include\c++ -IC:\MinGW\include\c++\3.4.4
-IC:\msys\1.0\local\include -IC:\msys\1.0\local\include\wx-2.6
-IC:\Boost\include\boost-1_33_1  -c src\CAdquisicion.cpp -o
.objs\src\CAdquisicion.o
cc1plus.exe: error: unrecognized command line option "-fcxxflags`"
cc1plus.exe: error: unrecognized command line option "-fcxxflags"
cc1plus.exe: error: unrecognized command line option "-fcppflags`"
g++.exe: `wx-config: No such file or directory
g++.exe: `Magick++-config: No such file or directory
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings

------------------------------------------------------------------------------------------------

Here is my link configuration:


`wx-config --libs`
`Magick++-config --ldflags --libs`
-lpthreadGC2
-lboost_filesystem-gcc-1_33_1
-lboost_date_time-gcc-1_33_1


I repeat: The configuration is valid and perfect! with the GNU Make. Devcpp beats this configuration without mercy. Msys directly execute the GNU make without doubts. CodeBlocks run my code without fear.

I need put in anyway the path: c:\msys\1.0\local\bin (Here is the scripts) But where is the correct place?! Any help? Thank you!


Note One: Before, I configured it in Compiler->Compiler->Programs->Additional Paths: c:\msys\1.0\local\bin & c:\msys\1.0\bin

Note Two: I don't want to move the script files.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Compilation troubles with the wxWidgets and Imagemagick scripts
« Reply #1 on: December 01, 2005, 11:46:58 pm »
cc1plus.exe: error: unrecognized command line option "-fcxxflags`"
cc1plus.exe: error: unrecognized command line option "-fcxxflags"
cc1plus.exe: error: unrecognized command line option "-fcppflags`"

Hmm... this looks like MacrosManager has screwed up here, $cxxflags and $cppflags are not getting replaced... Rick, any idea?
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline Urxae

  • Regular
  • ***
  • Posts: 376
Re: Compilation troubles with the wxWidgets and Imagemagick scripts
« Reply #2 on: December 02, 2005, 12:30:25 am »
No, the problem is he's using backticks. They're not supported when invoking the compiler directly (It's a make feature).
I would advise replacing the expressions in backticks by the result of executing the quoted commands manually from the command line.
Use compiler or global variables to make it easier to change their value if the library is ever relocated, reconfigured or upgraded.

Offline Baluarte

  • Multiple posting newcomer
  • *
  • Posts: 16
Re: Compilation troubles with the wxWidgets and Imagemagick scripts
« Reply #3 on: December 02, 2005, 01:16:49 am »

I´m very ashamed. I tried thousands of tests... But the solution is right under my very nose...

Thank you Urxae!!! You have been my blue light.

Perhaps, Thomas was confused because I didn´t explain the configuration compiler:

 `wx-config --cxxflags`
 `Magick++-config --cxxflags --cppflag`

Sorry!
Clearly, now, (he, he, he) it´s very different .

However, It is surprising that my "backticks" question was the first one. mmm... Well, I didn't find anyone.

Anyway, Thomas, Urxae, ... thanks for your very very very fast answers
and sorry for my very very very terrible english.
                                                                                                     Baluarte

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Compilation troubles with the wxWidgets and Imagemagick scripts
« Reply #4 on: December 02, 2005, 01:19:19 am »
Perhaps we could emulate the backticks when executing the commands?

Offline Urxae

  • Regular
  • ***
  • Posts: 376
Re: Compilation troubles with the wxWidgets and Imagemagick scripts
« Reply #5 on: December 02, 2005, 01:38:37 am »
Perhaps we could emulate the backticks when executing the commands?

Shouldn't be too hard to implement, but what effect would it have on performance? I don't much like the idea of spawning processes for each command line generated...
Of course, if we could assume the result of identical commands would be the same for every run in a batch job then it could be cached. Generally you can't make that assumption, but for the limited use it would probably be put to in C::B (things like wx-config and the like) it might just be good enough.
If caching is used it might be a good idea to put a warning about it somewhere though, and perhaps even a way to circumvent it.
If it isn't used (by default), perhaps there should be a different syntax to force caching? Something like ${`my-command arg1 arg2`} maybe?

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Compilation troubles with the wxWidgets and Imagemagick scripts
« Reply #6 on: December 02, 2005, 10:50:34 am »
They're not supported when invoking the compiler directly (It's a make feature).

As a matter of fact, it is supported in direct mode under unix platforms because backticks are a shell feature...
Be patient!
This bug will be fixed soon...

Offline Urxae

  • Regular
  • ***
  • Posts: 376
Re: Compilation troubles with the wxWidgets and Imagemagick scripts
« Reply #7 on: December 02, 2005, 11:34:31 am »
They're not supported when invoking the compiler directly (It's a make feature).

As a matter of fact, it is supported in direct mode under unix platforms because backticks are a shell feature...

Maybe I should have said "when invoking the compiler directly under Windows", but since we're in the Windows forum I assumed that part was given...

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Compilation troubles with the wxWidgets and Imagemagick scripts
« Reply #8 on: December 02, 2005, 11:55:20 am »
They're not supported when invoking the compiler directly (It's a make feature).

As a matter of fact, it is supported in direct mode under unix platforms because backticks are a shell feature...

Maybe I should have said "when invoking the compiler directly under Windows", but since we're in the Windows forum I assumed that part was given...


Sure, I just wanted to emphasize that this is *not* a 'make' feature, but rather the shell's...
Be patient!
This bug will be fixed soon...