Hello, fellow developers!
Because I don't currently own AGK2 (but I'm saving up for it) I have to do with the older one.
Some time ago I noticed in the download that someone had made a C# Wrapper for AppGameKit v106.x which obviously isn't up to date anymore. I found that the code of the project still exists on Codeplex but wasn't touched since 2012.
As I am not that talented developer in C++ and I find Tier 2 somewhat restrictive when it comes to containers, string manipulation and working with XML/JSON. I've thought of starting to learn C#, even more so when I found out that someone already brought .NET and AppGameKit together.
So, I've downloaded the project and updated it with the v108.24 commands. The project (the C++ part) compiles nicely but when it tries to put the DLL together, I get the following error message:
1> AssemblyInfo.cpp
1> Generating Code...
1> .NETFramework,Version=v4.0.AssemblyAttributes.cpp
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "public: class std::locale::facet * __thiscall std::locale::facet::_Decref(void)" (?_Decref@facet@locale@std@@QAEPAV123@XZ) already defined in AGKWindows.lib(Result.obj)
1>libcmt.lib(_file.obj) : error LNK2005: ___iob_func already defined in MSVCRT.lib(MSVCR100.dll)
1>libcmt.lib(dosmap.obj) : error LNK2005: __errno already defined in MSVCRT.lib(MSVCR100.dll)
1>libcmt.lib(lseeki64.obj) : error LNK2005: __lseeki64 already defined in MSVCRT.lib(MSVCR100.dll)
1>libcmt.lib(crt0dat.obj) : error LNK2005: __initterm_e already defined in MSVCRT.lib(MSVCR100.dll)
1>libcmt.lib(crt0dat.obj) : error LNK2005: _exit already defined in MSVCRT.lib(MSVCR100.dll)
1>libcmt.lib(crt0dat.obj) : error LNK2005: __cexit already defined in MSVCRT.lib(MSVCR100.dll)
1>libcmt.lib(crt0dat.obj) : error LNK2005: __amsg_exit already defined in MSVCRT.lib(MSVCR100.dll)
1>libcmt.lib(tidtable.obj) : error LNK2005: __encoded_null already defined in MSVCRT.lib(MSVCR100.dll)
1>libcmt.lib(crtheap.obj) : error LNK2005: __malloc_crt already defined in MSVCRT.lib(MSVCR100.dll)
1>libcmt.lib(mlock.obj) : error LNK2005: __unlock already defined in MSVCRT.lib(MSVCR100.dll)
1>libcmt.lib(mlock.obj) : error LNK2005: __lock already defined in MSVCRT.lib(MSVCR100.dll)
1>libcmt.lib(hooks.obj) : error LNK2005: "void __cdecl terminate(void)" (?terminate@@YAXXZ) already defined in MSVCRT.lib(MSVCR100.dll)
1>libcmt.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in MSVCRT.lib(cinitexe.obj)
1>libcmt.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in MSVCRT.lib(cinitexe.obj)
1>libcmt.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in MSVCRT.lib(cinitexe.obj)
1>libcmt.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in MSVCRT.lib(cinitexe.obj)
1>libcmt.lib(winxfltr.obj) : error LNK2005: ___CppXcptFilter already defined in MSVCRT.lib(MSVCR100.dll)
1>libcmt.lib(lconv.obj) : error LNK2005: _localeconv already defined in MSVCRT.lib(MSVCR100.dll)
1>libcpmt.lib(locale0.obj) : error LNK2005: "private: static void __cdecl std::locale::facet::_Facet_Register(class std::locale::facet *)" (?_Facet_Register@facet@locale@std@@CAXPAV123@@Z) already defined in msvcprt.lib(locale0_implib.obj)
1>libcpmt.lib(locale0.obj) : error LNK2005: "private: static class std::locale::_Locimp * __cdecl std::locale::_Getgloballocale(void)" (?_Getgloballocale@locale@std@@CAPAV_Locimp@12@XZ) already defined in msvcprt.lib(MSVCP100.dll)
1>libcpmt.lib(locale0.obj) : error LNK2005: "public: static void __cdecl std::_Locinfo::_Locinfo_dtor(class std::_Locinfo *)" (?_Locinfo_dtor@_Locinfo@std@@SAXPAV12@@Z) already defined in msvcprt.lib(MSVCP100.dll)
1>libcpmt.lib(locale0.obj) : error LNK2005: "public: static void __cdecl std::_Locinfo::_Locinfo_ctor(class std::_Locinfo *,char const *)" (?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@PBD@Z) already defined in msvcprt.lib(MSVCP100.dll)
1>libcpmt.lib(locale0.obj) : error LNK2005: "private: static class std::locale::_Locimp * __cdecl std::locale::_Init(void)" (?_Init@locale@std@@CAPAV_Locimp@12@XZ) already defined in msvcprt.lib(MSVCP100.dll)
1>libcpmt.lib(ios.obj) : error LNK2005: "public: static void __cdecl std::ios_base::_Addstd(class std::ios_base *)" (?_Addstd@ios_base@std@@SAXPAV12@@Z) already defined in msvcprt.lib(MSVCP100.dll)
1>libcpmt.lib(ios.obj) : error LNK2005: "private: static void __cdecl std::ios_base::_Ios_base_dtor(class std::ios_base *)" (?_Ios_base_dtor@ios_base@std@@CAXPAV12@@Z) already defined in msvcprt.lib(MSVCP100.dll)
1>libcpmt.lib(xlock.obj) : error LNK2005: "public: __thiscall std::_Lockit::_Lockit(int)" (??0_Lockit@std@@QAE@H@Z) already defined in msvcprt.lib(MSVCP100.dll)
1>libcpmt.lib(xlock.obj) : error LNK2005: "public: __thiscall std::_Lockit::~_Lockit(void)" (??1_Lockit@std@@QAE@XZ) already defined in msvcprt.lib(MSVCP100.dll)
1>AppGameKitWrapper.obj : error LNK2028: unresolved token (0A00034A) "public: static int __cdecl AGK::agk::GetPointerGesture(void)" (?GetPointerGesture@agk@AGK@@$$FSAHXZ) referenced in function "public: static int __clrcall TheGameCreators::AppGameKit::Agk::GetPointerGesture(void)" (?GetPointerGesture@Agk@AppGameKit@TheGameCreators@@$$FSMHXZ)
1>AppGameKitWrapper.obj : error LNK2028: unresolved token (0A0003B1) "public: static void __cdecl AGK::agk::DeleteFile(char const *)" (?DeleteFile@agk@AGK@@$$FSAXPBD@Z) referenced in function "public: static void __clrcall TheGameCreators::AppGameKit::Agk::DeleteFile(class System::String ^)" (?DeleteFile@Agk@AppGameKit@TheGameCreators@@$$FSMXP$AAVString@System@@@Z)
1>AppGameKitWrapper.obj : error LNK2019: unresolved external symbol "public: static int __cdecl AGK::agk::GetPointerGesture(void)" (?GetPointerGesture@agk@AGK@@$$FSAHXZ) referenced in function "public: static int __clrcall TheGameCreators::AppGameKit::Agk::GetPointerGesture(void)" (?GetPointerGesture@Agk@AppGameKit@TheGameCreators@@$$FSMHXZ)
1>AppGameKitWrapper.obj : error LNK2019: unresolved external symbol "public: static void __cdecl AGK::agk::DeleteFile(char const *)" (?DeleteFile@agk@AGK@@$$FSAXPBD@Z) referenced in function "public: static void __clrcall TheGameCreators::AppGameKit::Agk::DeleteFile(class System::String ^)" (?DeleteFile@Agk@AppGameKit@TheGameCreators@@$$FSMXP$AAVString@System@@@Z)
1>libcmt.lib(crt0.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
1>C:\Users\Jose\Desktop\agkwrapper\AppGameKitWrapper\Release\AppGameKitWrapper.dll : fatal error LNK1120: 5 unresolved externals
I have tried to figure out what's wrong with the setup. I have tried enabling/disabling incremental build, I have tried removing and changing order of imported libraries but no, I can't get pass this. Could it be that simple thing, if the project was put together using 32-bit machine and I'm using 64-bit?
Is there someone else who has given this project a thought, or even better so, tried to update the project? I really need help with this one. If some of you guys knows even little bit more about C++/Visual Studio projects etc. I hope you can lend a hand.
Many thanks!
Mah machine: Intel Xeon E3-1231v3 4x3.40GHz | CM Hyper 212 Evo | ASRock H97 Pro4 | 240GB SanDisk SSD | Sapphire Radeon R9 270X Dual-X 2048MB | Seagate HDD 1000GB |
8GB Crucial Ballistix Sport DDR3-1600