Open CASCADE, the 3D modelling kernel
3D modeling & numerical simulation

Open CASCADEShowroomGet it!Developer CornerSupport and ProductsAbout us
Technical overview
Areas of use
Advantages
FAQ
Screenshots
Shape factory
Shape gallery
Demonstrations
What's new
System requirements
Download Center
Public license
Documentation
Getting started
Forum
Open Source community
Training and e-learning
A la Carte Support
Value-added software
Complementary Components
Customer Corner
Company Profile
Marketing Materials
Contact Us
News
Home / Developer Corner / Forum / Help with OpenCascade 6.2 on ubuntu hardy - beginner

Forum

Help with OpenCascade 6.2 on ubuntu hardy - beginner
fulcrum2008/08/21 12:05
Hi

I managed to install open cascade 6.2 on my unbuntu with the seetup.jar installer. Also I was able to run the configure and succesfull make the library (after adding the -ffriend-injection and -fpermissive options to CXX flags)

But now that I have done all this, I want to use this library to write a simple program (just for starters.)

code:
------------------------------------------------------------------------
#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 () {


STEPControl_Reader reader;

IFSelect_ReturnStatus stat = reader.ReadFile("screw.stp");


return 0;

}
-------------------------------------------------------------------------
to just to check the functionality !!

I am not able to to compile this code !!!

can anyone please tell me the how my makefile should look for this ??
what all should use as the include directories, which libraries I should be linking....??

can anyone please help me out with this...thanks a lot !!
Dirk B2008/08/21 12:49
Here's a basic Makefile. I compiled your main with it on my Suse box, there are way too many libraries in there, just try to remove the ones you don't need.

Regards,

Dirk

CXX= g++ -g

DEFINES= -DHAVE_LIMITS_H -DHAVE_CONFIG_H -DCSFDB
OCC_INC=-I/opt/OpenCASCADE6.2.0/ros/inc
OCC_LIBS=-L/opt/OpenCASCADE6.2.0/ros/Linux/lib/ \
-L/opt/OpenCASCADE6.1.0/ros/../3rdparty/Linux/tcltk/lib/ \
-lTKXSBase -lTKXSDRAW -lXCAFPlugin -ltk -L/usr/lib -L/opt/gnome/lib \
-lBinLPlugin -lBinPlugin -lBinXCAFPlugin -lFWOSPlugin -lmscmd -lPTKernel -lStdLPlugin -lStdPlugin \
-lTKAdvTools -lTKBin -lTKBinL -lTKBinXCAF -lTKBO -lTKBool -lTKBRep -lTKCAF -lTKCDF -lTKCDLFront \
-lTKCPPClient -lTKCPPExt -lTKCPPIntExt -lTKCPPJini -lTKCSFDBSchema -lTKDCAF -lTKDraw -lTKernel \
-lTKFeat -lTKFillet -lTKG2d -lTKG3d -lTKGeomAlgo -lTKGeomBase -lTKHLR -lTKIDLFront -lTKIGES -lTKLCAF \
-lTKMath -lTKMesh -lTKMeshVS -lTKOffset -lTKOpenGl -lTKPCAF -lTKPLCAF -lTKPrim -lTKPShape \
-lTKService -lTKShapeSchema -lTKShHealing -lTKStdLSchema -lTKStdSchema -lTKSTEP -lTKSTEP209 \
-lTKSTEPAttr -lTKSTEPBase -lTKSTL -lTKTCPPExt -lTKTopAlgo -lTKTopTest -lTKV2d -lTKV3d -lTKViewerTest \
-lTKVRML -lTKXCAF -lTKXCAFSchema -lTKXDEDRAW -lTKXDEIGES -lTKXDESTEP -lTKXml -lTKXmlL -lTKXmlXCAF \
-lTKXSBase -lTKXSDRAW -lXCAFPlugin -lXmlLPlugin -lXmlPlugin -lXmlXCAFPlugin -ltk -lXmu -L/usr/lib \
-L/usr/X11R6/lib -L/opt/gnome/lib -pthread -lpng -lSM -lICE \
-lXi -lXrender -lXrandr -lXfixes -lXcursor -lXinerama -lfreetype -lfontconfig -lXext -lX11 \
-lz -lm -lgthread-2.0 -lglib-2.0 -ldl -lGLU -lGL -lpthread

LIBS=-L/opt/OpenCASCADE6.2.0/ros/../3rdparty/Linux/tcltk/lib/ \
-ltk -L/usr/lib -L/opt/gnome/lib


all: occ_cmd

.SUFFIXES: .o .c .cpp .cc .cxx .C

.cxx.o:
     $(CXX) $(DEFINES) -c $(CXXFLAGS) $(OCC_INC) -o "$@" "$<"

occ_cmd:
     $(CXX) $(DEFINES) $(OCC_INC) $(OCC_LIBS) main.cpp -o $@ $(LIBS)

fulcrum2008/08/23 02:49
Hi dirk

Thanks a lot for the makefile, I will check it out..hopefully with this I should be able to make this work :)

Dhee
 
 
Latest news
  • FAQ section updated
  • OPEN CASCADE Uses Intel ® Parallel Studio XE to Introduce Parallelism into SALOME SMESH Module
  • Open CASCADE Technology 6.5.2 is available for download!

  • © OPEN CASCADE 2000 - 2012  |  Search  |  Contacts   |  Site map