[Vm-dev] Compiling OSProcessPlugin for Cocoa Cog VM (Mac)

John M McIntosh johnmci at smalltalkconsulting.com
Fri Dec 31 01:47:52 UTC 2010

This one is tricky and yes it's linked as an external plugin . 
The problem is that it needs to be weak linked against the globals that contain the argv/c etc... 

Further to this see

#warning what about these guyes?
/*** Variables -- globals for access from pluggable primitives ***/
int		argCnt= 0;
char	**argVec= 0;
char	**envVec= 0;

which you need to properly hookup in 

int main(int argc, char *argv[])

The warning is there because I didn't hook them up but just as soon as someone wanted to compile up the osprocess plugin.... (years later... )

Oh no doubt one should look at all the #warnings and ask John mmmm AND AND AND? 

BTW to get it to link I had to do

OTHER_LDFLAGS = "-flat_namespace -undefined warning"

that will save oh a night of grief I think... 

On 2010-12-30, at 4:25 PM, Igor Stasenko wrote:

> On 31 December 2010 01:22, Esteban Lorenzano <estebanlm at gmail.com> wrote:
>> Hi,
>> I'm trying to compile UnixOSProcessPlugin as an external plugin for Cocoa Cog VM.
>> I created a project (in the future CMakeGenerator will doit, but for now it was hand), and I'm having some problems due to "Symbol not found" errors. The problems were because dependences of OSProcessPlugin with aio functions (fixed by Igor now), and with dependences with #printAllStacks.
>> Well... my doubt is: should OSProcessPlugin be an internal plugin? or there are something wrong?
>> I used OSProcessPlugin before (in 4.2.5) as an external plugin... so, I think it *should* be external, but I don't know :(
> it appears it won't work as external one, because of several
> dependencies, which seen only if you link against main VM body.
> And this should be fixed, because its lame :)
>> Cheers,
>> Esteban
> -- 
> Best regards,
> Igor Stasenko AKA sig.

John M. McIntosh <johnmci at smalltalkconsulting.com>   Twitter:  squeaker68882
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com

More information about the Vm-dev mailing list