Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: frankmail007 on October 01, 2008, 05:46:53 am

Title: Compiler/Linker Options doesn't work in OSX 10.5
Post by: frankmail007 on October 01, 2008, 05:46:53 am
The compiler options `wx-config --cppflags` and linker options `wx-config --libs --debug=yes` seems not working under OSX 10.5. I have to manually add the search path and flags for compiler and linker. My codeblocks is compile from the latest 8.02 source code and my wxWidgets is 2.8.9. Does anybody have this problem?

By the way, I'm also trying to compile the latest source code from SVN. The bootstrap is simply failed:

-bash ./bootstrap /bin/sh^M: bad interpreter: No Such file or directory

I used vi to replace ^M by command %s/^V^M$//g. It also doesn't work. So I used bootstrap from 8.02 souce code. But it doesn't work again in configure:

configure: Creating ./config.stats
.infig status: error: cannot find input file: Makefile

Does anybody successfully compile the latest source code from SVN? Thanks
Title: Re: Compiler/Linker Options doesn't work in OSX 10.5
Post by: frankmail007 on October 01, 2008, 06:44:39 pm
Is it a bug?
Title: Re: Compiler/Linker Options doesn't work in OSX 10.5
Post by: eranif on October 01, 2008, 07:38:01 pm
Quote
-bash ./bootstrap /bin/sh^M: bad interpreter: No Such file or directory
this is an EOL problem (End Of Line) bash expects '\n' while the file has '\r\n' (vi represents it as ^M)

run:
Code
dos2unix bootstrap

Eran
Title: Re: Compiler/Linker Options doesn't work in OSX 10.5
Post by: frankmail007 on October 06, 2008, 05:22:03 am
Quote
-bash ./bootstrap /bin/sh^M: bad interpreter: No Such file or directory
this is an EOL problem (End Of Line) bash expects '\n' while the file has '\r\n' (vi represents it as ^M)

run:
Code
dos2unix bootstrap

Eran


Thanks for your reply. Now the problem is `wx-config --cppflags` and `wx-config --libs` doesn't work. Under command line, it works. But in CB, it simply just ignore the flags. If I purposely remove the `, it will show the flag under compiling log.
Title: Re: Compiler/Linker Options doesn't work in OSX 10.5
Post by: afb on October 06, 2008, 08:20:22 am
Are you sure that `wx-config` is in the Code::Blocks search path ?
An easy way to check is to use the absolute path instead of "wx-config"

One problem is that "the resource hack" doesn't work anymore in Leopard,
so there is now no way to launch the program from a "bin" (needs bundle)

But it should still compile/link fine, just that it doesn't respond to any events.
Both the p2 release of 8.02 and the nightly build (svn 5211) work OK here...
Title: Re: Compiler/Linker Options doesn't work in OSX 10.5
Post by: frankmail007 on October 07, 2008, 05:21:30 am
Are you sure that `wx-config` is in the Code::Blocks search path ?
An easy way to check is to use the absolute path instead of "wx-config"

One problem is that "the resource hack" doesn't work anymore in Leopard,
so there is now no way to launch the program from a "bin" (needs bundle)

But it should still compile/link fine, just that it doesn't respond to any events.
Both the p2 release of 8.02 and the nightly build (svn 5211) work OK here...

I copy wx-config to /usr/bin. By the way, I also tried the CB windows version. It seems to have the same problem. ( I can't use the shell version wx-config come with compiled wxWidget. Instead, I can only use wx-config.exe. It only work if I specify `wx-config.exe`.)



Title: Re: Compiler/Linker Options doesn't work in OSX 10.5
Post by: afb on October 07, 2008, 11:02:29 am
I copy wx-config to /usr/bin.

There should have already been a wx-config there (the old one that comes with the system)
So you might want to keep your own version of it somewhere else, like in /usr/local/bin ?

It's just a symbolic link, so it doesn't matter much if you've overwritten it...
But normally /usr and /System is reserved for software installed by Apple.

So, does the copying make it work ?
Title: Re: Compiler/Linker Options doesn't work in OSX 10.5
Post by: frankmail007 on October 08, 2008, 05:06:44 am
Yes, I rename the old wx-config to wx-config.org. But it still doesn't work unless I replace the `wx-config` with its result copied from shell commnd line.
Title: Re: Compiler/Linker Options doesn't work in OSX 10.5
Post by: afb on October 08, 2008, 09:17:15 am
But it still doesn't work unless I replace the `wx-config` with its result copied from shell commnd line.

OK, so it still doesn't work with the config program in `/usr/bin/wx-config` ?.
Probably not a PATH problem then, if that isn't in the path then what is... :-)

What about using the full path ?