Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Dec 5, 2012, 11:50 AM   #1
rabidz7
Banned
 
Join Date: Jun 2012
Location: Isla De Juventud, south Havana provence, Cincinnati Ohio
-arch

How do i choose the architecture I compile an app for? e.g. ppc, ppc64, i386, i386_64
rabidz7 is offline   0 Reply With Quote
Old Dec 5, 2012, 01:54 PM   #2
mfram
macrumors 6502a
 
Join Date: Jan 2010
Location: San Diego, CA USA
In XCode, I assume, right? Under Project Target Settings.
mfram is offline   0 Reply With Quote
Old Dec 5, 2012, 03:24 PM   #3
rabidz7
Thread Starter
Banned
 
Join Date: Jun 2012
Location: Isla De Juventud, south Havana provence, Cincinnati Ohio
Command line tool

Quote:
Originally Posted by mfram View Post
In XCode, I assume, right? Under Project Target Settings.
How would I do this in the command line compiler.
rabidz7 is offline   0 Reply With Quote
Old Dec 5, 2012, 04:32 PM   #4
karter16
macrumors member
 
Join Date: Aug 2012
Location: Auckland, New Zealand
Quote:
Originally Posted by rabidz7 View Post
How would I do this in the command line compiler.
gcc -arch i386 program.c

for example
karter16 is offline   0 Reply With Quote
Old Dec 5, 2012, 04:37 PM   #5
rabidz7
Thread Starter
Banned
 
Join Date: Jun 2012
Location: Isla De Juventud, south Havana provence, Cincinnati Ohio
Explain

Quote:
Originally Posted by karter16 View Post
gcc -arch i386 program.c

for example
So, do I do this when i type ./configure or make?
rabidz7 is offline   0 Reply With Quote
Old Dec 5, 2012, 04:48 PM   #6
karter16
macrumors member
 
Join Date: Aug 2012
Location: Auckland, New Zealand
Quote:
Originally Posted by rabidz7 View Post
So, do I do this when i type ./configure or make?
Hmmm it's a bit difficult to say without knowing exactly what you are doing.

it might pay to do some background reading on gcc, option flags, makefiles, etc. but essentially -arch is an option for gcc, which is what compiles your source code.

You need to add -arch (and your chosen architecture) to the relevant gcc calls. Without knowing your setup this is probably in the configure file or possibly directly in the makefile (although I'm guessing the way you have things setup configure is building your makefile). Anyway, I'd suggest doing background reading on whatever your workflow is so that you understand each step of what is happening :-)

Cheers

----------

Starting with something like this could be useful :-)

http://www.eupcs.org/wiki/Introduction_To_Makefiles
karter16 is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Tags
app, architecture, compile, intel, ppc

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
US Supreme Court denies Arch Coal appeal of EPA's withdrawal of WV dredge/fill permit LizKat Politics, Religion, Social Issues 1 Mar 24, 2014 12:16 PM
Arch./Interior Design Program Recommendations bedifferent Mac Applications and Mac App Store 0 Feb 4, 2014 12:41 PM

Forum Jump

All times are GMT -5. The time now is 08:29 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC