[futurebasic] Command line tool

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : January 2009 : Group Archive : Group : All Groups

From: Robert Purves <listrp@...>
Date: Sat, 24 Jan 2009 10:20:49 +1300
In a different thread, Ellery Bann wrote:

> 1) Can a command line tool, e.g. otool, be of the types Universal,  
> Intel, or PPC?

$ file /usr/bin/otool
or
$ otool -h -arch all /usr/bin/otool

> 2) If so, is that type defined by a gcc switch?

-arch arch
Turn on 'Log UNIX commands' in FBtoC, and you will see, for example:
gcc Temp_Project.o _0_TranslatedRuntime.o  -o /Users/rp/Desktop/ 
test.app/Contents/MacOS/test  -arch i386 -arch ppc - 
DMAC_OS_X_VERSION_MIN_REQUIRED=1050 -mmacosx-version-min=10.5 - 
isysroot /Developer/SDKs/MacOSX10.5.sdk  -framework Carbon -framework  
QuickTime -framework IOKit -Wl,-dead_strip 2>&1

> 3) Is a command line tool defined as a Unix Executable File by  
> Finder?  How does it know?  By its binary headers?

I think that any executable file with no extension is reported as  
'Unix Executable File'. Certainly the Finder does not examine the  
content (but /usr/bin/file does).

Robert P.