Connecting Tech Pros Worldwide Help | Site Map

C++ SDL Makefile for MPW on Mac OS 9

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 23rd, 2005, 02:00 AM
MPD
Guest
 
Posts: n/a
Default C++ SDL Makefile for MPW on Mac OS 9

Hi, I'm new to the MPW (Mac Programmers Workshop -- Apple's now freely
avilable development tools for Classic Mac OS's) and wish to construct
a simple 2D game using MPW's C++ compiler and SDL.

However I don't know how to write a C++ makefile that initializes both
SDL and C++ (not C) in MPW. I have got the SDL examples that came with
the Mac Classic SDL Development Binaries to compile however they are
all written in straight C and as such don't use object orientation
(and MPW passes the code to a C compiler called rather than use a
backwards compatible C++ compiler).

I know that this is down to the makefile MPW needs to compile C++
rather than C programs but I have no idea how to write one as I've
only started using MPW in the last 2 days. Can anyone tell me how to
construt a C++ makefile that initializes a simple C++ class along with
all the relevant SDL header files and Libraries:

simple_class.h

main.cpp // object of simple_class gets initialised here
// also simple SDL window initialised

Very simple stuff I know, but I'm stuck! Any help will be much
appreciated, thanks!!

  #2  
Old July 23rd, 2005, 02:00 AM
Paul Russell
Guest
 
Posts: n/a
Default Re: C++ SDL Makefile for MPW on Mac OS 9

MPD wrote:[color=blue]
> Hi, I'm new to the MPW (Mac Programmers Workshop -- Apple's now freely
> avilable development tools for Classic Mac OS's) and wish to construct
> a simple 2D game using MPW's C++ compiler and SDL.
>
> However I don't know how to write a C++ makefile that initializes both
> SDL and C++ (not C) in MPW. I have got the SDL examples that came with
> the Mac Classic SDL Development Binaries to compile however they are
> all written in straight C and as such don't use object orientation
> (and MPW passes the code to a C compiler called rather than use a
> backwards compatible C++ compiler).
>
> I know that this is down to the makefile MPW needs to compile C++
> rather than C programs but I have no idea how to write one as I've
> only started using MPW in the last 2 days. Can anyone tell me how to
> construt a C++ makefile that initializes a simple C++ class along with
> all the relevant SDL header files and Libraries:
>[/color]

Just use MPW's CreateMake tool. Invoke it via the commando interface and
then just pick the source files that you need to include in the build.

Paul
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,662 network members.