Build Open CASCADE 6.6.0 under Ubuntu 12.04.3 (64bit)

Hello,

I'm trying to build the Open CASCADE 6.6.0 libraries for Linux.
Something similar to this thread seems to work: http://www.opencascade.org/org/forum/thread_15348/?forum=4

$sudo apt-get libtool autoconf automake gfortran
$sudo apt-get install libxmu-dev
$sudo apt-get install tcl8.5-dev
$sudo apt-get install tk8.5-dev

in the /ros folder I add the file my_build.sh:

export CASROOT="usr/include"
occFlags="$occFlags --with-tk=/usr/lib/tk8.5"
occFlags="$occFlags --with-gl-include=/usr/include"
occFlags="$occFlags --with-gl-library=/usr/lib"
occFlags="$occFlags --with-xmu-include=/usr/include"
occFlags="$occFlags --with-xmu-library=/usr/lib"
occFlags="$occFlags --enable-wok=no"
occFlags="$occFlags --enable-draw=yes"
occFlags="$occFlags --enable-wrappers=no"
occFlags="$occFlags --enable-static=no"
occFlags="$occFlags --enable-shared=yes"
occFlags="$occFlags --disable-debug --enable-production"
./build_configure $occFlags --prefix=$CASTROOT
./configure $occFlags --prefix=$CASTROOT

then I execute:

$sudo chmode 777 -R ./
$sudo bash my_build (this command takes 20 seconds to execute)
$sudo chmode 777 -R ./
$automake (this command takes less than 1 min to execute)
$make (this takes about 30 minutes)

It seems that it builds fine.
My problem is that once it is done I do not see the libraries...

What am I missing?

Thank you very much,

PS: I've tried the wok but when I run sudo bash wok_confgui.sh it gives me the error:
wok_confgui.sh: line 12: xyz/woksetup/site/../3rdparty/lin32/tcltk/bin/tclsh8.5: No such file or directory
But the file is there... Is it because my system is 64 bits?

Albert Woo's picture

Ok I realised that each library (*.so) is put in a hidden subfolder /.lib/ (Ctrl+H is needed in Nautilus).

I see that not all modules have a library, for example:
libTKGeomAlgo.so
libTKMath.so
are generated,
but not the following ones:
libTKIGES.so
libTKSTEP.so
libTKSTEP209.so
...
under windows you get a dll for each of these.
Is this normal?

Moving forward, using a search tool I copy-pasted all the *.so files to another folder (maybe this is not needed?) and tried to compile my Qt project with the libraries I got.

LIBS += -L"....../opencascade/ros/adm/lin/lib64copypaste"

LIBS += "......./opencascade/ros/adm/lin/lib64copypaste/TKSTEP.lib"
LIBS += -lTKernel -lPTKernel -lTKMath -lTKService -lTKV3d \
-lTKBRep -lTKIGES -lTKSTL -lTKVRML -lTKSTEPAttr -lTKSTEP209 \
-lTKSTEPBase -lTKShapeSchema -lTKGeomBase -lTKGeomAlgo -lTKG3d -lTKG2d \
-lTKXSBase -lTKPShape -lTKShHealing -lTKHLR -lTKTopAlgo -lTKMesh -lTKPrim \
-lTKCDF -lTKBool -lTKBO -lTKFillet -lTKOffset -lTKXCAF -lTKXDESTEP -lTKXDEIGES -lTKLCAF

My only 3rd party library needed is freetype.

(I also tried the default path
LIBS += -L"/home/albert/Desktop/opencascade/ros/adm/lin/amk"
however, every library is put in a subfolder /.libs/ , one by one)

When compiling I had to apply some fixes:
DEFINE HAVE_LIMITS
DEFINE HAVE_IOSTRREAM
#include in Standard_Stream.hxx

However, the libraries are not found by the compiler.
Under windows everything works fine.
What am I doing wrong?

Any help would be really appreciated,