INCLUDEPATH += /home/user/Downloads/opencascade-7.4.0/inc/ \
LIBS += -L/usr/local/lib/ \
LIBS += -lTKernel -lTKMath -lTKService -lTKV3d -lTKOpenGl \
-lTKBRep -lTKIGES -lTKSTL -lTKVRML -lTKSTEP -lTKSTEPAttr -lTKSTEP209 \
-lTKSTEPBase -lTKGeomBase -lTKGeomAlgo -lTKG3d -lTKG2d \
-lTKXSBase -lTKShHealing -lTKHLR -lTKTopAlgo -lTKMesh -lTKPrim \
-lTKCDF -lTKBool -lTKBO -lTKFillet -lTKOffset \
-lassimp \
LIBS += -lTKernel -lTKMath -lTKTopAlgo -lTKService
LIBS += -lTKG2d -lTKG3d -lTKV3d -lTKOpenGl
LIBS += -lTKBRep -lTKXSBase -lTKGeomBase
LIBS += -lTKMeshVS -lTKXSDRAW
LIBS += -lTKLCAF -lTKXCAF -lTKCAF
LIBS += -lTKCDF -lTKBin -lTKBinL -lTKBinXCAF -lTKXml -lTKXmlL -lTKXmlXCAF
# -- IGES support
LIBS += -lTKIGES
# -- STEP support
LIBS += -lTKSTEP -lTKXDESTEP -lTKXDEIGES
# -- STL support
LIBS += -lTKSTL
# -- OBJ/glTF support
LIBS += -lTKRWMesh
#src/base/io_occ_base_mesh.cpp \
#src/base/io_occ_gltf.cpp \
#src/base/io_occ_obj.cpp
# -- VRML support
LIBS += -lTKVRML
RESOURCES += \
res.qrc
DISTFILES += \
trashArchived discussion
Compiling a program with GCC, Windows
I want to compile this simple program.
// STEP Read Methods
#include <STEPControl_Reader.hxx>
#include <TopoDS_Shape.hxx>
// STL Read & Write Methods
#include <StlAPI_Writer.hxx>
#include <BRepMesh_IncrementalMesh.hxx>
#include <iostream>
int step2stl(char *in, char *out) {
// Read from STEP
STEPControl_Reader reader;
IFSelect_ReturnStatus stat = reader.ReadFile(in);
Standard_Integer NbRoots = reader.NbRootsForTransfer();
Standard_Integer NbTrans = reader.TransferRoots();
TopoDS_Shape Original_Solid = reader.OneShape();
// Write to STL
StlAPI_Writer stlWriter = StlAPI_Writer();
//stlWriter.SetCoefficient(0.0001);
stlWriter.ASCIIMode() = Standard_False;
BRepMesh_IncrementalMesh Mesh( Original_Solid, 0.01 );
Mesh.Perform();
stlWriter.Write( Original_Solid, out);
return 0;
}
Standard_Integer main (int argc, char *argv[]) {
if (argc != 3) {
std::cerr << "Usage: " << argv[0] << " file.step file.stl" << std::endl;
return 1;
}
return step2stl(argv[1], argv[2]);
}I have installed OpenCascade 7.4 at a Windows machine.
What parameters do i have to pass to the compiler reagarding the include directories, library directories and libraries (-I, -L, -l flags)?
I look up the installation directory of OpenCascade and there are many different folders of different libraries, and inside most of them have include and lib folders.
Discussion
1 archived reply
Posts are displayed in their archived order.