Personal tools
You are here: Home Forum How to use Salome? can not build C++ file (linker error)

can not build C++ file (linker error)

Up to How to use Salome?

can not build C++ file (linker error)

Posted by Lin Yong Zhi at August 02. 2017

Hi all,

I'm new to SALOME and the SMESH_Gen class.
This is my code snippet:
SMESH_Gen* gen = new SMESH_Gen();
//SMESH_Mesh *mesh = gen.CreateMesh(1, false);


During compiling, an error occurred: error LNK2001: unresolved external symbol "public: __thiscall SMESH_Gen::SMESH_Gen(void)" (??0SMESH_Gen@@$$FQAE@XZ)

I've add all the .lib files appeared in '\SALOME-8.2.0-WIN64\MODULES\GEOM\RELEASE\GEOM_INSTALL\lib\salome' to the linker, but it still doesn't work.

Is there any other .lib file I should add to the linker setting?
Linker>>General>>Additional Library Directories
Linker>>Input>>Additional Dependencies

Or is there any code example for reference?

Thank you in advance.

Re: can not build C++ file (linker error)

Posted by Saint Michael at August 02. 2017

I've add all the .lib files appeared in '\SALOME-8.2.0-WIN64\MODULES\GEOM\RELEASE\GEOM_INSTALL\lib\salome' to the linker, but it still doesn't work.

Hi

SMESH_Gen is in SMESH module, not in GEOM.

St.Michael

Re: can not build C++ file (linker error)

Posted by Lin Yong Zhi at August 02. 2017

Yes.

Thanks St.Michael.

the correct path is SALOME-8.2.0-WIN64\MODULES\SMESH\RELEASE\SMESH_INSTALL\lib\salome

however, the same linker error occurred

here is the list of .lib files I've added

 

MEDWrapper.lib
MEDWrapperBase.lib
MEDWrapper_V2_2.lib
MEFISTO2D.lib
MeshDriver.lib
MeshDriverCGNS.lib
MeshDriverDAT.lib
MeshDriverGMF.lib
MeshDriverMED.lib
MeshDriverSTL.lib
MeshDriverUNV.lib
MeshJobManagerEngine.lib
PluginUtils.lib
SalomeIDLSMESH.lib
SalomeIDLSPADDER.lib
SMDS.lib
SMESH.lib
SMESHClient.lib
SMESHControls.lib
SMESHDS.lib
SMESHEngine.lib
SMESHFiltersSelection.lib
SMESHimpl.lib
SMESHObject.lib
SMESHUtils.lib
SPADDERPluginTesterEngine.lib
StdMeshers.lib
StdMeshersEngine.lib
StdMeshersGUI.lib

 

Is there anything I've missed out?

 

Powered by Ploneboard
Document Actions