Personal tools
You are here: Home Forum Extension of the platform Got a compilation problem in VS, what's missing?

Got a compilation problem in VS, what's missing?

Up to Extension of the platform


This forum is DEPRECATED, please create new topics in the new SALOME forum.
For existing topics please transfer them to the new forum.

Got a compilation problem in VS, what's missing?

Posted by Siltti at September 09. 2016

I switched to 7.7.1 and VS compiled Salome started to crash with models which have been OK. This happens even when my code in not initiated nor activated at all. The models can be opened and edited with Salome 7.7.1 binary loaded version, so something went wrong in compilation or environment. I get a lot of warnings like follows. The list is very long, I took only few of them from beginning. Most of the warning are about a missing dll. What could this be? The compilation is DEBUG for X64 in Visual Studio.

Any ideas will help.

Timo

3>G:\SALOME-7.7.1-WIN64-SDK\MODULES\SMESH\DEBUG\SMESH_INSTALL\include\salome\SMDS_Mesh.hxx(698): warning C4290: C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
3>g:\salome-7.7.1-win64-sdk\modules\smesh\debug\smesh_install\include\salome\SMESHDS_SubMesh.hxx(61): warning C4267: 'return' : conversion from 'size_t' to 'int', possible loss of data
3>g:\salome-7.7.1-win64-sdk\modules\smesh\debug\smesh_install\include\salome\SMESHDS_Mesh.hxx(598): warning C4267: 'return' : conversion from 'size_t' to 'int', possible loss of data
3>g:\salome-7.7.1-win64-sdk\modules\smesh\debug\smesh_install\include\salome\SMESH_Mesh.hxx(299): warning C4267: 'return' : conversion from 'size_t' to 'int', possible loss of data
3>G:\SALOME-7.7.1-WIN64-SDK\MODULES\SMESH\DEBUG\SMESH_INSTALL\include\salome\SMESHGUI.h(219): warning C4251: 'SMESHGUI::myComponentSMESH' : class '_CORBA_ObjRef_Var<T,T_Helper>' needs to have dll-interface to be used by clients of class 'SMESHGUI'
3>          with
3>          [
3>              T=SMESH::_objref_SMESH_Gen,
3>              T_Helper=SMESH::SMESH_Gen_Helper
3>          ]
3>G:\SALOME-7.7.1-WIN64-SDK\MODULES\SMESH\DEBUG\SMESH_INSTALL\include\salome\SMESHGUI.h(222): warning C4251: 'SMESHGUI::myRules' : class 'QMap<Key,T>' needs to have dll-interface to be used by clients of class 'SMESHGUI'
3>          with
3>          [
3>              Key=int,
3>              T=QString
3>          ]
3>G:\SALOME-7.7.1-WIN64-SDK\MODULES\SMESH\DEBUG\SMESH_INSTALL\include\salome\SMESHGUI.h(227): warning C4251: 'SMESHGUI::myMarkerMap' : class 'std::map<_Kty,_Ty>' needs to have dll-interface to be used by clients of class 'SMESHGUI'
3>          with
3>          [
3>              _Kty=int,
3>              _Ty=VTK::MarkerMap
3>          ]
3>G:\SALOME-7.7.1-WIN64-SDK\MODULES\SMESH\DEBUG\SMESH_INSTALL\include\salome\SMESHGUI.h(228): warning C4251: 'SMESHGUI::myClippingPlaneInfoMap' : class 'std::map<_Kty,_Ty>' needs to have dll-interface to be used by clients of class 'SMESHGUI'
3>          with
3>          [
3>              _Kty=SUIT_ViewManager *,
3>              _Ty=SMESHGUI_ClippingPlaneInfoList
3>          ]
3>G:\SALOME-7.7.1-WIN64-SDK\MODULES\SMESH\DEBUG\SMESH_INSTALL\include\salome\SMESHGUI.h(230): warning C4251: 'SMESHGUI::myEventCallbackCommand' : class 'vtkSmartPointer<T>' needs to have dll-interface to be used by clients of class 'SMESHGUI'
3>          with
3>          [
3>              T=vtkCallbackCommand
3>          ]
3>G:\SALOME-7.7.1-WIN64-SDK\MODULES\GUI\DEBUG\GUI_INSTALL\include\salome\LightApp_DataOwner.h(58): warning C4251: 'LightApp_DataOwner::myIO' : class 'Handle_SALOME_InteractiveObject' needs to have dll-interface to be used by clients of class 'LightApp_DataOwner'
3>          g:\salome-7.7.1-win64-sdk\modules\gui\debug\gui_install\include\salome\SALOME_InteractiveObject.hxx(33) : see declaration of 'Handle_SALOME_InteractiveObject'
3>G:\SALOME-7.7.1-WIN64-SDK\MODULES\SMESH\DEBUG\SMESH_INSTALL\include\salome\SMESHDS_GroupBase.hxx(101): warning C4251: 'SMESHDS_GroupBase::myStoreName' : class 'std::basic_string<_Elem,_Traits,_Ax>' needs to have dll-interface to be used by clients of class 'SMESHDS_GroupBase'
3>          with
3>          [
3>              _Elem=char,
3>              _Traits=std::char_traits<char>,
3>              _Ax=std::allocator<char>
3>          ]
3>G:\SALOME-7.7.1-WIN64-SDK\MODULES\SMESH\DEBUG\SMESH_INSTALL\include\salome\SMESHDS_GroupBase.hxx(102): warning C4251: 'SMESHDS_GroupBase::myColor' : class 'Quantity_Color' needs to have dll-interface to be used by clients of class 'SMESHDS_GroupBase'
3>          G:\SALOME-7.7.1-WIN64-SDK\PRODUCTSD\occt-6.9.1\inc\Quantity_Color.hxx(43) : see declaration of 'Quantity_Color'
3>G:\SALOME-7.7.1-WIN64-SDK\MODULES\SMESH\DEBUG\SMESH_INSTALL\include\salome\SMESHDS_GroupBase.hxx(107): warning C4251: 'SMESHDS_GroupBase::myIterator' : class 'boost::shared_ptr<T>' needs to have dll-interface to be used by clients of class 'SMESHDS_GroupBase'
3>          with
3>          [
3>              T=SMDS_Iterator<const SMDS_MeshElement *>
3>          ]
3>g:\salome-7.7.1-win64-sdk\modules\elmerplugin\elmerplugin_src\src\elmerplugingui\ELMERPLUGINGUI.h(61): warning C4251: 'ELMERPLUGINGUI::myEngine' : class '_CORBA_ObjRef_Var<T,T_Helper>' needs to have dll-interface to be used by clients of class 'ELMERPLUGINGUI'
3>          with
3>          [
3>              T=ELMERPLUGIN_ORB::_objref_ELMERPLUGIN_Gen,
3>              T_Helper=ELMERPLUGIN_ORB::ELMERPLUGIN_Gen_Helper
3>          ]
3>g:\salome-7.7.1-win64-sdk\productsd\qt-4.8.4\include\qtcore\qdatetime.h(294): warning C4251: 'QDateTime::d' : class 'QExplicitlySharedDataPointer<T>' needs to have dll-interface to be used by clients of class 'QDateTime'
3>          with
3>          [
3>              T=QDateTimePrivate
3>          ]
3>G:\SALOME-7.7.1-WIN64-SDK\MODULES\GUI\DEBUG\GUI_INSTALL\include\salome\LightApp_SelectionMgr.h(125): warning C4251: 'LightApp_SelectionMgr::myCacheTimes' : class 'QMap<Key,T>' needs to have dll-interface to be used by clients of class 'LightApp_SelectionMgr'
3>          with
3>          [
3>              Key=QString,
3>              T=QTime
3>          ]
3>G:\SALOME-7.7.1-WIN64-SDK\MODULES\GUI\DEBUG\GUI_INSTALL\include\salome\LightApp_SelectionMgr.h(126): warning C4251: 'LightApp_SelectionMgr::myCacheSelection' : class 'QMap<Key,T>' needs to have dll-interface to be used by clients of class 'LightApp_SelectionMgr'
3>          with
3>          [
3>              Key=QString,
3>              T=LightApp_SelectionMgr::SelList
3>          ]
3>G:\SALOME-7.7.1-WIN64-SDK\MODULES\KERNEL\DEBUG\KERNEL_INSTALL\include\salome\SALOME_NamingService.hxx(84): warning C4251: 'SALOME_NamingService::_orb' : class 'CORBA::ORB_var' needs to have dll-interface to be used by clients of class 'SALOME_NamingService'
3>          g:\salome-7.7.1-win64-sdk\productsd\omniorb-4.1.6\include\omniorb4\CORBA_vartypes.h(191) : see declaration of 'CORBA::ORB_var'
3>G:\SALOME-7.7.1-WIN64-SDK\MODULES\KERNEL\DEBUG\KERNEL_INSTALL\include\salome\SALOME_NamingService.hxx(85): warning C4251: 'SALOME_NamingService::_root_context' : class '_CORBA_ObjRef_Var<T,T_Helper>' needs to have dll-interface to be used by clients of class 'SALOME_NamingService'
3>          with
3>          [
3>              T=CosNaming::_objref_NamingContext,
3>              T_Helper=CosNaming::NamingContext_Helper
3>          ]
3>G:\SALOME-7.7.1-WIN64-SDK\MODULES\KERNEL\DEBUG\KERNEL_INSTALL\include\salome\SALOME_NamingService.hxx(85): warning C4251: 'SALOME_NamingService::_current_context' : class '_CORBA_ObjRef_Var<T,T_Helper>' needs to have dll-interface to be used by clients of class 'SALOME_NamingService'
3>          with
3>          [
3>              T=CosNaming::_objref_NamingContext,
3>              T_Helper=CosNaming::NamingContext_Helper
3>          ]
3>G:\SALOME-7.7.1-WIN64-SDK\MODULES\GUI\DEBUG\GUI_INSTALL\include\salome\LightApp_Study.h(144): warning C4251: 'LightApp_Study::myViewMgrMap' : class 'QMap<Key,T>' needs to have dll-interface to be used by clients of class 'LightApp_Study'
3>          with
3>          [
3>              Key=int,
3>              T=ObjMap
3>          ]
3>G:\SALOME-7.7.1-WIN64-SDK\MODULES\KERNEL\DEBUG\KERNEL_INSTALL\include\salome\SALOME_LifeCycleCORBA.hxx(128): warning C4251: 'SALOME_LifeCycleCORBA::_ContManager' : class '_CORBA_ObjRef_Var<T,T_Helper>' needs to have dll-interface to be used by clients of class 'SALOME_LifeCycleCORBA'
3>          with
3>          [
3>              T=Engines::_objref_ContainerManager,
3>              T_Helper=Engines::ContainerManager_Helper
3>          ]
3>G:\SALOME-7.7.1-WIN64-SDK\MODULES\KERNEL\DEBUG\KERNEL_INSTALL\include\salome\SALOME_LifeCycleCORBA.hxx(129): warning C4251: 'SALOME_LifeCycleCORBA::_ResManager' : class '_CORBA_ObjRef_Var<T,T_Helper>' needs to have dll-interface to be used by clients of class 'SALOME_LifeCycleCORBA'
3>          with
3>          [
3>              T=Engines::_objref_ResourcesManager,
3>              T_Helper=Engines::ResourcesManager_Helper
3>          ]
3>g:\salome-7.7.1-win64-sdk\modules\kernel\debug\kernel_install\include\salome\SALOMEDSImpl_SComponentIterator.hxx(44): warning C4251: 'SALOMEDSImpl_SComponentIterator::_it' : class 'DF_ChildIterator' needs to have dll-interface to be used by clients of class 'SALOMEDSImpl_SComponentIterator'
3>          g:\salome-7.7.1-win64-sdk\modules\kernel\debug\kernel_install\include\salome\DF_ChildIterator.hxx(29) : see declaration of 'DF_ChildIterator'
3>g:\salome-7.7.1-win64-sdk\modules\kernel\debug\kernel_install\include\salome\SALOMEDSImpl_SComponentIterator.hxx(45): warning C4251: 'SALOMEDSImpl_SComponentIterator::_lab' : class 'DF_Label' needs to have dll-interface to be used by clients of class 'SALOMEDSImpl_SComponentIterator'
3>          g:\salome-7.7.1-win64-sdk\modules\kernel\debug\kernel_install\include\salome\DF_Label.hxx(65) : see declaration of 'DF_Label'
3>g:\salome-7.7.1-win64-sdk\modules\kernel\debug\kernel_install\include\salome\SALOMEDSImpl_GenericAttribute.hxx(39): warning C4275: non dll-interface class 'DF_Attribute' used as base for dll-interface class 'SALOMEDSImpl_GenericAttribute'
3>          g:\salome-7.7.1-win64-sdk\modules\kernel\debug\kernel_install\include\salome\DF_Attribute.hxx(30) : see declaration of 'DF_Attribute'
3>          g:\salome-7.7.1-win64-sdk\modules\kernel\debug\kernel_install\include\salome\SALOMEDSImpl_GenericAttribute.hxx(37) : see declaration of 'SALOMEDSImpl_GenericAttribute'
3>g:\salome-7.7.1-win64-sdk\modules\kernel\debug\kernel_install\include\salome\SALOMEDSImpl_GenericAttribute.hxx(42): warning C4251: 'SALOMEDSImpl_GenericAttribute::_type' : class 'std::basic_string<_Elem,_Traits,_Ax>' needs to have dll-interface to be used by clients of class 'SALOMEDSImpl_GenericAttribute'
3>          with
3>          [
3>              _Elem=char,
3>              _Traits=std::char_traits<char>,
3>              _Ax=std::allocator<char>
3>          ]
3>g:\salome-7.7.1-win64-sdk\modules\kernel\debug\kernel_install\include\salome\SALOMEDSImpl_AttributeTreeNode.hxx(90): warning C4251: 'SALOMEDSImpl_AttributeTreeNode::myTreeID' : class 'std::basic_string<_Elem,_Traits,_Ax>' needs to have dll-interface to be used by clients of class 'SALOMEDSImpl_AttributeTreeNode'
3>          with
3>          [
3>              _Elem=char,
3>              _Traits=std::char_traits<char>,
3>              _Ax=std::allocator<char>
3>          ]
3>g:\salome-7.7.1-win64-sdk\modules\kernel\debug\kernel_install\include\salome\SALOMEDSImpl_UseCaseIterator.hxx(42): warning C4251: 'SALOMEDSImpl_UseCaseIterator::_guid' : class 'std::basic_string<_Elem,_Traits,_Ax>' needs to have dll-interface to be used by clients of class 'SALOMEDSImpl_UseCaseIterator'
3>          with
3>          [
3>              _Elem=char,
3>              _Traits=std::char_traits<char>,
3>              _Ax=std::allocator<char>
3>          ]

Re: Got a compilation problem in VS, what's missing?

Posted by smeap at September 09. 2016

Hi Timo

AFAIK on Windows, if you compile in DEBUG mode, you also need all libraries you link to to be compiled in DEBUG mode, else your program can crash when you run it.

So, don't compile SALOME in DEBUG mode!

St.Michael

Re: Got a compilation problem in VS, what's missing?

Posted by Siltti at September 09. 2016

Hello St.Michael,

I used @SET BUILD MODE=Debug when compiling the SDK. It went without errors. Just to be sure, I recompile the environment again. The reason is something else, I may have missed something when copying my module folder to 7.7.1 or something else strange has happened.

I have so far written the module with debug option with previous versions without problems. Few warnings have shown up but code has worked. Now something changed radically and I should get it fixed.

I remember the Debug option been discussed earlier, the entire package has to be compiled with Debug if one need to debug own code in Windows. There is no option of using a Debug version of one module with Salome compiled without Debug. Somebody explained it earlier.

So, any tips what to look for is most appreciated!

Best regards,

Timo

Re: Got a compilation problem in VS, what's missing?

Posted by Siltti at September 09. 2016

Hi again,

this is the error message I get when Salome 7.7.1 crashes.Tried to look at mesh information of one face element group. Very simple model, I think there is something really missing from either my environment, or compilation. On the other hand, my module should probably not harm the Salome itself if the module is not initiated or activated, is that right? If it is, then my module is not the reason but it has to do with Salome compilation or environment?

Best regards,

Timo

 

Re: Got a compilation problem in VS, what's missing?

Posted by Siltti at September 10. 2016

Solved the case. For some reason when closing Salome it leaves some memory reserved and therefore I run out of available memory after many debug sessions. Booting the machine solved my problem.

 

Timo

Re: Got a compilation problem in VS, what's missing?

Posted by Siltti at September 16. 2016

Added some code and the problem raises it's ugly head again. Entire Salome SDK is compiled with debug option as well as my module. There must be a simple reason why I get a hundred of these "missing dll-interface" warnings like the one enclosed and my code is unstable.

I see at least two possibilities (there might be a third one, the correct one!) : either there are missing #includes in my code or I have missed something when I edited the qmake.txt files. Either or, it is necessary to solve the problem. I accidentally found one missing #include and that one solved one of the problems but trial and error is far too difficult here. So, any ideas are most welcome, what to look for? I have been browsing the examples but that didn't give much help.

Best regards,

Timo

Warning    64    warning C4251: 'SUIT_FileDlg::myUrls' : class 'QList<T>' needs to have dll-interface to be used by clients of class 'SUIT_FileDlg'    G:\SALOME-7.7.1-WIN64-SDK\MODULES\GUI\DEBUG\GUI_INSTALL\include\salome\SUIT_FileDlg.h    122

Warning    6    warning C4251: 'SMESHGUI::myRules' : class 'QMap<Key,T>' needs to have dll-interface to be used by clients of class 'SMESHGUI'    G:\SALOME-7.7.1-WIN64-SDK\MODULES\SMESH\DEBUG\SMESH_INSTALL\include\salome\SMESHGUI.h    222


This forum is DEPRECATED, please create new topics in the new SALOME forum.
For existing topics please transfer them to the new forum.

Powered by Ploneboard
Document Actions