Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » How to build universal binaries on OSX?
How to build universal binaries on OSX? [message #212447] Sun, 23 March 2008 19:52 Go to next message
Eclipse UserFriend
Originally posted by: jens.ja-web.de

hello,

I use eclipse cdt (5.0) to build plugins for X-Plane (shared libs). I
have CDT set up and running on WinXP, Linux and OS X 10.4 PPC.

One final piece is missing: the shared lib created on OS X seems to be
powerPC only and I need it to be cross-plattform PPC+Intel = universal
binary.

Looks like I have to specify the two platforms as target for GCC but I
cannot figure out where in the CDT project settings I have to put this
options.

(so far I used xcode on this mac to build universal but I'd rather like
use CDT to be consistent across all three platforms)

thanks
Re: How to build universal binaries on OSX? [message #212591 is a reply to message #212447] Tue, 25 March 2008 15:10 Go to previous messageGo to next message
Mike Jackson is currently offline Mike JacksonFriend
Messages: 128
Registered: July 2009
Senior Member
On 2008-03-23 15:52:12 -0400, Jens Ansorg <jens@ja-web.de> said:

> hello,
>
> I use eclipse cdt (5.0) to build plugins for X-Plane (shared libs). I
> have CDT set up and running on WinXP, Linux and OS X 10.4 PPC.
>
> One final piece is missing: the shared lib created on OS X seems to be
> powerPC only and I need it to be cross-plattform PPC+Intel = universal
> binary.
>
> Looks like I have to specify the two platforms as target for GCC but I
> cannot figure out where in the CDT project settings I have to put this
> options.
>
> (so far I used xcode on this mac to build universal but I'd rather like
> use CDT to be consistent across all three platforms)
>
> thanks

I do this by adding one more piece to the puzzle: CMake.
(www.cmake.org). CMake will generate the makefiles for CDT to use, and
in those makefiles is the ability to create Universal binaries.

Actually, if there is a section in eclipse to add c/c++ flags, add
"-arch ppc -arch i386" and gcc _should_ build a universal binary for
you.

Mike
Re: How to build universal binaries on OSX? [message #216829 is a reply to message #212591] Fri, 30 May 2008 09:04 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jens.ja-web.de

Mike Jackson wrote:
> On 2008-03-23 15:52:12 -0400, Jens Ansorg <jens@ja-web.de> said:
>
>> hello,
>>
>> I use eclipse cdt (5.0) to build plugins for X-Plane (shared libs). I
>> have CDT set up and running on WinXP, Linux and OS X 10.4 PPC.
>>
>> One final piece is missing: the shared lib created on OS X seems to be
>> powerPC only and I need it to be cross-plattform PPC+Intel = universal
>> binary.

>
> I do this by adding one more piece to the puzzle: CMake.
> (www.cmake.org). CMake will generate the makefiles for CDT to use, and
> in those makefiles is the ability to create Universal binaries.
>
> Actually, if there is a section in eclipse to add c/c++ flags, add
> "-arch ppc -arch i386" and gcc _should_ build a universal binary for you.
>
> Mike
>

hi,
finally I got around to try this. But I get an error

Invoking: GCC C Compiler
gcc -DAPL=1 -O0 -g3 -Wall -c - fmessage-length=0 -arch ppc -arch i386
-MMD -MP -MF"SimDataSender/SimDataSender.d"
-MT"SimDataSender/SimDataSender.d" -o"SimDataSender/
SimDataSender.o" "../SimDataSender/SimDataSender.c"

gcc: -E, -S, -save-temps and -M options are not allowed with multiple
-arch flags


So the next question: how to get rid of those -Msomething flags? I see
nothing in the eclipse build configuration that relates to those flags.
(using CDT Ganymede M1 by now)

An ideas?

thank you
Jens
Re: How to build universal binaries on OSX? [message #216859 is a reply to message #216829] Fri, 30 May 2008 21:15 Go to previous message
Mike Jackson is currently offline Mike JacksonFriend
Messages: 128
Registered: July 2009
Senior Member
On 2008-05-30 05:04:24 -0400, Jens Ansorg <jens@ja-web.de> said:

> Mike Jackson wrote:
>> On 2008-03-23 15:52:12 -0400, Jens Ansorg <jens@ja-web.de> said:
>>
>>> hello,
>>>
>>> I use eclipse cdt (5.0) to build plugins for X-Plane (shared libs). I
>>> have CDT set up and running on WinXP, Linux and OS X 10.4 PPC.
>>>
>>> One final piece is missing: the shared lib created on OS X seems to be
>>> powerPC only and I need it to be cross-plattform PPC+Intel = universal
>>> binary.
>
>>
>> I do this by adding one more piece to the puzzle: CMake.
>> (www.cmake.org). CMake will generate the makefiles for CDT to use, and
>> in those makefiles is the ability to create Universal binaries.
>>
>> Actually, if there is a section in eclipse to add c/c++ flags, add
>> "-arch ppc -arch i386" and gcc _should_ build a universal binary for
>> you.
>>
>> Mike
>>
>
> hi,
> finally I got around to try this. But I get an error
>
> Invoking: GCC C Compiler
> gcc -DAPL=1 -O0 -g3 -Wall -c - fmessage-length=0 -arch ppc -arch i386
> -MMD -MP -MF"SimDataSender/SimDataSender.d"
> -MT"SimDataSender/SimDataSender.d" -o"SimDataSender/
> SimDataSender.o" "../SimDataSender/SimDataSender.c"
>
> gcc: -E, -S, -save-temps and -M options are not allowed with multiple
> -arch flags
>
>
> So the next question: how to get rid of those -Msomething flags? I see
> nothing in the eclipse build configuration that relates to those flags.
> (using CDT Ganymede M1 by now)
>
> An ideas?
>
> thank you
> Jens

Nope.. I use CMake and let Eclipse use the makefiles generated from
that. I would say look deep in the compiler options flags.

mike
Previous Topic:Importing a Qt-project from FAT32 partition
Next Topic:using arm-elf-gcc with eclipse/CDT
Goto Forum:
  


Current Time: Sat Jul 13 17:04:12 GMT 2024

Powered by FUDForum. Page generated in 0.04398 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top