From: Sergey BELASH Date: Fri, 11 Apr 2014 16:10:08 +0000 (+0400) Subject: Changes in source code within porting on CentOS 6.3 X-Git-Tag: V_0.1~8^2~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b948502434f1af72184656e478095dae3fe00f96;p=modules%2Fshaper.git Changes in source code within porting on CentOS 6.3 --- diff --git a/CMakeCommon/FindPython.cmake b/CMakeCommon/FindPython.cmake index 5b8f5f04d..d33eae0dd 100644 --- a/CMakeCommon/FindPython.cmake +++ b/CMakeCommon/FindPython.cmake @@ -1,19 +1,19 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.10) - IF(WIN32) IF(CMAKE_BUILD_TYPE STREQUAL "Debug") - SET(PYTHON_LIBRARY_DLL "python27_d.lib") + SET(PYTHON_LIBRARY_FILE "python27_d.lib") ElSE() - SET(PYTHON_LIBRARY_DLL "python27.lib") + SET(PYTHON_LIBRARY_FILE "python27.lib") ENDIF() ElSE() - SET(PYTHON_LIBRARY_DLL "libpython27.so") + SET(PYTHON_LIBRARY_FILE "libpython2.7.so") ENDIF() -FILE(TO_CMAKE_PATH "$ENV{PYTHON_LIB_DIR}/${PYTHON_LIBRARY_DLL}" PYTHON_LIBRARY) +FILE(TO_CMAKE_PATH "$ENV{PYTHON_LIB_DIR}/${PYTHON_LIBRARY_FILE}" PYTHON_LIBRARY) FILE(TO_CMAKE_PATH $ENV{PYTHON_INC_DIR} PYTHON_INCLUDE_DIR) - FIND_PACKAGE(PythonLibs) -INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_DIRS}) +INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_DIR}) +MESSAGE(STATUS "PYTHON_LIBRARIES: " ${PYTHON_LIBRARIES}) +MESSAGE(STATUS "PYTHON_INCLUDE_DIR: " ${PYTHON_INCLUDE_DIR}) diff --git a/CMakeCommon/XMLProcessing.cmake b/CMakeCommon/XMLProcessing.cmake index 7a512165b..f54729b86 100644 --- a/CMakeCommon/XMLProcessing.cmake +++ b/CMakeCommon/XMLProcessing.cmake @@ -1,29 +1,21 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.10) SET(LIBXMLDIR $ENV{LIBXML2_ROOT_DIR}) -INCLUDE_DIRECTORIES(${LIBXMLDIR}/include/libxml2) -LINK_DIRECTORIES (${LIBXMLDIR}/lib) IF(WIN32) SET(LIBXML2_LIBRARIES ${LIBXMLDIR}/lib/libxml2.lib) + INCLUDE_DIRECTORIES(${LIBXMLDIR}/include/libxml2) ELSE() SET(LIBXML2_LIBRARIES ${LIBXMLDIR}/lib/libxml2.so) + SET(LIBXML2_INCLUDE_DIR ${LIBXMLDIR}/include/libxml2) + FIND_PACKAGE(LibXml2 REQUIRED) + if(LIBXML2_FOUND) + message(STATUS "Found libxml2 ver. " ${LIBXML2_VERSION_STRING}) + message(STATUS "LIBXML2_LIBRARIES " ${LIBXML2_LIBRARIES}) + message(STATUS "LIBXML2_INCLUDE_DIR " ${LIBXML2_INCLUDE_DIR}) + endif(LIBXML2_FOUND) + + INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) + ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) ENDIF() +LINK_DIRECTORIES (${LIBXMLDIR}/lib) - -#set(PROJECT_LIBRARIES ${PROJECT_LIBRARIES} ${LIBXMLDIR}/lib/libxml2.lib) - -#FILE(TO_CMAKE_PATH $ENV{PC_LIBXML_INCLUDEDIR} PC_LIBXML_INCLUDEDIR) -#FILE(TO_CMAKE_PATH $ENV{PC_LIBXML_INCLUDEDIR} PC_LIBXML_INCLUDEDIR) -#FILE(TO_CMAKE_PATH $ENV{PC_LIBXML_LIBDIR} PC_LIBXML_LIBDIR) -#message(STATUS "PC_LIBXML_INCLUDEDIR " ${PC_LIBXML_INCLUDEDIR}) -#message(STATUS "PC_LIBXML_LIBDIR " ${PC_LIBXML_LIBDIR}) - -#FIND_PACKAGE(LibXml2 REQUIRED) -#if(LIBXML2_FOUND) -# message(STATUS "Found libxml2 ver. " ${LIBXML2_VERSION_STRING}) -# message(STATUS "LIBXML2_LIBRARIES " ${LIBXML2_LIBRARIES}) -# message(STATUS "LIBXML2_INCLUDE_DIR " ${LIBXML2_INCLUDE_DIR}) -#endif(LIBXML2_FOUND) - -#INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) -#ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) diff --git a/CMakeLists.txt b/CMakeLists.txt index fcea072de..eeaee08cf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,6 +8,16 @@ INCLUDE(Common) INCLUDE(FindQt) INCLUDE(FindPython) +IF(UNIX) + IF(CMAKE_COMPILER_IS_GNUCC) + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") + MESSAGE(STATUS "Setting -std=c++0x flag for the gcc...") + MESSAGE(STATUS "Now gcc flags are: " ${CMAKE_CXX_FLAGS}) + + ENDIF(CMAKE_COMPILER_IS_GNUCC) +ENDIF(UNIX) + + ADD_SUBDIRECTORY (src/Config) ADD_SUBDIRECTORY (src/Event) ADD_SUBDIRECTORY (src/Model) diff --git a/centos6_env.sh b/centos6_env.sh index f9ec06de4..31f1c68d3 100644 --- a/centos6_env.sh +++ b/centos6_env.sh @@ -66,6 +66,7 @@ export CAS_ROOT_DIR=${INST_ROOT}/OCCT-6.7.0 export PATH=${CAS_ROOT_DIR}:${CAS_ROOT_DIR}/bin:${PATH} export LD_LIBRARY_PATH=${CAS_ROOT_DIR}:${CAS_ROOT_DIR}/lib:${LD_LIBRARY_PATH} +export CSF_GraphicShr=${CAS_ROOT_DIR}/lib/libTKOpenGl.so # Variable for Foundation Classes : export CSF_UnitsLexicon=${CAS_ROOT_DIR}/src/UnitsAPI/Lexi_Expr.dat export CSF_UnitsDefinition=${CAS_ROOT_DIR}/src/UnitsAPI/Units.dat @@ -82,4 +83,5 @@ export CASROOT=${CAS_ROOT_DIR} ## export LIB=${LD_LIBRARY_PATH} - +export PATH=${INST_ROOT}/../install/bin:${PATH} +export LD_LIBRARY_PATH=${INST_ROOT}/../install/bin:${INST_ROOT}/../install/swig:${LD_LIBRARY_PATH} diff --git a/src/Config/Config_FeatureReader.cpp b/src/Config/Config_FeatureReader.cpp index 1cb2ef83d..71ecc7afa 100644 --- a/src/Config/Config_FeatureReader.cpp +++ b/src/Config/Config_FeatureReader.cpp @@ -11,9 +11,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include diff --git a/src/Config/Config_ModuleReader.cpp b/src/Config/Config_ModuleReader.cpp index d77e6b830..642bb6bf5 100644 --- a/src/Config/Config_ModuleReader.cpp +++ b/src/Config/Config_ModuleReader.cpp @@ -9,8 +9,8 @@ #include #include -#include -#include +#include +#include #ifdef _DEBUG #include diff --git a/src/Config/Config_WidgetAPI.cpp b/src/Config/Config_WidgetAPI.cpp index 65d4b14ca..80eb56811 100644 --- a/src/Config/Config_WidgetAPI.cpp +++ b/src/Config/Config_WidgetAPI.cpp @@ -7,8 +7,8 @@ #include -#include -#include +#include +#include Config_WidgetAPI::Config_WidgetAPI(std::string theRawXml) diff --git a/src/Config/Config_WidgetReader.cpp b/src/Config/Config_WidgetReader.cpp index d746eb64e..032acb000 100644 --- a/src/Config/Config_WidgetReader.cpp +++ b/src/Config/Config_WidgetReader.cpp @@ -8,10 +8,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #ifdef _DEBUG #include diff --git a/src/Config/Config_XMLReader.cpp b/src/Config/Config_XMLReader.cpp index 0261f2551..085871fdd 100644 --- a/src/Config/Config_XMLReader.cpp +++ b/src/Config/Config_XMLReader.cpp @@ -8,8 +8,8 @@ #include #include -#include -#include +#include +#include /* #ifdef WIN32 diff --git a/src/Event/Event_Loop.cxx b/src/Event/Event_Loop.cxx index c5cadce44..c938dbe95 100644 --- a/src/Event/Event_Loop.cxx +++ b/src/Event/Event_Loop.cxx @@ -3,7 +3,9 @@ // Author: Mikhail PONIKAROV #include + #include +#include using namespace std; diff --git a/src/Model/Model_Document.cxx b/src/Model/Model_Document.cxx index 0e976420c..479de79a6 100644 --- a/src/Model/Model_Document.cxx +++ b/src/Model/Model_Document.cxx @@ -15,6 +15,8 @@ #include #include +#include + static const int UNDO_LIMIT = 10; // number of possible undo operations static const int TAG_GENERAL = 1; // general properties tag @@ -387,7 +389,7 @@ void Model_Document::synchronizeFeatures() TDF_ChildIDIterator aFLabIter( aGroupsIter.Value()->Label(), TDataStd_Comment::GetID(), Standard_False); while(aFIter != aFeatures.end() || aFLabIter.More()) { - static const int INFINITE_TAG = MAXINT; // no label means that it exists somwhere in infinite + static const int INFINITE_TAG = INT_MAX; // no label means that it exists somwhere in infinite int aFeatureTag = INFINITE_TAG; if (aFIter != aFeatures.end()) { // existing tag for feature shared_ptr aData = dynamic_pointer_cast((*aFIter)->data()); diff --git a/src/Model/Model_Iterator.cxx b/src/Model/Model_Iterator.cxx index b8a765d91..001ebdff8 100644 --- a/src/Model/Model_Iterator.cxx +++ b/src/Model/Model_Iterator.cxx @@ -51,7 +51,7 @@ int Model_Iterator::numIterationsLeft() return aResult; } -bool Model_Iterator::is(std::shared_ptr theFeature) +bool Model_Iterator::isEqual(std::shared_ptr theFeature) { return (myIter.Value()->Label() == dynamic_pointer_cast(theFeature->data())->label()) == Standard_True; diff --git a/src/Model/Model_Iterator.h b/src/Model/Model_Iterator.h index b28423bcf..5d8c61bae 100644 --- a/src/Model/Model_Iterator.h +++ b/src/Model/Model_Iterator.h @@ -39,7 +39,7 @@ public: /// Compares the current feature with the given one /// \returns true if given feature equals to the current one - MODEL_EXPORT virtual bool is(std::shared_ptr theFeature); + MODEL_EXPORT virtual bool isEqual(std::shared_ptr theFeature); protected: /// Creates an empty iterator that alway returns More false diff --git a/src/ModelAPI/ModelAPI_Iterator.h b/src/ModelAPI/ModelAPI_Iterator.h index 41032c2fb..8a128a59d 100644 --- a/src/ModelAPI/ModelAPI_Iterator.h +++ b/src/ModelAPI/ModelAPI_Iterator.h @@ -36,7 +36,7 @@ public: virtual int numIterationsLeft() = 0; /// Compares the current feature with the given one /// \returns true if given feature equals to the current one - virtual bool is(std::shared_ptr theFeature) = 0; + virtual bool isEqual(std::shared_ptr theFeature) = 0; /// To virtually destroy the fields of successors virtual ~ModelAPI_Iterator() {} diff --git a/src/ModelAPI/ModelAPI_PluginManager.cxx b/src/ModelAPI/ModelAPI_PluginManager.cxx index 47623f091..f3e7e9b9d 100644 --- a/src/ModelAPI/ModelAPI_PluginManager.cxx +++ b/src/ModelAPI/ModelAPI_PluginManager.cxx @@ -58,7 +58,7 @@ string library(const string& theLibName) #ifndef WIN32 static string aLibExt( ".so" ); if (aLibName.size() < 3 || aLibName.substr(0, 3) !="lib") - aLibName = ".lib" + aLibName; + aLibName = "lib" + aLibName; #else static string aLibExt( ".dll" ); #endif diff --git a/src/ModelAPI/ModelAPI_PluginManager.h b/src/ModelAPI/ModelAPI_PluginManager.h index 8aab3f6f4..f52364919 100644 --- a/src/ModelAPI/ModelAPI_PluginManager.h +++ b/src/ModelAPI/ModelAPI_PluginManager.h @@ -41,7 +41,7 @@ public: virtual void setCurrentDocument(std::shared_ptr theDoc) = 0; /// loads the library with specific name, appends "lib*.dll" or "*.so" depending on the platform - static void ModelAPI_PluginManager::loadLibrary(const std::string theLibName); + static void loadLibrary(const std::string theLibName); /// Is needed for python wrapping by swig, call Get to get an instance ModelAPI_PluginManager(); diff --git a/src/PyConsole/CMakeLists.txt b/src/PyConsole/CMakeLists.txt index b623b64cf..8cd815158 100644 --- a/src/PyConsole/CMakeLists.txt +++ b/src/PyConsole/CMakeLists.txt @@ -37,6 +37,7 @@ SET(PROJECT_SOURCES SET(PROJECT_LIBRARIES PyInterp ${QT_LIBRARIES} + ${PYTHON_LIBRARIES} ) QT4_ADD_TRANSLATION(QM_RESOURCES ${TEXT_RESOURCES}) diff --git a/src/PyInterp/CMakeLists.txt b/src/PyInterp/CMakeLists.txt index d7f7a53d6..7684af37f 100644 --- a/src/PyInterp/CMakeLists.txt +++ b/src/PyInterp/CMakeLists.txt @@ -26,6 +26,7 @@ SET(PROJECT_SOURCES SET(PROJECT_LIBRARIES PyEvent ${QT_LIBRARIES} + ${PYTHON_LIBRARIES} ) SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC}) diff --git a/src/XGUI/CMakeLists.txt b/src/XGUI/CMakeLists.txt index 3e4556b62..dae4dd16b 100644 --- a/src/XGUI/CMakeLists.txt +++ b/src/XGUI/CMakeLists.txt @@ -60,7 +60,6 @@ SET(PROJECT_RESOURCES #) SET(PROJECT_LIBRARIES - opengl32 Event Config ${QT_LIBRARIES} @@ -74,6 +73,12 @@ SET(PROJECT_LIBRARIES ModuleBase ) +IF(WIN32) + SET(PROJECT_LIBRARIES ${PROJECT_LIBRARIES} opengl32) +ELSE() + SET(PROJECT_LIBRARIES ${PROJECT_LIBRARIES} GL) +ENDIF() + QT4_ADD_RESOURCES(PROJECT_COMPILED_RESOURCES ${PROJECT_RESOURCES}) #QT5_ADD_TRANSLATION(QM_RESOURCES ${TEXT_RESOURCES}) diff --git a/src/XGUI/XGUI_PartDataModel.cpp b/src/XGUI/XGUI_PartDataModel.cpp index f68b5fc4a..1e79322ca 100644 --- a/src/XGUI/XGUI_PartDataModel.cpp +++ b/src/XGUI/XGUI_PartDataModel.cpp @@ -90,16 +90,16 @@ QModelIndex XGUI_TopDataModel::index(int theRow, int theColumn, const QModelInde if (!theParent.isValid()) { switch (theRow) { case 0: - return createIndex(theRow, theColumn, (quintptr) ParamsFolder); + return createIndex(theRow, theColumn, (qint32) ParamsFolder); case 1: - return createIndex(theRow, theColumn, (quintptr) ConstructFolder); + return createIndex(theRow, theColumn, (qint32) ConstructFolder); } } else { if (theParent.internalId() == ParamsFolder) - return createIndex(theRow, theColumn, (quintptr) ParamObject); + return createIndex(theRow, theColumn, (qint32) ParamObject); if (theParent.internalId() == ConstructFolder) - return createIndex(theRow, theColumn, (quintptr) ConstructObject); + return createIndex(theRow, theColumn, (qint32) ConstructObject); } return QModelIndex(); } @@ -112,9 +112,9 @@ QModelIndex XGUI_TopDataModel::parent(const QModelIndex& theIndex) const case ConstructFolder: return QModelIndex(); case ParamObject: - return createIndex(0, 0, (quintptr) ParamsFolder); + return createIndex(0, 0, (qint32) ParamsFolder); case ConstructObject: - return createIndex(1, 0, (quintptr) ConstructFolder); + return createIndex(1, 0, (qint32) ConstructFolder); } return QModelIndex(); } @@ -129,13 +129,13 @@ FeaturePtr XGUI_TopDataModel::feature(const QModelIndex& theIndex) const switch (theIndex.internalId()) { case ParamsFolder: case ConstructFolder: - return 0; + return FeaturePtr(); case ParamObject: return myDocument->feature(PARAMETERS_GROUP, theIndex.row()); case ConstructObject: return myDocument->feature(CONSTRUCTIONS_GROUP, theIndex.row()); } - return 0; + return FeaturePtr(); } @@ -232,21 +232,21 @@ int XGUI_PartDataModel::columnCount(const QModelIndex &parent) const QModelIndex XGUI_PartDataModel::index(int theRow, int theColumn, const QModelIndex &theParent) const { if (!theParent.isValid()) - return createIndex(theRow, 0, (quintptr) MyRoot); + return createIndex(theRow, 0, (qint32) MyRoot); int aId = (int)theParent.internalId(); switch (aId) { case MyRoot: switch (theRow) { case 0: - return createIndex(0, 0, (quintptr) ParamsFolder); + return createIndex(0, 0, (qint32) ParamsFolder); case 1: - return createIndex(1, 0, (quintptr) ConstructFolder); + return createIndex(1, 0, (qint32) ConstructFolder); } case ParamsFolder: - return createIndex(theRow, 0, (quintptr) ParamObject); + return createIndex(theRow, 0, (qint32) ParamObject); case ConstructFolder: - return createIndex(theRow, 0, (quintptr) ConstructObject); + return createIndex(theRow, 0, (qint32) ConstructObject); } return QModelIndex(); } @@ -258,11 +258,11 @@ QModelIndex XGUI_PartDataModel::parent(const QModelIndex& theIndex) const return QModelIndex(); case ParamsFolder: case ConstructFolder: - return createIndex(0, 0, (quintptr) MyRoot); + return createIndex(0, 0, (qint32) MyRoot); case ParamObject: - return createIndex(0, 0, (quintptr) ParamsFolder); + return createIndex(0, 0, (qint32) ParamsFolder); case ConstructObject: - return createIndex(1, 0, (quintptr) ConstructFolder); + return createIndex(1, 0, (qint32) ConstructFolder); } return QModelIndex(); } @@ -286,11 +286,11 @@ FeaturePtr XGUI_PartDataModel::feature(const QModelIndex& theIndex) const return myDocument->feature(PARTS_GROUP, myId); case ParamsFolder: case ConstructFolder: - return 0; + return FeaturePtr(); case ParamObject: return featureDocument()->feature(PARAMETERS_GROUP, theIndex.row()); case ConstructObject: return featureDocument()->feature(CONSTRUCTIONS_GROUP, theIndex.row()); } - return 0; + return FeaturePtr(); } diff --git a/src/XGUI/XGUI_SelectionMgr.h b/src/XGUI/XGUI_SelectionMgr.h index 58af58ea0..3b2bc7aa3 100644 --- a/src/XGUI/XGUI_SelectionMgr.h +++ b/src/XGUI/XGUI_SelectionMgr.h @@ -35,4 +35,4 @@ private: QFeatureList mySelectedData; }; -#endif; \ No newline at end of file +#endif diff --git a/src/XGUI/XGUI_ViewPort.cpp b/src/XGUI/XGUI_ViewPort.cpp index 21552a55d..f7edd5d5e 100644 --- a/src/XGUI/XGUI_ViewPort.cpp +++ b/src/XGUI/XGUI_ViewPort.cpp @@ -1,10 +1,4 @@ -#ifndef WIN32 -# ifndef GLX_GLXEXT_LEGACY -# define GLX_GLXEXT_LEGACY -# endif -# include -# include -#else +#ifdef WIN32 # include # include #endif @@ -21,6 +15,7 @@ #include #include #include +#include #ifdef WIN32 #include @@ -29,6 +24,15 @@ #endif #include +//qmetatype.h must be included before any header file that defines Bool +//see /QtCore/qmetatype.h:53 for more info +#ifndef WIN32 +# ifndef GLX_GLXEXT_LEGACY +# define GLX_GLXEXT_LEGACY +# endif +# include +# include +#endif static double rx = 0.; static double ry = 0.; diff --git a/src/XGUI/XGUI_ViewWindow.cpp b/src/XGUI/XGUI_ViewWindow.cpp index fd8f1dc9e..3803cabea 100644 --- a/src/XGUI/XGUI_ViewWindow.cpp +++ b/src/XGUI/XGUI_ViewWindow.cpp @@ -136,7 +136,7 @@ XGUI_ViewWindow::XGUI_ViewWindow(XGUI_Viewer* theViewer, V3d_TypeOfView theType) myClosable(true), myStartX(0), myStartY(0), myCurrX(0), myCurrY(0), myCurScale(0.0), myCurSketch(0), myDrawRect(false), myEnableDrawMode(false), myCursorIsHand(false), myEventStarted(false), - myLastState(NormalState), myOperation(NOTHING) + myLastState(WindowNormalState), myOperation(NOTHING) { mySelectedPoint = gp_Pnt(0., 0., 0.); setFrameStyle(QFrame::Raised); @@ -345,7 +345,7 @@ void XGUI_ViewWindow::onMinimize() int aNewH = int(aH / aR); myPicture->setPixmap(aPMap.scaled(100, aNewH)); - myLastState = isMaximized() ? MaximizedState : NormalState; + myLastState = isMaximized() ? MaximizedState : WindowNormalState; showMinimized(); parentWidget()->setGeometry(parentWidget()->x(), parentWidget()->y(), 100, aNewH); @@ -964,9 +964,9 @@ void XGUI_ViewWindow::dumpView() Handle(Visual3d_View) a3dView = myViewPort->getView()->View(); if (aFmt == "PS") - a3dView->Export(_strdup(qPrintable(aFileName)), Graphic3d_EF_PostScript); + a3dView->Export(strdup(qPrintable(aFileName)), Graphic3d_EF_PostScript); else if (aFmt == "EPS") - a3dView->Export(_strdup(qPrintable(aFileName)), Graphic3d_EF_EnhPostScript); + a3dView->Export(strdup(qPrintable(aFileName)), Graphic3d_EF_EnhPostScript); else aPicture.save( aFileName, aFmt.toLatin1() ); QApplication::restoreOverrideCursor(); diff --git a/src/XGUI/XGUI_ViewWindow.h b/src/XGUI/XGUI_ViewWindow.h index be28c95a0..0c3ae8a17 100644 --- a/src/XGUI/XGUI_ViewWindow.h +++ b/src/XGUI/XGUI_ViewWindow.h @@ -196,7 +196,9 @@ private slots: private: enum WindowState { - MinimizedState, MaximizedState, NormalState + MinimizedState, + MaximizedState, + WindowNormalState }; bool processWindowControls(QObject *theObj, QEvent *theEvent); diff --git a/src/XGUI/XGUI_Workbench.h b/src/XGUI/XGUI_Workbench.h index 57b17d3be..67b3bde7d 100644 --- a/src/XGUI/XGUI_Workbench.h +++ b/src/XGUI/XGUI_Workbench.h @@ -43,4 +43,4 @@ private: QPushButton* myLeftButton; }; -#endif; +#endif diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index 0aa5bde71..1a1f7382d 100644 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -314,7 +314,7 @@ XGUI_Module* XGUI_Workshop::loadModule(const QString& theModule) err = QString( "Can not load library %1. %2" ).arg( libName ).arg( dlerror() ); else { - crtInst = (CREATE_FUNC)dlsym( modLib, GET_MODULE_NAME ); + crtInst = (CREATE_FUNC)dlsym( modLib, CREATE_MODULE ); if ( !crtInst ) err = QString( "Failed to find function %1. %2" ).arg( CREATE_MODULE ).arg( dlerror() ); }