
Fri, 05/18/2007 - 11:51
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.
Tue, 05/22/2007 - 13:43
This looks like a missing refernce. Try adding a
#include
into MySessionCurve.cpp
Pete
Tue, 05/22/2007 - 14:02
I tried , but it didn't work.
Tue, 05/22/2007 - 14:43
You could post me your code if you like - you've got my address.
Pete
Tue, 07/17/2007 - 11:16
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?
Thu, 07/19/2007 - 09:48
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?
Thu, 07/19/2007 - 10:10
Add -ffriend-injection to the compiler flags to compile without error.
Thanks Umar, for giving the hint about the different gcc versions!
Thu, 07/19/2007 - 12:43
I also thank you for the solution. Now I understand what a "friend" for. :)
Fri, 11/16/2007 - 17:21
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
Wed, 05/14/2008 - 18:21
depends heavily on your build system. if you're just doing it manually (./configure && make && make install), then:
$ export CFLAGS="${CFLAGS} -ffriend-injection"
Wed, 07/02/2008 - 21:51
rajesh.
can you please email me your current profression and your location at gnagpals@yahoo.com. sincerely, gaurav nagpal