iamsleepy/ApiMeshShapeArnoldTranslator

arnold 5.2.2.0 complie faild

Closed this issue · 7 comments

arnold 5.2.2.0
maya 2017
vs2012

1> Creating library C:\Users\Administrator\Desktop\ApiMeshShapeArnoldTranslator\x64\Release\ArnoldTranslator.lib and object C:\Users\Administrator\Desktop\ApiMeshShapeArnoldTranslator\x64\Release\ArnoldTranslator.exp 1>apiMeshShapeTranslator.obj : error LNK2001: unresolved external symbol "public: class apiMeshGeom * __cdecl apiMesh::meshGeom(void)" (?meshGeom@apiMesh@@QEAAPEAVapiMeshGeom@@XZ) 1>C:\Users\Administrator\Desktop\ApiMeshShapeArnoldTranslator\x64\Release\ArnoldTranslator.dll : fatal error LNK1120: 1 unresolved externals 1>已完成生成项目“ArnoldTranslator.vcxproj”的操作 - 失败。

complie faild. can not figure out why.
can you help please?

This link error suggests that apiMeshGeom symbol haven't been found. When I was writing the sample, I modified apiMeshShape and exported the apiMeshGeom. It is required when linking to the translator.

    //Modify apiMeshGeom* meshGeom(); in the apiMeshShape.h
    __declspec(dllexport) apiMeshGeom*     __cdecl meshGeom();

I've added these instructions to the Readme.MD and link to my original blog.

thanks,
Can you explain more about "export "section?
 

Export means it exports this class in its library and could be linked in another module. In this case, the translator needs to get geometry data from apiMeshShape. So I exported meshGeom function in apiMeshShape to allow it to be linked with translator and called from the translator.

sorry,i found you already modified the source code ,but still failed to build it.
image

image

vs2017
toolset v110
arnold 5.2.2.0

Have you added it in apiMeshShape solution and rebuilt it? It's not only for translator to import it, the key here is to rebuild apiMeshShape sample in the devkit with updated header and link to the library it generated.

What you said is true, it is my problem. it works and thank you very much!