I was wondering who was maintaining the SDL Code Warrior project.
Nobody. Want to?
Very tempting, I finaly got a new copy of CodeWarrior.
The big problem is that I’m writing because I can’t get the current CW
project to work. The Mac shared library it produces has no code in it.
I’ve always had bad experiences in trying to set up shared libraries (I can
get it to work as a static library, but that doesn’t work for the LGPL).
I think the problem is that the project doesn’t define which symbols are
exported. When I give it a list of subprograms to export, it starts
complaining about missing a lot of code. I’m in the process of figuring
out what supporting libraries it needs to run.
A few months ago I managed to make a pre 1.0 version of SDL compile into a
shared library, but the programs running off of it crashed.
I know somebody must have more of a clue then I do, the question is, are
they willing to tell me?
From CW Online docs, worked for me…
This method allows you to export symbols to a file that has a .exp
extension. This .exp file has the same name as your project. For example, if
your project named is MyShLib.mcp, the .exp file would be named
MyShLib.mcp.exp.
Using the .exp file option is a three step process. First you create the
.exp file. You then edit the file to remove any symbols you don’t want.
Third, you add the .exp file back into your project and compile again.
1. Select the proper project settings.
In the PPC PEF or CFM68K panel, select Use .exp file from the Export Symbols
pop-up menu.
2. Delete any .exp file that is already in your project's folder.
CodeWarrior will not create a new export file if one already exists in your
project’s folder.
3. Make your project.
Choose Make from the Project menu.
CodeWarrior creates an export file, which lists the names of all the global
variables and routines in every one of your project’s files. This file’s
name is your project’s file name with .exp appended.
4. Examine the export file with the editor.
Choose the Open command from the File menu to open the .exp file. Listing
5.1 shows a sample .exp file.
Listing 5.1 Sample export file
FindDominantDevice__8UWindowsFRC4Rect #
UWindows::FindDominantDevice(const Rect &)
GetWindowStructureRect__8UWindowsFP8GrafPort #
UWindows::GetWindowStructureRect(GrafPort *)
GetWindowContentRect__8UWindowsFP8GrafPort #
UWindows::GetWindowContentRect(GrafPort *)
__sinit
__local_destructor_chain
__global_destructor_chain
__dc_arr
__del_arr
__new_arr
__init_arr
__copy
__destroy_global_chain
__destroy_local_chain
__destroy_local_objects_to
__destroy_local_objects
__reregister_local_object
__preregister_local_object
__register_local_object
__register_global_object
__ptmf_cast
5. Comment out any symbol you don't want to export.
To comment out a symbol, put a # at the beginning of the line that contains
it.
6. Comment out any CodeWarrior runtime symbol.
CodeWarrior runtime symbols begin with two underscores (__).
If you do not comment these symbols, CodeWarrior may generate linker errors
when you use this library in other projects.
7. Add the .exp file and recompile
Add the .exp file back into your project. Assign it to the proper target if
you have more than one and recompile.
HTH,
Darrell> From: krat
Reply-To: sdl at lokigames.com
Date: Tue, 29 Feb 2000 23:40:56 -0800
To: sdl at lokigames.com
Subject: Re: [SDL] Code Warrior SDL