Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. The Contract
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Announcements

    2. Support

    3. Suggestions

Unresolved external symbol?


PlsGoobez
 Share

Recommended Posts

PlsGoobez
#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?

Link to comment
Share on other sites

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.

 

FVxX7Ijm.png

First open up your project settings by right-clicking on the project entry in the Solution Explorer and clicking on the last option.

 

TJxVw3Vm.png

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.

 

IIMu0S9m.png

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 by The_GTA
Link to comment
Share on other sites

PlsGoobez

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

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

PlsGoobez

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.