Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Eclipse C/C++ and OpenCASCADE Libraries problem(compilation problem)
Eclipse C/C++ and OpenCASCADE Libraries problem [message #814575] Tue, 06 March 2012 11:10 Go to next message
Eclipse UserFriend
Dear all,
This is my first trial to work with eclipse and opencascade, after i try to configure opencascade libraries with eclipse, i tried the following coding for testing, and found the error noted down

CODING

#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <STEPControl_Reader.hxx>
#include <TopoDS_Shape.hxx>
#include <BRepTools.hxx>
#include <XSControl_Reader.hxx>
#include <TopTools_SequenceOfShape.hxx>
#include <Handle_Standard_Transient.hxx>
#include <TColStd_SequenceOfTransient.hxx>

int main() {
cout << "!!!Hello World!!!" << endl; // prints !!!Hello World!!!
STEPControl_Reader reader;
IFSelect_ReturnStatus stat = reader.ReadFile("screw.stp");
return 0;
}


Error message!

**** Build of configuration Debug for project Open1 ****

make all
Building file: ../src/Open1.cpp
Invoking: GCC C++ Compiler
g++ -I/usr/include/opencascade -I/usr/lib -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/Open1.d" -MT"src/Open1.d" -o"src/Open1.o" "../src/Open1.cpp"
../src/Open1.cpp: In function 'int main()':
../src/Open1.cpp:22: warning: unused variable 'stat'
Finished building: ../src/Open1.cpp

Building target: Open1
Invoking: GCC C++ Linker
g++ -o"Open1" ./src/Open1.o
./src/Open1.o: In function `main':
/home/de052/workspace/example/Open1/Debug/../src/Open1.cpp:21: undefined reference to `STEPControl_Reader::STEPControl_Reader()'
/home/de052/workspace/example/Open1/Debug/../src/Open1.cpp:22: undefined reference to `XSControl_Reader::ReadFile(char const*)'
./src/Open1.o: In function `~Handle_Standard_Transient':
/usr/include/opencascade/Handle_Standard_Transient.hxx:71: undefined reference to `Handle_Standard_Transient::EndScope()'
./src/Open1.o: In function `~TColStd_SequenceOfTransient':
/usr/include/opencascade/TColStd_SequenceOfTransient.hxx:76: undefined reference to `TColStd_SequenceOfTransient::Clear()'
./src/Open1.o: In function `~TopTools_SequenceOfShape':
/usr/include/opencascade/TopTools_SequenceOfShape.hxx:73: undefined reference to `TopTools_SequenceOfShape::Clear()'
./src/Open1.o: In function `XSControl_Reader::operator delete(void*)':
/usr/include/opencascade/XSControl_Reader.hxx:119: undefined reference to `Standard::Free(void*&)'
./src/Open1.o: In function `~XSControl_Reader':
/usr/include/opencascade/XSControl_Reader.hxx:135: undefined reference to `vtable for XSControl_Reader'
./src/Open1.o: In function `STEPControl_Reader::operator delete(void*)':
/usr/include/opencascade/STEPControl_Reader.hxx:100: undefined reference to `Standard::Free(void*&)'
./src/Open1.o: In function `~STEPControl_Reader':
/usr/include/opencascade/STEPControl_Reader.hxx:86: undefined reference to `vtable for STEPControl_Reader'
collect2: ld returned 1 exit status
make: *** [Open1] Error 1




Any help will be appreciated,
game
Re: Eclipse C/C++ and OpenCASCADE Libraries problem [message #814749 is a reply to message #814575] Tue, 06 March 2012 16:08 Go to previous messageGo to next message
Eclipse UserFriend
You need to add the opencascade libraries to your project configuration so they are available for the link step.
Re: Eclipse C/C++ and OpenCASCADE Libraries problem [message #815078 is a reply to message #814749] Wed, 07 March 2012 02:45 Go to previous messageGo to next message
Eclipse UserFriend
Dear David,

Thank you for reply, it seems i added all libraries, here i enclosed the snapshoot. It seems Eclipse understand libraries, but couldn't run the main program! I am very new to Eclipse, and is there something special for Eclipse!
Any information helps in this regard, if u have any tutor on this issue!



Re: Eclipse C/C++ and OpenCASCADE Libraries problem [message #815722 is a reply to message #815078] Wed, 07 March 2012 20:06 Go to previous messageGo to next message
Eclipse UserFriend
On 03/07/2012 01:45 AM, game milky wrote:
> Dear David,
>
> Thank you for reply, it seems i added all libraries, here i enclosed the snapshoot. It seems Eclipse understand libraries, but couldn't run the main program! I am very new to Eclipse, and is there something special for Eclipse!
> Any information helps in this regard, if u have any tutor on this issue!
>
>
>
>
You appear to have added the library paths as include paths. You need
to use the Libraries/Library Paths tabs on the Paths and Symbols
property page for the project to specify libraries.
Re: Eclipse C/C++ and OpenCASCADE Libraries problem [message #815970 is a reply to message #815722] Thu, 08 March 2012 04:15 Go to previous messageGo to next message
Eclipse UserFriend
http://wiki.eclipse.org/CDT/User/FAQ#How_do_I_add_an_external_library_to_my_C.2B.2B_project.3F
Re: Eclipse C/C++ and OpenCASCADE Libraries problem [message #816745 is a reply to message #815970] Fri, 09 March 2012 03:00 Go to previous message
Eclipse UserFriend
Thank u for information, i will check ur suggestion come back to u!

Thank u very much
Previous Topic:Custom build steps for QT ui and moc file
Next Topic:eclipse metadata !!!!!
Goto Forum:
  


Current Time: Mon Jun 23 03:08:54 EDT 2025

Powered by FUDForum. Page generated in 0.09293 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top