Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / CodeWarrior / December 2003



Tip: Looking for answers? Try searching our database.

How to use command line option with CW 9 and Mac OS x 10.2.8?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
john - 09 Dec 2003 21:12 GMT
Does anyone try following:

This might be simple question but I can't figure it out what and how to
do it in Code Warrior 9 on Mac OS X 10.2.8:

I have very simple program say:  hello.c.  I need to run this program
with all compilers on different platform (i.e On Window I use cl, Linux
gcc and Mac CW).  To do so I have python script which uses "rsh" to each
box and runs the program and stores result.  This works fine on windows
and linux. It also works fine On Mac CW 8.0 with following command line:

Mac:
Compiler command:    mwpefcc -I. -o hello.o -opt none -c -flag
dollar_identifiers -relax_pointers hello.c
and                mwpefcc -c -o console_OS_X.o console_OS_X.c

Linking command:    mwpefcc -o hello.app hello.o console_OS_X.o

Execution command:    LaunchCFMApp ./hello.app > run.output

But If I applied same command on Code warrior 9.0, it seems to be not
working during compilation console_OS_X.c.  All required enviroment
variables by mwpefcc are set (i.e. MWCIncludes, MWCPEFIncludes,
MWCPEFOptions, MWPEFLibraryFiles).

My questions are as follow:
1.    What am I doing wrong?
2.    Do I need console_OS_X.c for CW 9.0? (some of posted messages
says: "With CW 9 you will need to use the MSL_Terminal_Hook.lib instead
of SIOUX or console_OS_X.c" what does this means?) What will me my
command line/linking line and excution line will look like? (I am sorry
I just started using Codewarrior on Mac)
3.    What's purpose of console_OS_X.c?  why can't I compile hello.c
with normal way like I do with gcc (gcc -o run.out hello.c) or cl (cl /o
run.out hello.c)?

Hello.c source:
#include<stdio.h>
int main(void) {
    printf ("Hello World \n");
    return 0;
}

Thnaks you in advance for your help.
Please reply me as soon as possible since I am holding up other
implementaion.

Thanks,
MW Ron - 11 Dec 2003 19:32 GMT
John,

Write to me so I can send you a script.  Our engineer made a small
example which should help you. There is a small script included to
launch the example:

% sh run_john_script.txt

NOTE: The file "console_OS_X.c" is really only necessary for Mach-O
(MacOSX) apps -- PEF (Carbon) do not require this file. It is used to
setup Mach-O apps with run on the terminal properly on Mac OS X. Carbon
PEF apps will need a 'carb' resource added to the output to be able to
launch natively on Mac OS X. I have included one ("carb.r") but the user
can also copy one from a Carbon stationery. If this is not added then
the app will attempt to launch under "Classic Environment" mode.

Also, new with pro 9.0, the file "console_OS_X.c" is already included in
the MSL lib "MSL_All_Carbon.Lib" so it does not need to be included when
building Mach-O apps. Previously, the user had to add this file
separately.

I await hearing from you so I can send you the file.

Ron

>This might be simple question but I can't figure it out what and how to
>do it in Code Warrior 9 on Mac OS X 10.2.8:
[quoted text clipped - 42 lines]
>
>Thanks,

Signature

                                New from Metrowerks
The CodeWarrior Wireless Development Kit for Symbian OS, SEMC P900 Edition
   Easy-to-use, integrated tools and hardware for SEMC P900 Development
http://www.metrowerks.com/MW/Develop/Wireless/Symbian/SymbianWDKC.htm

Ron Liechty - MWRon@metrowerks.com - http://www.metrowerks.com

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.