[Pythonmac-SIG] Problem with compiling frozen module as bundle, bundle_loader option, and CodeWarrior

Read Roberts rroberts at adobe.com
Mon Mar 29 19:06:52 EST 2004


I have a 'frozen' python script that compiles nicely as a Mach-0 
bundle library  with gcc, and is looadable as such by any random Mac 
program. However, I have run into a glitch with converting to 
CodeWarrior.

The Python script uses the 'os' module. This in turn loads the 
'posix' module, and one of the setup functions in 'posix' references 
the symbol 'environ'. 'environ' is defined only in the crt.0 library 
that is linked only  into applications. As a result, in order to 
compile my bundle library, I have to use the 'gcc' option ' 
-bundle-loader <some application>' so that the gcc linker will find a 
source for the symbol 'environ'.

  Now, I need to do the same thing in CodeWarrior, but I have not been 
able to find any way to set this option. Can any one tell me how to 
do this in CodeWarrior 9.1?

  I did find an alarming e-mail as of 5.13.2003 which commented that 
CW 8.x is missing this feature, but haven't been able to confirm it, 
or confirm with respect to CW 9.1

P.S. My bundles that link with Python also are missing the symbol 
'_file'. Can anyone tell me where that comes from? My project 
contains  the frameworks Python , Carbon, and System, and the 
bundle1.o object file.




More information about the Pythonmac-SIG mailing list