ben lipkowitz a écrit : > On Mon, 9 Mar 2009, Thomas Paviot wrote: > >>> #edit environment.py so OCC_LIB is /usr/lib/opencascade and OCC_INC >>> is /usr/include/opencascade >>> >> From the traceback of your compilation process, it appears that the >> OpenCascade libraries are not linked with the .o object file. You >> should have something like (extracted from my Ubuntu 8.04 machine): >> >> You can see that all the TK* OpenCascade libs are passed to the >> linker. Be sure that the /usr/lib/opencascade contains the required >> libraries. > > Oh, shoot, you are right. The libraries moved when I upgraded to 6.3 - > now they are in /usr/lib instead of /usr/lib/opencascade > > Also the build script is looking for -lTKAdvTools-6 which of course > doesn't exist, (in /usr/lib/ i have libTKAdvTools-6.3.0.so > libTKAdvTools.la libTKAdvTools.so libTKAdvTools.so.6) Yes, library names are quite different form a platform to another (.so, .so.2, .so.6, .dynlob etc.) For your information, I developped the Linux part of the build script under Ubuntu Linux. > > so I removed all the -6 suffixes from the linking step and relinked > manually. It finds the libraries OK, but I still get these > Standard_wrap.cpp:1414: undefined reference to `Py.. errors. > > I think it's a problem with swig or python somehow. Maybe some python > library is supposed to be linked here? So I added -lpython2.5 to the > linking step and it worked! what a mess. :\ Strange, -lpython2.5 should be passed to the linker.
SCons becomes definitely necessary to avoid such manual tweaks! > > I will try your scons method next. > > btw this is the manual linking step I did - > it seems to have a lot of duplicates: > > g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions > build/temp.linux-i686-2.5/home/fenn/code/pythonOCC-md0.1/src/SWIG_src_modular_linux_darwin/Standard_wrap.o > > -L/usr/lib/ -lTKAdvTools -lTKXMesh -lTKGeomAlgo -lTKVRML -lTKG2d > -lTKXmlXCAF -lTKXDEIGES -lTKLCAF -lTKShapeSchema -lTKSTEPAttr > -lTKTopAlgo -lTKTObj -lTKSTL -lTKXmlL -lTKPLCAF -lTKFillet -lTKSTEP > -lTKXmlTObj -lTKG3d -lTKXCAF -lTKMesh -lTKShHealing -lTKjcas > -lTKAdvTools -lTKXml -lTKService -lTKXml -lTKTopAlgo -lTKPShape > -lTKXMesh -lTKG3d -lTKSTEPBase -lTKOpenGl -lTKBin -lTKG3d -lTKSTEP > -lTKMeshVS -lTKPShape -lTKXDESTEP -lTKSTL -lTKStdLSchema -lTKTObj > -lTKMeshVS -lTKOffset -lPTKernel -lTKBinL -lTKXCAF -lTKVRML -lTKNIS > -lTKSTEP209 -lTKPrim -lPTKernel -lTKFeat -lTKShapeSchema -lTKBin > -lTKXSBase -lTKAdvTools -lTKBRep -lTKStdLSchema -lTKXCAFSchema > -lTKService -lTKGeomBase -lTKPLCAF -lTKSTEP209 -lTKFillet -lTKCDF > -lTKSTEPBase -lTKHLR -lTKSTEP -lTKMesh -lTKOffset -lTKSTEPBase > -lTKIGES -lTKBinTObj -lTKV3d -lTKSTEP209 -lTKPCAF -lTKIGES -lTKjcas > -lTKXmlXCAF -lTKV3d -lTKCAF -lTKBinL -lTKG2d -lTKFillet -lTKXCAFSchema > -lTKFeat -lTKV3d -lTKNIS -lTKPLCAF -lTKCAF -lTKXDEIGES -lTKXmlL > -lTKBinXCAF -lTKXmlXCAF -lTKBRep -lTKStdSchema -lTKXDESTEP > -lTKGeomAlgo -lTKGeomBase -lTKSTEPAttr -lTKGeomBase -lTKStdLSchema > -lTKCDF -lTKBinTObj -lTKService -lTKernel -lTKCDF -lTKMath -lTKBool > -lTKOpenGl -lQVTK -lTKShHealing -lTKG2d -lTKPCAF -lQVTK -lTKXCAFSchema > -lTKLCAF -lTKGeomAlgo -lTKSTL -lTKernel -lTKBin -lTKTObj -lTKStdSchema > -lTKBO -lTKShHealing -lTKXCAF -lTKPrim -lTKXmlL -lTKMath -lTKXMesh > -lTKStdSchema -lTKFeat -lTKBinXCAF -lTKBinL -lTKBO -lPTKernel > -lTKAdvTools -lTKPShape -lTKBinXCAF -lTKOpenGl -lTKBinTObj -lTKPCAF > -lTKNIS -lTKMeshVS -lTKXSBase -lTKSTEPAttr -lTKXDESTEP -lTKPrim > -lTKV2d -lTKernel -lTKBool -lTKVRML -lTKBO -lTKLCAF -lTKjcas -lTKXml > -lTKXmlTObj -lTKXDEIGES -lTKTopAlgo -lTKV2d -lTKHLR -lTKV2d > -lTKShapeSchema -lTKMath -lTKOffset -lTKXmlTObj -lTKIGES -lTKBool > -lTKCAF -lTKBRep -lTKMesh -lTKHLR -lTKXSBase -lpython2.5 -o > build/lib.linux-i686-2.5/OCC/_Standard.so -Wl,--no-undefined Cheers, Thomas _______________________________________________ Pythonocc-users mailing list Pythonocc-users@gna.org https://mail.gna.org/listinfo/pythonocc-users