Where is the *.so after installation OCC with apt-get on Ubuntu 11.10

Hi,

I have Ubuntu 11.10 running on a 32-bit computer with 2GB memory, 512MB nVidia video card and 500GB HD. I installed the following opencascade packages with sudo apt-get install
:

ibopencascade-dev
libopencascade-foundation-6.5.0
libopencascade-foundation-dev
libopencascade-modeling-6.5.0
libopencascade-modeling-dev
libopencascade-ocaf-6.5.0
libopencascade-ocaf-dev
libopencascade-ocaf-lite-6.5.0
libopencascade-ocaf-lite-dev
libopencascade-visualization-6.5.0
libopencascade-visualization-dev
opencascade-draw
opencascade-examples

I added /usr/include/opencascade in GNU c++'s include path. However, I was not able to find where the *.so of opencascade are. When compiling the short program below, "IGESControl_Reader" can not be resolved. Please advise what are the paths for c++ link or the environment varibles that I need. Thanks.

#include
#include
#include

int main()
{
using namespace std;
cout

IGESControl_Reader aReader;
return 0;
}

BR, SP

Denis Barbier's picture

You must #include .
What is your link command? What is the error message?

wangsp61's picture

Hi Dennis,

I added #include . My file name is test_link.cpp. Below is the compiling command:

g++ -I/usr/include/opencascade -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"test_link.d" -MT"test_link.d" -o "test_link.o" "../test_link.cpp"

Below are the errors:

/usr/include/opencascade/XSControl_Reader.hxx:102: undefined reference to `Standard::Free(void*&)'
./test_link.o: In function `~XSControl_Reader':
/usr/include/opencascade/XSControl_Reader.hxx:114: undefined reference to `vtable for XSControl_Reader'
./test_link.o: In function `IGESControl_Reader::operator delete(void*)':
/usr/include/opencascade/IGESControl_Reader.hxx:90: undefined reference to `Standard::Free(void*&)'
./test_link.o: In function `~IGESControl_Reader':
/usr/include/opencascade/IGESControl_Reader.hxx:77: undefined reference to `vtable for IGESControl_Reader'

Thanks for your help.

BR, SP

Denis Barbier's picture

You did not link against OCC libraries. Add
-lTKIGES -lTKXSBase -lTKBRep -lTKernel

wangsp61's picture

Hi Dennis,

You are right. The errors were gone with the links. Thanks a lot.

BR, SP