Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: labidus on August 31, 2012, 03:02:36 am

Title: GCC 4.7 mixed with Objective-C problem
Post by: labidus on August 31, 2012, 03:02:36 am
Recently I wanted to work with C++11 standard, I installed GCC 4.7 on my mac with MacPorts

All my C++ file work great but I only have 3 .mm file that was previously compiled without error using GCC 4.2 but with GCC 4.7
nothing work.

But I dont know why,here the actual compile line used by C::B:
gcc-mp-4.7  -g -fopenmp -std=c++11 -DDEBUG    -I/opt/local/include/libxml2 -I/usr/local/include  -c xxx.mm -o obj/Debug/xxx.mm.o

The filename is not xxx, anyway, I also try to use from the file property to use a different compiler without success, my option are ignored and never saved so
they always use the compiler option from the main project...

I get a bunch of error like this:
/System/Library/Frameworks/Foundation.framework/Headers/NSTask.h:75:24: error: expected unqualified-id before '^' token
/System/Library/Frameworks/Foundation.framework/Headers/NSTask.h:75:24: error: expected ')' before '^' token

Why GCC 4.7 give problem compared to 4.2?
Title: Re: GCC 4.7 mixed with Objective-C problem
Post by: ollydbg on August 31, 2012, 03:30:07 am
From you post, I see only this:
Code
I also try to use from the file property to use a different compiler without success, my option are ignored and never saved so
they always use the compiler option from the main project...
is related to C::B.  :)

About the build error, I think you should ask in gcc help maillist.
Title: Re: GCC 4.7 mixed with Objective-C problem
Post by: labidus on August 31, 2012, 03:48:16 am
From you post, I see only this:
Code
I also try to use from the file property to use a different compiler without success, my option are ignored and never saved so
they always use the compiler option from the main project...
is related to C::B.  :)

About the build error, I think you should ask in gcc help maillist.

Yes related to C::B :) because I cannot set custom compiler option to the .mm file, the change are never saved and they always use the project option instead

But i am pretty sure someone here got a similar issue and know what I can do to resolve this issue
Title: Re: GCC 4.7 mixed with Objective-C problem
Post by: labidus on August 31, 2012, 04:34:56 am
I also try to change the command line from the main code block setting compiler option with different type of file
but none of the change I do is saved, I always end up with a white text box whenever I return back to the advanced option window from settings -> compiler debugger -> others settings -> advance
Title: Re: GCC 4.7 mixed with Objective-C problem
Post by: labidus on August 31, 2012, 05:23:44 am
I finally was able to add one, you must enter only one extension, if you add m;mm it will not work, only mm, make the custom build option to work

Now it compile but i have other issue to resolve, at least its better then 2 hours ago :)