For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings


Need to speed up your development?
Have a look at our:

Samples & Tools


Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

OPenCascade6.2 compilation error on Ubuntu 8.04

Venugopal Gudimetla's picture

I am trying to install OpenCascade6.2 on Ubuntu Linux. I got a compilation error :
../../../src/Draw/Draw.cxx:317: error: 'Tcl_DString' does not name a type
../../../src/Draw/Draw.cxx:321: error: 'command' was not declared in this scope
make[2]: *** [Draw.lo] Error 1
I have Tcl installed, But I don't know how I can rectify this problem, could any of you please help ?


Hugues Delorme's picture

How do you install OpenCascade ?

Personally I have successfully installed Occ on Ubuntu 8.04, g++ 4.2.3.
Here are the steps I followed :
1. install package sun-java6-bin (or later), type : sudo apt-get install sun-java6-bin
3. cd in $occdir/Linux
4. type : java -cp setup.jar run

And that should be done.

Venugopal Gudimetla's picture

Hi Hugues,

I was following a diffeent route, I am not sure if what I am doing is the right way. But I did these steps:
1. in ros dir: ./configure
2. make

I had problems initially compiling, but many modules got built after fixing couple of problems, except when I got that error.

If what I am doing is wrong, could you please tell me as what modules will I need to install for CAD application development? and I will follow your steps of installation.

Hugues Delorme's picture

I think you should use the OpenCascade's java installer, it makes setup very easy.
That done, check if you can compile/link a small project that is using OpenCascade's libs.
If you get compilation errors, define these compiler directives :

You will surely have to link against these libs :

And maybe IGES and STEP packages, if your application needs them ...

After that if you have a strange linking error due to a missing C++ standard library (, you might try to make a link to your current version of libstdc++ (take a look in your /usr/lib folder).
link -s /usr/lib/ /usr/lib/ (assuming version 6 of your current libstdc++)

Venugopal Gudimetla's picture

Hugues, Thanks a lot for your help. I should be able to make it work. I tried installing using set.jar, it worked! along with examples.

Adam Powell's picture

You can also try my .deb packages for OpenCascade:
6.2-3 is the latest version, I uploaded it to the Debian NEW queue a week and a half ago so I should have a reply soon... I'm hoping it will get into Debian Lenny, and Ubuntu Intrepid Ibex.

If you're on an amd64 machine, you can install them directly, otherwise get the .orig.tar.gz, .diff.gz and .dsc files and do:
dpkg-source -x opencascade_6.2-3.dsc
cd opencascade-6.2
That will either build the package or tell you what other packages you need to install in order to do so.

I believe it works on Ubuntu Hardy Heron.


Venugopal Gudimetla's picture

Thanks Adam, I tried your deb package too, I was able to build it. As a matter of fact, I made a mistake while building, I didn't setup my environment variables by running env.[ksh csh] which is why it wasn't able to find TCL/TK include files and libs. Your package was helpful as I was able to compile and install it on Ubuntu 8.04.I could in fact install it as it was as you indicated, but I had problems with I guess your binaries/libraries were built using, I had lib clashing problems on my system. And even though I ran ldconfig, I wasn't able to resolve my problem, hence the need for a build.

Adam Powell's picture

Hello Venu,

It's odd that you had trouble with libstdc++, given the dependencies of the packages. (I don't think my system even has The library has:

Depends: libc6 (>= 2.7-1), libgcc1 (>= 1:4.1.1-21), libgl1-mesa-glx | libgl1, libglu1-mesa | libglu1, libstdc++6 (>= 4.2.1-4), libx11-6, libxext6, libxmu6, tcl8.4 (>= 8.4.16), tk8.4 (>= 8.4.16)

I've heard other success reports on Ubuntu 8.04, and want this to be installable there. Can you post or send me ( the error message you saw when trying to install this?


Venugopal Gudimetla's picture

Hi Adam, I shall try to recreate the problem again, one reason could be that I have both and on my machine in /usr/lib. The Debain package was compiled using so I had to fool my linker to accept as . But I shall mail you the error once I recreate it.

Adam Powell's picture

No, the Debian package was compiled using

I just checked every lib file in the package using ldd, and they all point to

Why do you think it is linked to .5? What does ldd tell you about the lib files in my package?

Venugopal Gudimetla's picture

Hi Powell,
You are correct, I checked the your built libraries, they all point to libstdc++so.6. I was bit confused, the original OCC libraries that I downloaded were pointing to Since I downloaded your built package and OCC at the same time, It led my confusion. Indeed it is your libraries that I am using now. I had trouble installing official OCC because of the library version differences. Everytime I run OCC examples using official built libraries I get a message :

"/usr/bin/ld: warning:, needed by /opt/OpenCASCADE6.2.0/ros/Linux/lib/, may conflict with"

However, I don't this message with your built and I don't have any problems now.