2013-03-08 3 views
0

Мне было дано задание скомпилировать плагин 3d Max в 64 бит.Компиляция 32-битного кода в 64 бит

проекта компилирует нормально в 32 бита, но когда я следую инструкции отсюда:

How to compile a 64-bit application using Visual C++ 2010 Express?

установить скомпилировать платформу х64. Проект компилируется, но при генерации кода я получаю ошибки компоновщика:

1>DllEntry.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl InitCustomControls(struct HINSTANCE__ *)" ([email protected]@[email protected]@@Z) referenced in function DllMain 
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __cdecl Matrix3::IdentityMatrix(void)" ([email protected]@@QEAAXXZ) referenced in function "public: __cdecl Matrix3::Matrix3(int)" ([email protected]@[email protected]@Z) 
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static void __cdecl MaxHeapOperators::operator delete(void *)" ([email protected]@[email protected]) referenced in function "public: virtual void * __cdecl SceneExport::`scalar deleting destructor'(unsigned int)" ([email protected]@[email protected]) 
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl ClassDesc2::ClassDesc2(void)" ([email protected]@[email protected]) referenced in function "public: __cdecl CMaxExporterClassDesc::CMaxExporterClassDesc(void)" ([email protected]@[email protected]) 
1>exporter.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ClassDesc2::ResetClassParams(int)" ([email protected]@@[email protected]) 
1>exporter.obj : error LNK2001: unresolved external symbol "public: virtual int __cdecl ClassDesc2::NumParamBlockDescs(void)" ([email protected]@@UEAAHXZ) 
1>exporter.obj : error LNK2001: unresolved external symbol "public: virtual class ParamBlockDesc2 * __cdecl ClassDesc2::GetParamBlockDesc(int)" ([email protected]@@[email protected]@[email protected]) 
1>exporter.obj : error LNK2001: unresolved external symbol "public: virtual class ParamBlockDesc2 * __cdecl ClassDesc2::GetParamBlockDescByID(short)" ([email protected]@@[email protected]@[email protected]) 
1>exporter.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ClassDesc2::AddParamBlockDesc(class ParamBlockDesc2 *)" ([email protected]@@[email protected]@@Z) 
1>exporter.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ClassDesc2::BeginEditParams(class IObjParam *,class ReferenceMaker *,unsigned long,class Animatable *)" ([email protected]@@[email protected]@[email protected]@[email protected]@@Z) 
1>exporter.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ClassDesc2::EndEditParams(class IObjParam *,class ReferenceMaker *,unsigned long,class Animatable *)" ([email protected]@@[email protected]@[email protected]@[email protected]@@Z) 
1>exporter.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ClassDesc2::InvalidateUI(class ParamBlockDesc2 *)" ([email protected]@@[email protected]@@Z) 
1>exporter.obj : error LNK2001: unresolved external symbol "public: virtual char * __cdecl ClassDesc::GetRsrcString(__int64)" ([email protected]@@[email protected]) 
1>exporter.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ClassDesc2::MakeAutoParamBlocks(class ReferenceMaker *)" ([email protected]@@[email protected]@@Z) 
1>exporter.obj : error LNK2001: unresolved external symbol "public: virtual int __cdecl ClassDesc2::NumParamMaps(void)" ([email protected]@@UEAAHXZ) 
1>exporter.obj : error LNK2001: unresolved external symbol "public: virtual class IParamMap2 * __cdecl ClassDesc2::GetParamMap(int)" ([email protected]@@[email protected]@[email protected]) 
1>exporter.obj : error LNK2001: unresolved external symbol "public: virtual class FPInterface * __cdecl ClassDesc::GetInterface(char *)" ([email protected]@@[email protected]@[email protected]) 
1>exporter.obj : error LNK2001: unresolved external symbol "public: virtual class FPInterface * __cdecl ClassDesc::GetInterface(class Interface_ID)" ([email protected]@@[email protected]@[email protected]@@Z) 
1>exporter.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ClassDesc::AddInterface(class FPInterface *)" ([email protected]@@[email protected]@@Z) 
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __cdecl ClassDesc2::SetUserDlgProc(class ParamBlockDesc2 *,short,class ParamMap2UserDlgProc *)" ([email protected]@@[email protected]@[email protected]@@Z) referenced in function "public: virtual void __cdecl ClassDesc2::SetUserDlgProc(class ParamBlockDesc2 *,class ParamMap2UserDlgProc *)" ([email protected]@@[email protected]@[email protected]@@Z) 
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl ClassDesc2::~ClassDesc2(void)" ([email protected]@[email protected]) referenced in function "public: virtual __cdecl CMaxExporterClassDesc::~CMaxExporterClassDesc(void)" ([email protected]@[email protected]) 
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl zfree(void * *)" ([email protected]@[email protected]) referenced in function "public: __cdecl Tab<class Point3>::~Tab<class Point3>(void)" ([email protected]@@@@[email protected]) 
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl TBSetCount(struct TabHdr * *,int,int,int)" ([email protected]@[email protected]@[email protected]) referenced in function "public: void __cdecl Tab<class Point3>::SetCount(int,int)" ([email protected][email protected]@@@@[email protected]) 
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) class Point3 __cdecl Normalize(class Point3 const &)" ([email protected]@[email protected]@[email protected]@Z) referenced in function "public: void __cdecl VNormal::Normalize(void)" ([email protected]@@QEAAXXZ) 
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class TVFace * __cdecl Mesh::mapFaces(int)const " ([email protected]@@[email protected]@[email protected]) referenced in function "protected: void __cdecl CMaxExporter::ExportColors(class INode *,class Mesh &,struct pmesh::mesh_desc &)" ([email protected]@@[email protected]@[email protected]@[email protected]@@@Z) 
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class Point3 * __cdecl Mesh::mapVerts(int)const " ([email protected]@@[email protected]@[email protected]) referenced in function "protected: void __cdecl CMaxExporter::ExportColors(class INode *,class Mesh &,struct pmesh::mesh_desc &)" ([email protected]@@[email protected]@[email protected]@[email protected]@@@Z) 
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) class Point3 __cdecl operator*(class Point3 const &,class Matrix3 const &)" ([email protected][email protected]@[email protected]@@@Z) referenced in function "protected: void __cdecl CMaxExporter::ExportVertices(class INode *,class Mesh &,struct pmesh::mesh_desc &)" ([email protected]@@[email protected]@[email protected]@[email protected]@@@Z) 
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl ApplyScaling(class Matrix3 &,class ScaleValue const &)" ([email protected]@[email protected]@[email protected]@@Z) referenced in function "protected: void __cdecl CMaxExporter::ExportVertices(class INode *,class Mesh &,struct pmesh::mesh_desc &)" ([email protected]@@[email protected]@[email protected]@[email protected]@@@Z) 
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl PreRotateMatrix(class Matrix3 &,class Quat const &)" ([email protected]@[email protected]@[email protected]@@Z) referenced in function "protected: void __cdecl CMaxExporter::ExportVertices(class INode *,class Mesh &,struct pmesh::mesh_desc &)" ([email protected]@@[email protected]@[email protected]@[email protected]@@@Z) 
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __cdecl Matrix3::PreTranslate(class Point3 const &)" ([email protected]@@[email protected]@@Z) referenced in function "protected: void __cdecl CMaxExporter::ExportVertices(class INode *,class Mesh &,struct pmesh::mesh_desc &)" ([email protected]@@[email protected]@[email protected]@[email protected]@@@Z) 
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __cdecl Matrix3::SetRow(int,class Point3)" ([email protected]@@[email protected]@@Z) referenced in function "protected: void __cdecl CMaxExporter::ExportNormalsTangents(class INode *,class Mesh &,struct pmesh::mesh_desc &)" ([email protected]@@[email protected]@[email protected]@[email protected]@@@Z) 
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class Point3 __cdecl Point3::operator^(class Point3 const &)const " ([email protected]@[email protected]@@Z) referenced in function "protected: void __cdecl CMaxExporter::ExportNormalsTangents(class INode *,class Mesh &,struct pmesh::mesh_desc &)" ([email protected]@@[email protected]@[email protected]@[email protected]@@@Z) 
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl CStr::operator char *(void)" ([email protected]@QEAAPEADXZ) referenced in function "protected: void __cdecl CMaxExporter::Log(char const *,struct pmesh::mesh_file &)" ([email protected]@@[email protected]@@@Z) 
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static void * __cdecl MaxHeapOperators::operator new(unsigned __int64)" ([email protected]@[email protected]) referenced in function "public: virtual void * __cdecl CMaxExporterClassDesc::Create(int)" ([email protected]@@[email protected]) 
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl Mesh::~Mesh(void)" ([email protected]@[email protected]) referenced in function "protected: void __cdecl CMaxExporter::ExportMesh(class INode *,class Object *,struct pmesh::mesh_node *,bool)" ([email protected]@@[email protected]@[email protected]@[email protected]@@[email protected]) 
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: int __cdecl Matrix3::Parity(void)const " ([email protected]@@QEBAHXZ) referenced in function "protected: void __cdecl CMaxExporter::ExportMesh(class INode *,class Object *,struct pmesh::mesh_node *,bool)" ([email protected]@@[email protected]@[email protected]@[email protected]@@[email protected]) 
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl Mesh::Mesh(class Mesh const &)" ([email protected]@[email protected]@@Z) referenced in function "protected: void __cdecl CMaxExporter::ExportMesh(class INode *,class Object *,struct pmesh::mesh_node *,bool)" ([email protected]@@[email protected]@[email protected]@[email protected]@@[email protected]) 
1>exporter.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl DebugPrint(char const *,...)" ([email protected]@YAXPEBDZZ) referenced in function "protected: void __cdecl CMaxExporter::ExportMesh(class INode *,class Object *,struct pmesh::mesh_node *,bool)" ([email protected]@@[email protected]@[email protected]@[email protected]@@[email protected]) 

Что я делаю неправильно?

+10

Ваш проект зависит от внешних библиотек, и компоновщик не может найти 64-битные версии этой библиотеки (либо потому, что вы их не установили, либо потому, что они находятся в пути, который не находится в пути поиска библиотеки). – us2012

+0

Я полностью согласен с @ us2012 –

+0

Thx для ответа. Каталог, указанный в каталогах дополнительных библиотек, содержит только .lib-файлы, а для любого из них нет исходного кода. Я предполагаю, что это означает, что я не могу скомпилировать мой проект для x64? –

ответ

2

В качестве продолжения для тех, кто имеет ту же проблему: вам нужно выбрать x64 вариант библиотек в Linker-> General-> AdditionalLibraryDirectories. После установки 3DS MAX SDK с параметрами по умолчанию вы должны иметь их: C: \ Program Files (x86) \ Autodesk \ maxsdk \ x64 \ lib;

Смежные вопросы