News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

GCC 4.7 mixed with Objective-C problem

Started by labidus, August 31, 2012, 03:02:36 AM

Previous topic - Next topic

labidus

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?

ollydbg

From you post, I see only this:

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.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

labidus

Quote from: ollydbg on August 31, 2012, 03:30:07 AM
From you post, I see only this:

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

labidus

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

labidus

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 :)