ben lipkowitz a écrit :
> Congratulations on your first release. I've been waiting hopefully for a 
> set of python bindings to opencascade since I learned about pythonizer 
> about three years ago.
Hi Ben,

Many thanks for your support!
>  Anyway, down to the dirty details. Help is much 
> appreciated as I have no idea how SWIG works. This is what I did:
>
> echo 'deb http://www.opennovation.org/debian lenny main contrib non-free' | 
> sudo tee -a /etc/apt/sources.list
> sudo apt-get update
> sudo apt-get install libopencascade-visualization-dev libopencascade-ocaf-dev
> export CASROOT=/usr/share/opencascade/6.3.0/ #is this actually used?
>   
CASROOT is not needed. It's mostly a Windows specific stuff.
> wget http://www.pythonocc.org/Releases/pythonOCC-md0.1.tar.gz
> wget http://www.pythonocc.org/Releases/pythonOCC-md0.1-demos.zip
> tar -zxvf pythonOCC*.tar.gz
> cd pythonOCC*/src/
> #edit environment.py so OCC_LIB is /usr/lib/opencascade and OCC_INC is 
> /usr/include/opencascade
>
> python setup.py build 2>&1 | tee build.log
>   
 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):

building 'OCC._Standard' extension
swigging
/home/ubuntu/Devel/pythonOCC/src/SWIG_src_modular_linux_darwin/Standard.i to
/home/ubuntu/Devel/pythonOCC/src/SWIG_src_modular_linux_darwin/Standard_wrap.cpp
swig -python -modern -fcompact -c++ -DHAVE_LIMITS_H -DHAVE_CONFIG_H -DCSFDB
-DOCC_CONVERT_SIGNALS -DLIN -DLININTEL -D_GNU_SOURCE=1 -outdir
/home/ubuntu/Devel/pythonOCC/src/OCC -o
/home/ubuntu/Devel/pythonOCC/src/SWIG_src_modular_linux_darwin/Standard_wrap.cpp
/home/ubuntu/Devel/pythonOCC/src/SWIG_src_modular_linux_darwin/Standard.i
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
-Wstrict-prototypes -fPIC -DHAVE_CONFIG_H -DHAVE_LIMITS_H -DCSFDB
-DOCC_CONVERT_SIGNALS -DLIN -DLININTEL -D_GNU_SOURCE=1 -I/usr/local/inc
-I/usr/include/python2.5 -c
/home/ubuntu/Devel/pythonOCC/src/SWIG_src_modular_linux_darwin/Standard_wrap.cpp
-o
build/temp.linux-i686-2.5/home/ubuntu/Devel/pythonOCC/src/SWIG_src_modular_linux_darwin/Standard_wrap.o
-O0
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for
Ada/C/ObjC but not for C++
g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions
build/temp.linux-i686-2.5/home/ubuntu/Devel/pythonOCC/src/SWIG_src_modular_linux_darwin/Standard_wrap.o
-L/usr/local/lib -lBinLPlugin -lBinPlugin -lBinXCAFPlugin -lFWOSPlugin
-lPTKernel -lStdLPlugin -lStdPlugin -lTKAdvTools -lTKBin -lTKBinL -lTKBinTObj
-lTKBinXCAF -lTKBO -lTKBool -lTKBRep -lTKCAF -lTKCDF -lTKernel -lTKFeat
-lTKFillet -lTKG2d -lTKG3d -lTKGeomAlgo -lTKGeomBase -lTKHLR -lTKIGES -lTKLCAF
-lTKMath -lTKMesh -lTKMeshVS -lTKNIS -lTKOffset -lTKOpenGl -lTKPCAF -lTKPLCAF
-lTKPrim -lTKPShape -lTKService -lTKShapeSchema -lTKShHealing -lTKStdLSchema
-lTKStdSchema -lTKSTEP -lTKSTEP209 -lTKSTEPAttr -lTKSTEPBase -lTKSTL -lTKTObj
-lTKTopAlgo -lTKV2d -lTKV3d -lTKVRML -lTKXCAF -lTKXCAFSchema -lTKXDEIGES
-lTKXDESTEP -lTKXMesh -lTKXml -lTKXmlL -lTKXmlTObj -lTKXmlXCAF -lTKXSBase
-lXCAFPlugin -lXmlLPlugin -lXmlPlugin -lXmlXCAFPlugin -o
build/lib.linux-i686-2.5/OCC/_Standard.so -Wl,--no-undefined -lm -lstdc++
-lpython2.5

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.

Cheers,

Thomas


>   

_______________________________________________
Pythonocc-users mailing list
Pythonocc-users@gna.org
https://mail.gna.org/listinfo/pythonocc-users

Reply via email to