🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pilot.programmer.codewarrior
Article #10

PC relative strings no longer PC relative .

#10
From: Neil
Date: Mon, 15 Mar 2004 14:36
50 lines
2278 bytes
I have recently up-graded from CW V8 to CW V9, and am now having
problems with code that used to work.

When I try to load a shared libray using the code below during any of
the non-global launch codes, the application crashes complainig it has
accessed a global variable.

This seams to be the WireLessLibName parameter to SysLibFind.

The Application's settings are
PC-Relative strings - checked
Pool Strings - unckecked
Reuse strings - unchecked

-------------------------------

#define		WireLessLibCreatorID	'CDWZ'
#define		WireLessLibTypeID		sysFileTLibrary
#define		WireLessLibName		"WireLessLib"

__inline Err WireLessLib_OpenLibrary(UInt16 *refNumP, UInt32 *
clientContextP)
{
	Err error;
	Boolean loaded = false;
	
	/* first try to find the library */
	error = SysLibFind(WireLessLibName, refNumP);
	
	/* If not found, load the library instead */
	if (error == sysErrLibNotFound)
	{
		error = SysLibLoad(WireLessLibTypeID, WireLessLibCreatorID,
refNumP);
		loaded = true;
	}
	if (error == errNone)
	{
		error = WireLessLibOpen(*refNumP, clientContextP);
		if (error != errNone)
		{
			if (loaded)
			{
				SysLibRemove(*refNumP);
			}
			*refNumP = sysInvalidRefNum;
		}
	}
	return error;
}
Technical Details
Message-ID: <37c90db1.0403150636.1f72ced5@posting.google.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!postnews2.google.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 109d41,3a88201345f44a71,start
X-Google-Attributes: gid109d41,public
X-Google-Thread: 10baa0,3a88201345f44a71,start
X-Google-Attributes: gid10baa0,public
X-Google-Thread: 112073,3a88201345f44a71,start
X-Google-Attributes: gid112073,public
X-Google-ArrivalTime: 2004-03-15 06:36:52 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!postnews2.google.com!not-for-mail
From: neil@commontime.com (Neil)
Newsgroups: pilot.programmer.codewarrior,comp.sys.palmtops.pilot,codewarrior.palm
Subject: PC relative  strings no longer PC relative .
Date: 15 Mar 2004 06:36:51 -0800
Organization: http://groups.google.com
Lines: 50
Message-ID: <37c90db1.0403150636.1f72ced5@posting.google.com>
NNTP-Posting-Host: 80.4.179.161
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1079361412 18068 127.0.0.1 (15 Mar 2004 14:36:52 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 15 Mar 2004 14:36:52 +0000 (UTC)