I use:
Qt 5.15.2 MinGW 32-bit Dynamic for Debug build
Ogre 13.1.1 MinGW Static build
There is a class called ApplicationContextQt that can help to use Qt with Ogre3D but I have errors:
This example is very simple:
main.cpp
#include "Ogre.h"
#include "OgreApplicationContextQt.h"
#include <QGuiApplication>
class MyTestApp : public OgreBites::ApplicationContextQt, public OgreBites::InputListener
{
public:
MyTestApp();
void setup();
bool keyPressed(const OgreBites::KeyboardEvent& evt);
};
MyTestApp::MyTestApp() : OgreBites::ApplicationContextQt("OgreTutorialApp")
{
}
bool MyTestApp::keyPressed(const OgreBites::KeyboardEvent& evt)
{
if (evt.keysym.sym == OgreBites::SDLK_ESCAPE)
{
getRoot()->queueEndRendering();
}
return true;
}
void MyTestApp::setup(void)
{
// do not forget to call the base first
OgreBites::ApplicationContextQt::setup();
}
int main(int argc, char *argv[])
{
QGuiApplication qapp(argc, argv);
MyTestApp app;
app.initApp();
app.getRoot()->startRendering();
app.closeApp();
return qapp.exec();
}
INCLUDEPATH += "E:\ProgramFiles\ogre-13.1.1\include\OGRE"
INCLUDEPATH += "E:\ProgramFiles\ogre-13.1.1\include\OGRE\Bites"
INCLUDEPATH += "E:\ProgramFiles\ogre-13.1.1\include\OGRE\RTShaderSystem"
LIBS += -L"E:\ProgramFiles\ogre-13.1.1\lib"
LIBS += -L"E:\ProgramFiles\ogre-13.1.1\lib\OGRE"
LIBS += -lOgreBitesQtStatic
LIBS += -lOgreBitesStatic -lRenderSystem_GL3PlusStatic -lOgreGLSupportStatic -lOgreMeshLodGeneratorStatic -lOgreOverlayStatic -lOgrePagingStatic -lOgrePropertyStatic -lOgreRTShaderSystemStatic -lOgreVolumeStatic -lPlugin_BSPSceneManagerStatic -lPlugin_DotSceneStatic -lPlugin_OctreeSceneManagerStatic -lPlugin_OctreeZoneStatic -lPlugin_ParticleFXStatic -lPlugin_PCZSceneManagerStatic -lRenderSystem_GLES2Static -lRenderSystem_GLStatic -lOgreMainStatic -lOgreTerrainStatic -lCodec_STBIStatic -lzlibstatic
LIBS += -lSDL2main -lSDL2.dll -lfreetype -lpugixml
LIBS += -lopengl32 -lgdi32
You can try this one ?
INCLUDEPATH += "E:\ProgramFiles\ogre-13.1.1\include\OGRE"
INCLUDEPATH += "E:\ProgramFiles\ogre-13.1.1\include\OGRE\Bites"
INCLUDEPATH += "E:\ProgramFiles\ogre-13.1.1\include\OGRE\RTShaderSystem"
DEPENDPATH += "E:\ProgramFiles\ogre-13.1.1\include\OGRE"
DEPENDPATH += "E:\ProgramFiles\ogre-13.1.1\include\OGRE\Bites"
DEPENDPATH += "E:\ProgramFiles\ogre-13.1.1\include\OGRE\RTShaderSystem"
LIBS += -L"E:/ProgramFiles/ogre-13.1.1/lib/OgreBitesQtStatic" -lOgreBitesQtStatic
LIBS += -L"E:/ProgramFiles/ogre-13.1.1/lib/OGRE" -lOgreBitesStatic
// OR ...
LIBS += "E:/ProgramFiles/ogre-13.1.1/lib/OgreBitesQtStatic/OgreBitesQtStatic.a"
LIBS += "E:/ProgramFiles/ogre-13.1.1/lib/OGRE/OgreBitesStatic.a"
// It just depends on the actual names of your libraries
// Same for the others unless their file location is decleared under system path.
// If so, you can add that libraries like how you did with opengl
And it is nice to add PRE_TARGETDEPS macros too if you make changes on those libraries so often:
PRE_TARGETDEPS += "E:/ProgramFiles/ogre-13.1.1/lib/OgreBitesQtStatic.a"
You can replace "/"s with "" too.
And the problem with your pro file was: You added library paths as libraries. And then tried to add that libraries from system environment.
I am developping a program with QtCreator in which I use graphviz2.38.
I have done a minimale example to explain. Just consider this small code which transform a dot file in svg file:
#include <QCoreApplication>
#include <graphviz/gvc.h>
#include <graphviz/gvplugin.h>
#include <graphviz/cgraph.h>
#include <graphviz/cdt.h>
#include<iostream>
using namespace std;
void saveImageGV(){
GVC_t *gvc= gvContext();
extern gvplugin_library_t gvplugin_dot_layout_LTX_library;
gvAddLibrary(gvc, &gvplugin_dot_layout_LTX_library);
FILE *fp = fopen(("ancestry.dot"), "r");
Agraph_t *g = agread(fp,0);
gvLayout(gvc, g, "dot");
gvRender(gvc, g, "svg", fopen(("ancestry.svg"), "w"));
gvFreeLayout(gvc, g);
agclose(g);
(gvFreeContext(gvc));
return exit(0);
}
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
saveImageGV();
return a.exec();
}
The compilation options are the following:
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport
SOURCES += \
main.cpp
QMAKE_LFLAGS += "-Wl,--rpath=lib/ "
QMAKE_LFLAGS += "-Wl,--dynamic-linker=lib/ld-linux-x86-64.so.2"
# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
INCLUDEPATH += /usr/local/include/graphviz/
unix:!macx: LIBS += -L$$PWD/../../../../usr/lib/ -lcdt
INCLUDEPATH += $$PWD/../../../../usr/lib
DEPENDPATH += $$PWD/../../../../usr/lib
unix:!macx: LIBS += -L$$PWD/../../../../usr/lib/ -lcgraph
INCLUDEPATH += $$PWD/../../../../usr/lib
DEPENDPATH += $$PWD/../../../../usr/lib
unix:!macx: LIBS += -L$$PWD/../../../../usr/lib/ -lgvc
INCLUDEPATH += $$PWD/../../../../usr/lib
DEPENDPATH += $$PWD/../../../../usr/lib
unix:!macx: LIBS += -L$$PWD/../../../usr/lib/graphviz/ -lgvplugin_dot_layout
INCLUDEPATH += $$PWD/../../../usr/lib/graphviz
DEPENDPATH += $$PWD/../../../usr/lib/graphviz
unix:!macx: LIBS += -L$$PWD/../../../usr/lib/graphviz/ -lgvplugin_core
INCLUDEPATH += $$PWD/../../../usr/lib/graphviz
DEPENDPATH += $$PWD/../../../usr/lib/graphviz
unix:!macx: LIBS += -L$$PWD/../../../../usr/lib/ -lpathplan
INCLUDEPATH += $$PWD/../../../../usr/lib
DEPENDPATH += $$PWD/../../../../usr/lib
unix:!macx: LIBS += -L$$PWD/../../../../usr/lib/ -lxdot
INCLUDEPATH += $$PWD/../../../../usr/lib
DEPENDPATH += $$PWD/../../../../usr/lib
I also provide you an example of graphviz dot code if needed for ancestry.dot:
graph {
a -- b;
b -- c;
a -- c;
d -- c;
e -- c;
e -- a;
}
In my lib folder, I have the following libraries:
ld-linux-x86-64.so.2 libc.so.6 libgvplugin_dot_layout.so.6 libxdot.so.4
libcdt.so.5 libgvc.so.6 libgvplugin_gd.so.6
libcgraph.so.6 libgvplugin_core.so.6 libpathplan.so.4
To load these libraries at execution time, I use the following script:
#!/bin/sh
appname=`basename $0 | sed s,\.sh$,,`
dirname=`pwd`
lib=/lib/
chmod +x $dirname/$appname
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$dirname$lib
echo $LD_LIBRARY_PATH
./$appname "$#"
When I execute my code, I get a segmentation fault ... Any idea of what is happening?
I try to compile a project in qt and after i link the necessary libs i ghet the fallowing linking error :
labelbox.obj:-1: error: LNK2019: unresolved external symbol "public: void __thiscall LabelImage::setAxis(class Eigen::Matrix<double,4,4,0,4,4>)" (?setAxis#LabelImage##QAEXV?$Matrix#N$03$03$0A#$03$03#Eigen###Z) referenced in function "public: void __thiscall ImageView::setRotMat(class Eigen::Matrix<double,4,4,0,4,4> &)" (?setRotMat#ImageView##QAEXAAV?$Matrix#N$03$03$0A#$03$03#Eigen###Z)
If i go in the matrix.h from eigen i see the next problems :
In the fallowing lines of code :
template<typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
class Matrix
: public PlainObjectBase<Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols> >
{
public:
/** \brief Base class typedef.
* \sa PlainObjectBase
*/
typedef PlainObjectBase<Matrix> Base;
enum { Options = _Options };
EIGEN_DENSE_PUBLIC_INTERFACE(Matrix)
typedef typename Base::PlainObject PlainObject;
using Base::base;
using Base::coeffRef;
/**
* \brief Assigns matrices to each other.
*
* \note This is a special case of the templated operator=. Its purpose is
* to prevent a default operator= from hiding the templated operator=.
*
* \callgraph
*/
EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE Matrix& operator=(const Matrix& other)
{
return Base::_set(other);
}
/** \internal
* \brief Copies the value of the expression \a other into \c *this with automatic resizing.
*
* *this might be resized to match the dimensions of \a other. If *this was a null matrix (not already initialized),
* it will be initialized.
*
* Note that copying a row-vector into a vector (and conversely) is allowed.
* The resizing, if any, is then done in the appropriate way so that row-vectors
* remain row-vectors and vectors remain vectors.
*/
template<typename OtherDerived>
EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE Matrix& operator=(const DenseBase<OtherDerived>& other)
{
return Base::_set(other);
}
/* Here, doxygen failed to copy the brief information when using \copydoc */
/**
* \brief Copies the generic expression \a other into *this.
* \copydetails DenseBase::operator=(const EigenBase<OtherDerived> &other)
*/
template<typename OtherDerived>
EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE Matrix& operator=(const EigenBase<OtherDerived> &other)
{
return Base::operator=(other);
}
template<typename OtherDerived>
EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE Matrix& operator=(const ReturnByValue<OtherDerived>& func)
{
return Base::operator=(func);
}
/** \brief Default constructor.
*
* For fixed-size matrices, does nothing.
*
* For dynamic-size matrices, creates an empty matrix of size 0. Does not allocate any array. Such a matrix
* is called a null matrix. This constructor is the unique way to create null matrices: resizing
* a matrix to 0 is not supported.
*
* \sa resize(Index,Index)
*/
EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE Matrix() : Base()
{
Base::_check_template_params();
EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED
}
// FIXME is it still needed
EIGEN_DEVICE_FUNC
explicit Matrix(internal::constructor_without_unaligned_array_assert)
: Base(internal::constructor_without_unaligned_array_assert())
{ Base::_check_template_params(); EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED }
#if EIGEN_HAS_RVALUE_REFERENCES
EIGEN_DEVICE_FUNC
Matrix(Matrix&& other) EIGEN_NOEXCEPT_IF(std::is_nothrow_move_constructible<Scalar>::value)
: Base(std::move(other))
{
Base::_check_template_params();
if (RowsAtCompileTime!=Dynamic && ColsAtCompileTime!=Dynamic)
Base::_set_noalias(other);
}
EIGEN_DEVICE_FUNC
Matrix& operator=(Matrix&& other) EIGEN_NOEXCEPT_IF(std::is_nothrow_move_assignable<Scalar>::value)
{
other.swap(*this);
return *this;
}
#endif
#ifndef EIGEN_PARSED_BY_DOXYGEN
// This constructor is for both 1x1 matrices and dynamic vectors
template<typename T>
EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE explicit Matrix(const T& x)
{
Base::_check_template_params();
Base::template _init1<T>(x);
}
template<typename T0, typename T1>
EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE Matrix(const T0& x, const T1& y)
{
Base::_check_template_params();
Base::template _init2<T0,T1>(x, y);
}
#else
/** \brief Constructs a fixed-sized matrix initialized with coefficients starting at \a data */
EIGEN_DEVICE_FUNC
explicit Matrix(const Scalar *data);
/** \brief Constructs a vector or row-vector with given dimension. \only_for_vectors
*
* This is useful for dynamic-size vectors. For fixed-size vectors,
* it is redundant to pass these parameters, so one should use the default constructor
* Matrix() instead.
*
* \warning This constructor is disabled for fixed-size \c 1x1 matrices. For instance,
* calling Matrix<double,1,1>(1) will call the initialization constructor: Matrix(const Scalar&).
* For fixed-size \c 1x1 matrices it is therefore recommended to use the default
* constructor Matrix() instead, especially when using one of the non standard
* \c EIGEN_INITIALIZE_MATRICES_BY_{ZERO,\c NAN} macros (see \ref TopicPreprocessorDirectives).
*/
EIGEN_STRONG_INLINE explicit Matrix(Index dim);
/** \brief Constructs an initialized 1x1 matrix with the given coefficient */
Matrix(const Scalar& x);
/** \brief Constructs an uninitialized matrix with \a rows rows and \a cols columns.
*
* This is useful for dynamic-size matrices. For fixed-size matrices,
* it is redundant to pass these parameters, so one should use the default constructor
* Matrix() instead.
*
* \warning This constructor is disabled for fixed-size \c 1x2 and \c 2x1 vectors. For instance,
* calling Matrix2f(2,1) will call the initialization constructor: Matrix(const Scalar& x, const Scalar& y).
* For fixed-size \c 1x2 or \c 2x1 vectors it is therefore recommended to use the default
* constructor Matrix() instead, especially when using one of the non standard
* \c EIGEN_INITIALIZE_MATRICES_BY_{ZERO,\c NAN} macros (see \ref TopicPreprocessorDirectives).
*/
EIGEN_DEVICE_FUNC
Matrix(Index rows, Index cols);
/** \brief Constructs an initialized 2D vector with given coefficients */
Matrix(const Scalar& x, const Scalar& y);
#endif
/** \brief Constructs an initialized 3D vector with given coefficients */
EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE Matrix(const Scalar& x, const Scalar& y, const Scalar& z)
{
Base::_check_template_params();
EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(Matrix, 3)
m_storage.data()[0] = x;
m_storage.data()[1] = y;
m_storage.data()[2] = z;
}
/** \brief Constructs an initialized 4D vector with given coefficients */
EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE Matrix(const Scalar& x, const Scalar& y, const Scalar& z, const Scalar& w)
{
Base::_check_template_params();
EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(Matrix, 4)
m_storage.data()[0] = x;
m_storage.data()[1] = y;
m_storage.data()[2] = z;
m_storage.data()[3] = w;
}
/** \brief Copy constructor */
EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE Matrix(const Matrix& other) : Base(other)
{ }
/** \brief Copy constructor for generic expressions.
* \sa MatrixBase::operator=(const EigenBase<OtherDerived>&)
*/
template<typename OtherDerived>
EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE Matrix(const EigenBase<OtherDerived> &other)
: Base(other.derived())
{ }
EIGEN_DEVICE_FUNC inline Index innerStride() const { return 1; }
EIGEN_DEVICE_FUNC inline Index outerStride() const { return this->innerSize(); }
/////////// Geometry module ///////////
template<typename OtherDerived>
EIGEN_DEVICE_FUNC
explicit Matrix(const RotationBase<OtherDerived,ColsAtCompileTime>& r);
template<typename OtherDerived>
EIGEN_DEVICE_FUNC
Matrix& operator=(const RotationBase<OtherDerived,ColsAtCompileTime>& r);
// allow to extend Matrix outside Eigen
#ifdef EIGEN_MATRIX_PLUGIN
#include EIGEN_MATRIX_PLUGIN
#endif
protected:
template <typename Derived, typename OtherDerived, bool IsVector>
friend struct internal::conservative_resize_like_impl;
using Base::m_storage;
};
/** \defgroup matrixtypedefs Global matrix typedefs
*
* \ingroup Core_Module
*
* Eigen defines several typedef shortcuts for most common matrix and vector types.
*
* The general patterns are the following:
*
* \c MatrixSizeType where \c Size can be \c 2,\c 3,\c 4 for fixed size square matrices or \c X for dynamic size,
* and where \c Type can be \c i for integer, \c f for float, \c d for double, \c cf for complex float, \c cd
* for complex double.
*
* For example, \c Matrix3d is a fixed-size 3x3 matrix type of doubles, and \c MatrixXf is a dynamic-size matrix of floats.
*
* There are also \c VectorSizeType and \c RowVectorSizeType which are self-explanatory. For example, \c Vector4cf is
* a fixed-size vector of 4 complex floats.
*
* \sa class Matrix
*/
#define EIGEN_MAKE_TYPEDEFS(Type, TypeSuffix, Size, SizeSuffix) \
/** \ingroup matrixtypedefs */ \
typedef Matrix<Type, Size, Size> Matrix##SizeSuffix##TypeSuffix; \
/** \ingroup matrixtypedefs */ \
typedef Matrix<Type, Size, 1> Vector##SizeSuffix##TypeSuffix; \
/** \ingroup matrixtypedefs */ \
typedef Matrix<Type, 1, Size> RowVector##SizeSuffix##TypeSuffix;
#define EIGEN_MAKE_FIXED_TYPEDEFS(Type, TypeSuffix, Size) \
/** \ingroup matrixtypedefs */ \
typedef Matrix<Type, Size, Dynamic> Matrix##Size##X##TypeSuffix; \
/** \ingroup matrixtypedefs */ \
typedef Matrix<Type, Dynamic, Size> Matrix##X##Size##TypeSuffix;
#define EIGEN_MAKE_TYPEDEFS_ALL_SIZES(Type, TypeSuffix) \
EIGEN_MAKE_TYPEDEFS(Type, TypeSuffix, 2, 2) \
EIGEN_MAKE_TYPEDEFS(Type, TypeSuffix, 3, 3) \
EIGEN_MAKE_TYPEDEFS(Type, TypeSuffix, 4, 4) \
EIGEN_MAKE_TYPEDEFS(Type, TypeSuffix, Dynamic, X) \
EIGEN_MAKE_FIXED_TYPEDEFS(Type, TypeSuffix, 2) \
EIGEN_MAKE_FIXED_TYPEDEFS(Type, TypeSuffix, 3) \
EIGEN_MAKE_FIXED_TYPEDEFS(Type, TypeSuffix, 4)
EIGEN_MAKE_TYPEDEFS_ALL_SIZES(int, i)
EIGEN_MAKE_TYPEDEFS_ALL_SIZES(float, f)
EIGEN_MAKE_TYPEDEFS_ALL_SIZES(double, d)
EIGEN_MAKE_TYPEDEFS_ALL_SIZES(std::complex<float>, cf)
EIGEN_MAKE_TYPEDEFS_ALL_SIZES(std::complex<double>, cd)
#undef EIGEN_MAKE_TYPEDEFS_ALL_SIZES
#undef EIGEN_MAKE_TYPEDEFS
#undef EIGEN_MAKE_FIXED_TYPEDEFS
} // end namespace Eigen
#endif // EIGEN_MATRIX_H
I got the next errors :
D:\toolchain-master\LabelingTool\Dependencies\build_dir\include\eigen3\Eigen\src\Core\Matrix.h:18: error: use of undeclared identifier 'Matrix'
D:\toolchain-master\LabelingTool\Dependencies\build_dir\include\eigen3\Eigen\src\Core\Matrix.h:18: error: '_Scalar' does not refer to a value
D:\toolchain-master\LabelingTool\Dependencies\build_dir\include\eigen3\Eigen\src\Core\Matrix.h:18: error: explicit specialization of non-template struct 'traits'
D:\toolchain-master\LabelingTool\Dependencies\build_dir\include\eigen3\Eigen\src\Core\Matrix.h:179: error: unknown template name 'PlainObjectBase'
D:\toolchain-master\LabelingTool\Dependencies\build_dir\include\eigen3\Eigen\src\Core\Matrix.h:186: error: no template named 'PlainObjectBase'
D:\toolchain-master\LabelingTool\Dependencies\build_dir\include\eigen3\Eigen\src\Core\Matrix.h:190: error: expected ';' at end of declaration list
D:\toolchain-master\LabelingTool\Dependencies\build_dir\include\eigen3\Eigen\src\Core\Matrix.h:194: error: 'Eigen::Matrix::Base' (aka 'int') is not a class, namespace, or enumeration
D:\toolchain-master\LabelingTool\Dependencies\build_dir\include\eigen3\Eigen\src\Core\Matrix.h:205: error: unknown type name 'EIGEN_DEVICE_FUNC'
D:\toolchain-master\LabelingTool\Dependencies\build_dir\include\eigen3\Eigen\src\Core\Matrix.h:450: error: too few template arguments for class template 'Matrix'
................................................
I don't know if i link the library correctly , here is my .pro folder :
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
QT += core gui charts
TARGET = LabelingTool
TEMPLATE = app
CONFIG += c++11
# The following define makes your compiler emit warnings if you use
# any feature of Qt which has been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
INCLUDEPATH += /usr/local/include/
LIBS += -L/usr/local/lib64 -losg -losgDB -losgGA -losgViewer -losgText
# LIBS += D:/Qt/5.11.2/msvc2015/ -llibEGL -llibGLESv2 -lQt5AccessibilitySupport -lQt5AxBase -lQt5AxContainer -lQt5AxServer -lQt5Bluetooth -lQt5Bootstrap -lQt5Charts -lQt5Concurrent
SOURCES += \
src/main.cpp \
src/MainWindow/mainwindow.cpp \
src/MainOsgViewer/mainosgviewer.cpp \
src/LabelData/labeldata.cpp \
src/LabelEventHandler/labeleventhandler.cpp \
src/ImageView/imageview.cpp \
src/InformationFormular/informationformular.cpp \
src/Polynomial/polynomial.cpp \
src/Chart/chart.cpp \
src/LabelImage/labelimage.cpp \
src/YamlReader/yamlreader.cpp \
src/LabelBox/labelbox.cpp \
src/SliderBar/sliderbar.cpp \
src/LabelData/labeldata.cpp \
HEADERS += \
src/MainWindow/mainwindow.h \
src/MainOsgViewer/mainosgviewer.h \
src/LabelData/labeldata.h \
src/LabelEventHandler/labeleventhandler.h \
src/ImageView/imageview.h \
src/InformationFormular/informationformular.h \
src/Polynomial/polynomial.h \
src/Chart/chart.h \
src/LabelImage/labelimage.h \
src/YamlReader/yamlreader.h \
src/LabelBox/labelbox.h \
src/SliderBar/sliderbar.h \
src/LabelData/labeldata.h \
Dependencies/build_dir/include/eigen3/Eigen/src/Core/Matrix.h \
DISTFILES += \
CMakeLists.txt
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -lOpenThreads \
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -lOpenThreadsd \
else:unix: LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -lOpenThreads \
INCLUDEPATH += $$PWD/Dependencies/OSG.3.4.0/include \
DEPENDPATH += $$PWD/Dependencies/OSG.3.4.0/include \
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losgAnimation
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losgAnimationd
else:unix: LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losgAnimation
INCLUDEPATH += $$PWD/Dependencies/OSG.3.4.0/include
DEPENDPATH += $$PWD/Dependencies/OSG.3.4.0/include
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losg
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losgd
else:unix: LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losg
INCLUDEPATH += $$PWD/Dependencies/OSG.3.4.0/include
DEPENDPATH += $$PWD/Dependencies/OSG.3.4.0/include
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losgDB
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losgDBd
else:unix: LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losgDB
INCLUDEPATH += $$PWD/Dependencies/OSG.3.4.0/include
DEPENDPATH += $$PWD/Dependencies/OSG.3.4.0/include
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losgFX
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losgFXd
else:unix: LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losgFX
INCLUDEPATH += $$PWD/Dependencies/OSG.3.4.0/include
DEPENDPATH += $$PWD/Dependencies/OSG.3.4.0/include
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losgManipulator
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losgManipulatord
else:unix: LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losgManipulator
INCLUDEPATH += $$PWD/Dependencies/OSG.3.4.0/include
DEPENDPATH += $$PWD/Dependencies/OSG.3.4.0/include
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losgParticle
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losgParticled
else:unix: LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losgParticle
INCLUDEPATH += $$PWD/Dependencies/OSG.3.4.0/include
DEPENDPATH += $$PWD/Dependencies/OSG.3.4.0/include
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losgPresentation
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losgPresentationd
else:unix: LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losgPresentation
INCLUDEPATH += $$PWD/Dependencies/OSG.3.4.0/include
DEPENDPATH += $$PWD/Dependencies/OSG.3.4.0/include
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losgShadow
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losgShadowd
else:unix: LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losgShadow
INCLUDEPATH += $$PWD/Dependencies/OSG.3.4.0/include
DEPENDPATH += $$PWD/Dependencies/OSG.3.4.0/include
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losgSim
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losgSimd
else:unix: LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losgSim
INCLUDEPATH += $$PWD/Dependencies/OSG.3.4.0/include
DEPENDPATH += $$PWD/Dependencies/OSG.3.4.0/include
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losgTerrain
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losgTerraind
else:unix: LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losgTerrain
INCLUDEPATH += $$PWD/Dependencies/OSG.3.4.0/include
DEPENDPATH += $$PWD/Dependencies/OSG.3.4.0/include
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losgText
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losgTextd
else:unix: LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losgText
INCLUDEPATH += $$PWD/Dependencies/OSG.3.4.0/include
DEPENDPATH += $$PWD/Dependencies/OSG.3.4.0/include
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losgUI
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losgUId
else:unix: LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losgUI
INCLUDEPATH += $$PWD/Dependencies/OSG.3.4.0/include
DEPENDPATH += $$PWD/Dependencies/OSG.3.4.0/include
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losgUtil
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losgUtild
else:unix: LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losgUtil
INCLUDEPATH += $$PWD/Dependencies/OSG.3.4.0/include
DEPENDPATH += $$PWD/Dependencies/OSG.3.4.0/include
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losgViewer
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losgViewerd
else:unix: LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losgViewer
INCLUDEPATH += $$PWD/Dependencies/OSG.3.4.0/include
DEPENDPATH += $$PWD/Dependencies/OSG.3.4.0/include
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losgVolume
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losgVolumed
else:unix: LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losgVolume
INCLUDEPATH += $$PWD/Dependencies/OSG.3.4.0/include
DEPENDPATH += $$PWD/Dependencies/OSG.3.4.0/include
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losgWidget
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losgWidgetd
else:unix: LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losgWidget
INCLUDEPATH += $$PWD/Dependencies/OSG.3.4.0/include
DEPENDPATH += $$PWD/Dependencies/OSG.3.4.0/include
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losgGA
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losgGAd
else:unix: LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losgGA
INCLUDEPATH += $$PWD/Dependencies/OSG.3.4.0/include
DEPENDPATH += $$PWD/Dependencies/OSG.3.4.0/include
INCLUDEPATH += $$PWD/Dependencies/eigen-eigen
DEPENDPATH += $$PWD/Dependencies/eigen-eigen
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/Dependencies/yaml-cpp-masterr/lib/ -llibyaml-cppmd
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/Dependencies/yaml-cpp-masterr/lib/ -llibyaml-cppmdd
else:unix: LIBS += -L$$PWD/Dependencies/yaml-cpp-masterr/lib/ -llibyaml-cppmd
INCLUDEPATH += $$PWD/Dependencies/yaml-cpp-masterr/include
DEPENDPATH += $$PWD/Dependencies/yaml-cpp-masterr/include
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losg
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losgd
else:unix: LIBS += -L$$PWD/Dependencies/OSG.3.4.0/lib/ -losg
INCLUDEPATH += $$PWD/Dependencies/OSG.3.4.0/include
DEPENDPATH += $$PWD/Dependencies/OSG.3.4.0/include
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../Qt/5.11.2/msvc2015/lib/ -lQt5Core
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../Qt/5.11.2/msvc2015/lib/ -lQt5Cored
else:unix: LIBS += -L$$PWD/../../Qt/5.11.2/msvc2015/lib/ -lQt5Core
INCLUDEPATH += $$PWD/../../Qt/5.11.2/msvc2015/include
DEPENDPATH += $$PWD/../../Qt/5.11.2/msvc2015/include
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../Qt/5.11.2/msvc2015/lib/ -lQt5Gui
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../Qt/5.11.2/msvc2015/lib/ -lQt5Guid
else:unix: LIBS += -L$$PWD/../../Qt/5.11.2/msvc2015/lib/ -lQt5Gui
INCLUDEPATH += $$PWD/../../Qt/5.11.2/msvc2015/include
DEPENDPATH += $$PWD/../../Qt/5.11.2/msvc2015/include
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../Qt/5.11.2/msvc2015/lib/ -lQt5Svg
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../Qt/5.11.2/msvc2015/lib/ -lQt5Svgd
else:unix: LIBS += -L$$PWD/../../Qt/5.11.2/msvc2015/lib/ -lQt5Svg
INCLUDEPATH += $$PWD/../../Qt/5.11.2/msvc2015/include
DEPENDPATH += $$PWD/../../Qt/5.11.2/msvc2015/include
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../Qt/5.11.2/msvc2015/lib/ -lQt5Widgets
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../Qt/5.11.2/msvc2015/lib/ -lQt5Widgetsd
else:unix: LIBS += -L$$PWD/../../Qt/5.11.2/msvc2015/lib/ -lQt5Widgets
INCLUDEPATH += $$PWD/../../Qt/5.11.2/msvc2015/include
DEPENDPATH += $$PWD/../../Qt/5.11.2/msvc2015/include
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../Qt/5.11.2/msvc2015/lib/ -lQt5Script
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../Qt/5.11.2/msvc2015/lib/ -lQt5Scriptd
else:unix: LIBS += -L$$PWD/../../Qt/5.11.2/msvc2015/lib/ -lQt5Script
INCLUDEPATH += $$PWD/../../Qt/5.11.2/msvc2015/lib
DEPENDPATH += $$PWD/../../Qt/5.11.2/msvc2015/lib
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../Qt/5.11.2/msvc2015/lib/ -lqtmain
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../Qt/5.11.2/msvc2015/lib/ -lqtmaind
else:unix: LIBS += -L$$PWD/../../Qt/5.11.2/msvc2015/lib/ -lqtmain
INCLUDEPATH += $$PWD/../../Qt/5.11.2/msvc2015/lib
DEPENDPATH += $$PWD/../../Qt/5.11.2/msvc2015/lib
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../Qt/5.11.2/msvc2015/lib/ -lQt5QuickWidgets
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../Qt/5.11.2/msvc2015/lib/ -lQt5QuickWidgetsd
else:unix: LIBS += -L$$PWD/../../Qt/5.11.2/msvc2015/lib/ -lQt5QuickWidgets
INCLUDEPATH += $$PWD/../../Qt/5.11.2/msvc2015/include
DEPENDPATH += $$PWD/../../Qt/5.11.2/msvc2015/include
.................................................................................
I don't use qt, so take this with a grain of salt. You have two possible issues that I see:
In the
HEADERS += \
....
Dependencies/build_dir/include/eigen3/Eigen/src/Core/Matrix.h \
I think you shoud be using Dependencies/build_dir/include/eigen3/Eigen/Core instead.
The lines:
INCLUDEPATH += $$PWD/Dependencies/eigen-eigen
DEPENDPATH += $$PWD/Dependencies/eigen-eigen
seem to have a different path than the included path in item '1' above. This may not be an issue if the two directories are identical, but if not, you'll have version mismatch issues.
I've build CGAL like explained here.
Everything went well.
But now, I'm using Qt Creator with CGAL.
I've included the libraries in the .pro file :
QT += core
QT -= gui
TARGET = TestCCGALAppliConsole
CONFIG += console
CONFIG -= app_bundle
CONFIG += c++11
TEMPLATE = app
INCLUDEPATH += /usr/local/include
DEPENDPATH += /usr/local/include
LIBS += -L/usr/local/include
macx: LIBS += -L/usr/local/lib/ -lgmp
macx: LIBS += -L/usr/local/lib/ -lmpfr
macx: LIBS += -L/usr/local/lib/ -lCGAL
SOURCES += main.cpp
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../../local/CGAL-4.6/build/lib/release/ -lCGAL-vc100-mt-gd-4.6
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../../local/CGAL-4.6/build/lib/debug/ -lCGAL-vc100-mt-4.6
INCLUDEPATH += $$PWD/../../../../local/CGAL-4.6/build/lib/Debug
DEPENDPATH += $$PWD/../../../../local/CGAL-4.6/build/lib/Debug
INCLUDEPATH += C:\local\CGAL-4.6\include
win32: LIBS += -L$$PWD/../../../../local/CGAL-4.6/auxiliary/gmp/lib/ -llibgmp-10
INCLUDEPATH += $$PWD/../../../../local/CGAL-4.6/auxiliary/gmp/include
DEPENDPATH += $$PWD/../../../../local/CGAL-4.6/auxiliary/gmp/include
win32: LIBS += -L$$PWD/../../../../local/CGAL-4.6/auxiliary/gmp/lib/ -llibmpfr-4
INCLUDEPATH += $$PWD/../../../../local/CGAL-4.6/auxiliary/gmp/include
DEPENDPATH += $$PWD/../../../../local/CGAL-4.6/auxiliary/gmp/include
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../../local/boost_1_57_0/lib64-msvc-10.0/ -lboost_system-vc100-mt-1_57
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../../local/boost_1_57_0/lib64-msvc-10.0/ -lboost_system-vc100-mt-gd-1_57
INCLUDEPATH += $$PWD/../../../../local/boost_1_57_0/lib64-msvc-10.0
DEPENDPATH += $$PWD/../../../../local/boost_1_57_0/lib64-msvc-10.0
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../../local/boost_1_57_0/lib64-msvc-10.0/ -lboost_thread-vc100-mt-1_57
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../../local/boost_1_57_0/lib64-msvc-10.0/ -lboost_thread-vc100-mt-gd-1_57
INCLUDEPATH += $$PWD/../../../../local/boost_1_57_0/lib64-msvc-10.0
DEPENDPATH += $$PWD/../../../../local/boost_1_57_0/lib64-msvc-10.0
INCLUDEPATH += C:\local\boost_1_57_0
and in my main.cpp I have :
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Polyhedron_3.h>
#include <CGAL/Polyhedron_items_with_id_3.h>
#include <CGAL/IO/Polyhedron_iostream.h>
#include <iostream>
#include <fstream>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Polyhedron_3<K, CGAL::Polyhedron_items_with_id_3> Polyhedron;
typedef Polyhedron::Vertex_iterator Vertex_iterator;
int main() {
Polyhedron mesh;
std::ifstream input("inner.off");
if ( !input || !(input >> mesh) || mesh.empty() )
{
//Debug
std::cerr << "Not a valid off file." << std::endl;
return 0;
}
for (Vertex_iterator v = mesh.vertices_begin() ; v!= mesh.vertices_end() ; ++v )
{
std::cout << v->point() << std::endl;
}
std::cout << "Hello You" << std::endl;
return 0;
}
when I compile (with MinGW 4.9.1 32 bit with Qt 5.4.1) I'm having this error :
C:\local\CGAL-4.6\include\CGAL\double.h:191: erreur : '_nextafter' was
not declared in this scope return _nextafter(d1, d2); // works at
least for VC++-7.1
I can't figure out what's wrong...
Can you help me ?
EDIT
It seems that CGAL being compiled with Visual Studio C++ Compiler 10 involves that I have to compile with this compiler and not MinGW.
So I changed compile, I'm now using Microsoft Visual C++ Compiler 10 (amd64) in Qt Creator, but it still don't work. I have an error :
impossible to open 'CGAL-vc100-mt-4.6.lib' file
Here's the complete error (sorry, french version...) :
17:42:15: Exécution des étapes pour le projet TestCCGALAppliConsole...
17:42:15: Configuration inchangée, étape qmake sautée.
17:42:15: Débute : "C:\Qt\Tools\QtCreator\bin\jom.exe"
C:\Qt\Tools\QtCreator\bin\jom.exe -f Makefile.Debug
cl -c -nologo -Zm200 -Zc:wchar_t -Zi -MDd -GR -W3 -w34100 -w34189 -EHsc /Fddebug\TestCCGALAppliConsole.pdb -DUNICODE -DWIN32 -DWIN64 -DQT_CORE_LIB -I"..\TestCCGALAppliConsole" -I"." -I"\usr\local\include" -I"..\..\..\..\local\CGAL-4.6\build\lib\Debug" -I"..\..\..\..\local\CGAL-4.6\include" -I"..\..\..\..\local\CGAL-4.6\auxiliary\gmp\include" -I"..\..\..\..\local\CGAL-4.6\auxiliary\gmp\include" -I"..\..\..\..\local\boost_1_57_0\lib64-msvc-10.0" -I"..\..\..\..\local\boost_1_57_0\lib64-msvc-10.0" -I"..\..\..\..\local\boost_1_57_0" -I"..\..\..\..\Qt\qt-5.4.1-x64-msvc2010-rev1\qt-5.4.1-x64-msvc2010-rev1\include" -I"..\..\..\..\Qt\qt-5.4.1-x64-msvc2010-rev1\qt-5.4.1-x64-msvc2010-rev1\include\QtCore" -I"debug" -I"..\..\..\..\Qt\qt-5.4.1-x64-msvc2010-rev1\qt-5.4.1-x64-msvc2010-rev1\mkspecs\win32-msvc2010" -Fodebug\ #C:\Users\Raphael\AppData\Local\Temp\main.obj.1988.32.jom
main.cpp
echo 1 /* CREATEPROCESS_MANIFEST_RESOURCE_ID */ 24 /* RT_MANIFEST */ "debug\\TestCCGALAppliConsole.exe.embed.manifest">debug\TestCCGALAppliConsole.exe_manifest.rc
if not exist debug\TestCCGALAppliConsole.exe if exist debug\TestCCGALAppliConsole.exe.embed.manifest del debug\TestCCGALAppliConsole.exe.embed.manifest
if exist debug\TestCCGALAppliConsole.exe.embed.manifest copy /Y debug\TestCCGALAppliConsole.exe.embed.manifest debug\TestCCGALAppliConsole.exe_manifest.bak
link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /SUBSYSTEM:CONSOLE "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST /MANIFESTFILE:debug\TestCCGALAppliConsole.exe.embed.manifest /OUT:debug\TestCCGALAppliConsole.exe #C:\Users\Raphael\AppData\Local\Temp\TestCCGALAppliConsole.exe.1988.5000.jom
LINK : fatal error LNK1104: impossible d'ouvrir le fichier 'CGAL-vc100-mt-4.6.lib'
jom: C:\Users\Raphael\Desktop\build-TestCCGALAppliConsole-Desktop_Qt_5_4_1_MSVC2010_x64-Debug\Makefile.Debug [debug\TestCCGALAppliConsole.exe] Error 1104
jom: C:\Users\Raphael\Desktop\build-TestCCGALAppliConsole-Desktop_Qt_5_4_1_MSVC2010_x64-Debug\Makefile [debug] Error 2
17:42:21: Le processus "C:\Qt\Tools\QtCreator\bin\jom.exe" s'est terminé avec le code 2.
Erreur lors de la compilation/déploiement du projet TestCCGALAppliConsole (kit : Desktop Qt 5.4.1 MSVC2010 x64)
When executing step "Make"
17:42:21: Temps écoulé : 00:05.
Well, it's right there in your message:
when I compile (with MinGW
versus
works at least for VC++-7.1
_nextafter is a Microsoft extension used by CGAL. MinGW doesn't appear to support it.
I am trying to use the poco library in Qt Creator with one of the samples that came with poco, I have gotten this to work in Visual Studio 2012 but I keep getting build errors in Qt Creator.
I have both .dll and .lib in my lib path.
here is my .pro file
TEMPLATE = app
CONFIG += console
CONFIG -= qt
SOURCES += main.cpp
INCLUDEPATH += C:\Users\justin\Downloads\poco-1.4.6\Net\include
INCLUDEPATH += C:\Users\justin\Downloads\poco-1.4.6\Foundation\include
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/lib/ -lPocoFoundation
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/lib/ -lPocoFoundationd
INCLUDEPATH += $$PWD/
DEPENDPATH += $$PWD/
win32:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/lib/PocoFoundation.lib
else:win32:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/lib/PocoFoundationd.lib
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/lib/ -lPocoNet
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/lib/ -lPocoNetd
INCLUDEPATH += $$PWD/
DEPENDPATH += $$PWD/
win32:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/lib/PocoNet.lib
else:win32:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/lib/PocoNetd.lib
and here is the .cpp file
#include "Poco/URIStreamOpener.h"
#include "Poco/StreamCopier.h"
#include "Poco/Path.h"
#include "Poco/URI.h"
#include "Poco/Exception.h"
#include "Poco/Net/HTTPStreamFactory.h"
#include "Poco/Net/FTPStreamFactory.h"
#include <memory>
#include <iostream>
using Poco::URIStreamOpener;
using Poco::StreamCopier;
using Poco::Path;
using Poco::URI;
using Poco::Exception;
using Poco::Net::HTTPStreamFactory;
using Poco::Net::FTPStreamFactory;
int main(int argc, char** argv)
{
HTTPStreamFactory::registerFactory();
FTPStreamFactory::registerFactory();
try
{
URI uri("http://example.com");
std::auto_ptr<std::istream> pStr(URIStreamOpener::defaultOpener().open(uri));
StreamCopier::copyStream(*pStr.get(), std::cout);
}
catch (Exception& exc)
{
std::cerr << exc.displayText() << std::endl;
return 1;
}
return 0;
}
and these are the build errors:
undefined reference to `Poco::Net::HTTPStreamFactory::registerFactory()'
undefined reference to `Poco::Net::FTPStreamFactory::registerFactory()'
undefined reference to `Poco::URI::URI(char const*)'
undefined reference to `Poco::URIStreamOpener::defaultOpener()'
undefined reference to `Poco::URIStreamOpener::open(Poco::URI const&) const'
undefined reference to `Poco::StreamCopier::copyStream(std::istream&, std::ostream&, unsigned int)'
undefined reference to `Poco::URI::~URI()'
undefined reference to `Poco::URI::~URI()'
The same compiler must be used to compile all three of the below:
Poco library
Qt library
Your application
My hunch is that you use MSVC2012 for #3, you correctly downloaded #2 for MSVC2012, but you did not compile #1 with MSVC2012.