Hmm, still no dice, also I forgot to mention that I am using
-Wl,-Bstatic for the ready linkage and and -Wl,-Bdynamic for all the
rest (so -lOpenCL was already dynamically linked I reckon). My
thinking was that I want libreadybase.a to be statically linked but
the others all dynamic.
I also had trouble linking it until I added -fPIC (generate position
independent code) to the ready compile.
I yanked the link flags out of something that cmake made as part of
its build, which I realize might not be the best plan, but it got me
this far ;D
The two link lines in my makefile are:
LIBDIRS = -Wl,-Bstatic $(READYROOT)/libreadybase.a -Wl,-Bdynamic
LDFLAGS = -Wl,-Bstatic -L$(READYROOT) -lreadybase -Wl,-Bdynamic
-lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0
-lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype
-lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0
-lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0
-lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype
-lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0
-lvtkCommon -lvtkGraphics -lvtkIO -lvtkRendering -lvtkHybrid
-Wl,-rpath,/usr/X11R6/lib64
These get used by a little makefile-include system that ships with
Houdini, and come out looking like:
g++ -Wl,-Bstatic -L/home/dan/dev/ready/readyCommit/reaction-diffusion/
-lreadybase -Wl,-Bdynamic -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0
-lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo
-lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0
-lgthread-2.0 -lrt -lglib-2.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0
-lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo
-lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0
-lgthread-2.0 -lrt -lglib-2.0 -lvtkCommon -lvtkGraphics -lvtkIO
-lvtkRendering -lvtkHybrid -Wl,-rpath,/usr/X11R6/lib64 -shared
SOP_reactionDiffusion.o -L/usr/X11R6/lib -Wl,-Bstatic
/home/dan/dev/ready/readyCommit/reaction-diffusion//libreadybase.a
-Wl,-Bdynamic -lGLU -lGL -lX11 -lXext -lXi -ldl -lpthread -o
SOP_reactionDiffusion.so
>> It's a bit hard to know whether my plugin would have access to the lib
>> that houdini loads.. I have -lOpenCL in my link flags ...
>
> Hmm, maybe try removing the -lOpenCL flag and put back the clLibLoad call.
> If you want the readybase code to dynamically load the OpenCL lib then
> I don't think it should be statically linked as well.
>