amiga.org
     
iconAll times are GMT -6. The time now is 02:18 PM. | Welcome to Forum, please register to access all of our features.

» Amiga.org » Operating System Specific Discussions » MorphOS » MorphOS -- Development Support » Super Newbie C questions & MorphOS SDK

MorphOS -- Development Support This forum is to allow the discussion of development tools and help for MorphOS

Reply
 
Thread Tools Display Modes
Old 09-02-2010, 10:45 AM   #1
JJ
Lifetime Member
Points: 20,996, Level: 91 Points: 20,996, Level: 91 Points: 20,996, Level: 91
Activity: 41% Activity: 41% Activity: 41%
 
JJ's Avatar
 
Join Date: Feb 2002
Location: Wales, UK
Posts: 3,758
Default Super Newbie C questions & MorphOS SDK

Posted this on MorphZone also but more help the better


Hi All

Trying to learn C with the C for dummies book and the MorphOS SDK.

Entered first bit of code and try and complie and get an error about missing makefile.

How do I create this ?

Sorry my programming skills are in Basic only so please be gentle.

Code below. Could be the next must have app


#include <stdio.h>

int main()
{
printf("goodbye, cruel world!\n);
return(0);
}
__________________
“We don't stop playing because we grow old; we grow old because we stop playing.” - George Bernard Shaw

Xbox Live: S0ulA55a551n2

Registered MorphsOS 3.7 user
JJ is offline   Reply With Quote
Old 09-02-2010, 11:08 AM   #2
JJ
Lifetime Member
Points: 20,996, Level: 91 Points: 20,996, Level: 91 Points: 20,996, Level: 91
Activity: 41% Activity: 41% Activity: 41%
 
JJ's Avatar
 
Join Date: Feb 2002
Location: Wales, UK
Posts: 3,758
Default Re: Super Newbie C questions & MorphOS SDK

got a reply

need to compile at command line with

gcc -noixemul goodbye.c -o test
__________________
“We don't stop playing because we grow old; we grow old because we stop playing.” - George Bernard Shaw

Xbox Live: S0ulA55a551n2

Registered MorphsOS 3.7 user
JJ is offline   Reply With Quote
Old 09-02-2010, 01:41 PM   #3
spirantho
Premium Member
Points: 12,759, Level: 73 Points: 12,759, Level: 73 Points: 12,759, Level: 73
Activity: 19% Activity: 19% Activity: 19%
 
Join Date: Aug 2002
Posts: 1,461
Default Re: Super Newbie C questions & MorphOS SDK

You'll also want an extra quote on your printf() line.
__________________
--
Ian Gledhill
ian.gledhill@btinternit.com (except it should be internEt of course...!)
Check out my shop! http://www.mutant-caterpillar.co.uk/shop/ - for 8-bit (and soon 16-bit) goodness!
spirantho is offline   Reply With Quote
Old 09-03-2010, 12:26 AM   #4
Krashan
Technoid
Points: 9,601, Level: 65 Points: 9,601, Level: 65 Points: 9,601, Level: 65
Activity: 16% Activity: 16% Activity: 16%
 
Krashan's Avatar
 
Join Date: Jan 2003
Location: Białystok, Poland
Posts: 211
Default Re: Super Newbie C questions & MorphOS SDK

Quote:
Originally Posted by JJ View Post
gcc -noixemul goodbye.c -o test
After moving to bigger projects, you may also use -O2 (or -O3), which turns on compiler optimization engine and -s, which strips symbol table and other debug informations from the executable.
__________________
Homepage · MorphOS Files · DigiBooster 3
Krashan is offline   Reply With Quote
Old 09-03-2010, 04:28 AM   #5
JJ
Lifetime Member
Points: 20,996, Level: 91 Points: 20,996, Level: 91 Points: 20,996, Level: 91
Activity: 41% Activity: 41% Activity: 41%
 
JJ's Avatar
 
Join Date: Feb 2002
Location: Wales, UK
Posts: 3,758
Default Re: Super Newbie C questions & MorphOS SDK

Dont think will need to worry about that until I get opnto porting doom 3
__________________
“We don't stop playing because we grow old; we grow old because we stop playing.” - George Bernard Shaw

Xbox Live: S0ulA55a551n2

Registered MorphsOS 3.7 user
JJ is offline   Reply With Quote
Reply

Bookmarks

Tags
newbie , morphos , sdk , super , questions

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump