PlsGoobez Posted May 8, 2016 Share Posted May 8, 2016 #include <Windows.h> #include "plugin\plugin.h" using namespace plugin;void OnUpdate();BOOL APIENTRY DllMain(HMODULE module, DWORD reason, LPVOID reserved){ if (reason == DLL_PROCESS_ATTACH) Core::RegisterFunc(FUNC_GAME_PROCESS, OnUpdate); return TRUE;}void OnUpdate(){} Using DK22Pac's SDK I get the error: Error LNK2019 unresolved external symbol "void __cdecl plugin::Core::RegisterFunc(enum plugin::eFuncType,void (__cdecl*)(void))" ([email protected]@[email protected]@[email protected]@[email protected]) referenced in function [email protected] I've tried typcasting OnUpdate with (tRegisteredFunction), using different function types, etc. I keep getting the same error. I'm probably overlooking something trivial, can you guys help me? The_GTA 1 Link to comment Share on other sites More sharing options...
The_GTA Posted May 8, 2016 Share Posted May 8, 2016 (edited) Hello PlsGoobez! I think you have to add the static .lib file of plugin-sdk to your project before you can use it's functions Assumingly, you are using some version of Microsoft's Visual Studio. First open up your project settings by right-clicking on the project entry in the Solution Explorer and clicking on the last option. You need to set up some things. First we need to know the relative path from your plugin's project file to the .lib file of plugin-sdk. For my purposes, I have a "depends/plugin-sdk" folder with the contents of DK22Pac's SVN. I advice you to use a similar notation as I did in the picture. Last thing you need is to register the actual .lib file. In the new (upcoming) plugin-sdk, this file is called "plugin.lib" and is located in the "output" folder inside the repository root. If you cannot find the path to your plugin-sdk .lib file make sure that you have built plugin-sdk first. In the old plugin-sdk you need CMake to build it. Make sure to do the steps for both "Release" and "Debug" configurations. Hopefully I could help you. Every beginning is hard. But you will get used to it Alternatively, you could use my projects in that tutorial I made as a starting point so you can also experiment around with the new plugin-sdk! Please make sure to use a less generic topic title so that other people can find out about plugin-sdk compilation. Edited May 8, 2016 by The_GTA Link to comment Share on other sites More sharing options...
PlsGoobez Posted May 8, 2016 Author Share Posted May 8, 2016 Yeah I compiled the source into a static library after hours of frustration haha. I had to comment out like two lines from exports.cpp because they were throwing errors at me. And what do you mean upcoming plugin-sdk? There's one being developed right now? Link to comment Share on other sites More sharing options...
The_GTA Posted May 8, 2016 Share Posted May 8, 2016 Yes! I think Dmitry wants to finalize it a little more before publishing it. But I can say it is really really great. It supports modern C++. Link to comment Share on other sites More sharing options...
PlsGoobez Posted May 8, 2016 Author Share Posted May 8, 2016 Yes! I think Dmitry wants to finalize it a little more before publishing it. But I can say it is really really great. It supports modern C++. I mean it hasn't been updated in a year, how are you sure he's going to update it? Link to comment Share on other sites More sharing options...
The_GTA Posted May 15, 2016 Share Posted May 15, 2016 I mean it hasn't been updated in a year, how are you sure he's going to update it?Maybe it was intuition. But the new SDK is out. I highly recommend to update to it Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now