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

error: ?Standard_Transient_Type_? was not declared in this scope

Rajesh Kishore's picture
Forums: 

Hi all,
I am deploying a Qt OCC application in LINUX (SUSE 10.2).
In this application I have a class which is sub class of AIS_InteractiveObject.I am getting the following error:
MySessionCurve.cpp:12: error: ?Standard_Transient_Type_? was not declared in this scope.
I am using gcc version 4.1.2 20061115 (prerelease) (SUSE Linux)
Any suggestions are welcome.

P Dolbey's picture

This looks like a missing refernce. Try adding a

#include

into MySessionCurve.cpp

Pete

Rajesh Kishore's picture

I tried , but it didn't work.

P Dolbey's picture

You could post me your code if you like - you've got my address.

Pete

Dirk B's picture

Has this issue been resolved? I work on Suse10.2 as well. I used modified code from http://www.opencascade.org/org/forum/thread_8480/ and get the same error. The code compiles and works after removing the lines IMPLEMENT_STANDARD_SUPERTYPE (Standard_Transient) and IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_ENTRY (Standard_Transient). Will removing these lines cause any problems?

Umar Said's picture

I get similar error. When I add the header file you mentioned, I get another error

error: Standard_Transient_Type.hxx: No such file or directory

Indeed, there is no Standard_Transient_Type.hxx in OCC include files. There are only Standard_Transient.hxx, Standard_Transient_proto.hxx and Handle_Standard_Transient.hxx, and including them does not resolve the problem.

On other machine using Ubuntu Breezy with gcc 4.0.2, I can compile and run the same code which does not compile by gcc 4.1.2 on Debian etch. Is is caused by the new gcc?

Dirk B's picture

Add -ffriend-injection to the compiler flags to compile without error.
Thanks Umar, for giving the hint about the different gcc versions!

Umar Said's picture

I also thank you for the solution. Now I understand what a "friend" for. :)

Stockmanns's picture

I just tried to recompile OpenCascade6.2 on my SUSE 10.2 system with gcc 4.1.2 and I get the same error like Rajesh Kishore.

Unfortunately I am not very experienced in setting compiler flags. Can you explain in more detail were to set -ffriend-injection in the various Makefiles?

Thank you very much

Tobias

auke's picture

depends heavily on your build system. if you're just doing it manually (./configure && make && make install), then:
$ export CFLAGS="${CFLAGS} -ffriend-injection"

Gaurav's picture

rajesh.
can you please email me your current profression and your location at gnagpals@yahoo.com. sincerely, gaurav nagpal