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 / November 2003



Tip: Looking for answers? Try searching our database.

Building an framework with reference to environ

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Thomas Engelmeier - 28 Nov 2003 09:24 GMT
Hi,

I tried to create an framework from some ancient sources.
They compile OK, but with CW 9.1 I get the following link error:

Link Error   : undefined: 'environ' (non lazy ptr IL)
Referenced from 'pvmputenv' in pvmcruft.c

environ is defined as

#ifndef IMA_WIN32_WATCOM
extern char **environ;
#endif

As it is supposed to be an framework, I use dylib1.o as the "runtime"
library. How can I get my framework to link?

Regards,
  Tom_E

Signature

This address is valid in its unmodified form but expires soon.

Eric Albert - 30 Nov 2003 00:45 GMT
> I tried to create an framework from some ancient sources.
> They compile OK, but with CW 9.1 I get the following link error:
[quoted text clipped - 10 lines]
> As it is supposed to be an framework, I use dylib1.o as the "runtime"
> library. How can I get my framework to link?

Use
   #define environ **_NSGetEnviron()
instead of the extern definition.  _NSGetEnviron() is defined in
/usr/include/crt_externs.h.

Hope this helps,
Eric

Signature

Eric Albert         ejalbert@stanford.edu
http://rescomp.stanford.edu/~ejalbert/

 
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.