Plugins, Linking, and Makefiles

William Taysom <[email protected]>
Newsgroups gmane.comp.breve
Message-ID <[email protected]>
Downloaded the new version and was excited to see that the there was an 
example plugin.  (I was also pleased to discover that a problem with 
running on my G5 disappeared -- previously, long running simulations 
would become unresponsive to external commands, like pausing.)  I set 
to trying to get the sample plugin to work.  But ran into a few 
problems.

First, I noticed that BREVEPATH was set to "../../bin/breve" which 
wasn't right for the Guified Mac OS version.  So, looked to the CLI 
version.  Sure enough, the BREVEPATH looked right.  So, I moved over to 
the samples directory and tried a build:

segin:/Applications/breve/breve_darwin/plugins/samples wtaysom$ make
make -f Makefile `uname`
make objects 'DEFINES=-DMACOSX'
cc -DMACOSX -c cSample.c -I..
g++ -DMACOSX -c c++Sample.cpp -I..
cc -bundle -o cSample_plugin.o cSample.o -bundle_loader ../../bin/breve
ld: Undefined symbols:
_slMessage
_stNewSteveCall
make[1]: *** [Darwin] Error 1
make: *** [all] Error 2
segin:/Applications/breve/breve_darwin/plugins/samples wtaysom$

That was curious, so I decided to check if "../../bin/breve" had the 
symbols "_slMessage" and "_stNewSteveCall":

segin:/Applications/breve/breve_darwin/bin wtaysom$ nm -a breve | grep 
'_slMessage'
segin:/Applications/breve/breve_darwin/bin wtaysom$ nm -a breve | grep 
'_stNewSteveCall'
segin:/Applications/breve/breve_darwin/bin wtaysom$

No, luck.  Well, maybe this is just a problem with the CLI version.  
Maybe the GUI version has the symbols:

segin:/Applications/breve/breve.app/Contents/MacOS wtaysom$ nm -a breve 
| grep '_slMessage'
00023644 T _slMessage
segin:/Applications/breve/breve.app/Contents/MacOS wtaysom$ nm -a breve 
| grep '_stNewSteveCall'
00067764 T _stNewSteveCall
segin:/Applications/breve/breve.app/Contents/MacOS wtaysom$

Looks like it does.  Let's change BREVEPATH to point to the right place 
and try again:

segin:/Applications/breve/plugins/samples wtaysom$ make Darwin
make objects 'DEFINES=-DMACOSX'
cc -DMACOSX -c cSample.c -I..
g++ -DMACOSX -c c++Sample.cpp -I..
cc -bundle -o cSample_plugin.o cSample.o -bundle_loader 
../../breve.app/Contents/MacOS/breve
cc -dynamiclib -o cSample_plugin.o cSample.o
ld: Undefined symbols:
_slMessage
_stNewSteveCall
/usr/bin/libtool: internal link edit command failed
make: *** [Darwin] Error 1
segin:/Applications/breve/plugins/samples wtaysom$

No, luck in the end, but we did get a step further.  Can anyone give us 
some insight into how this is supposed to work, and how to make it so.

Thanks,
William

_______________________________________________
breve mailing list
[email protected]
http://www.spiderland.org/mailman/listinfo/breve
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.