Old 10-22-2014, 12:49 PM   #1
srb
Human being with feelings
 
Join Date: Oct 2014
Posts: 2
Default reaper_plugin_functions linker error, getting started

Hey all,

New at this reaper dev game here, so I'm hoping I'm just doing something dumb and easy for someone to answer quick.

This might be more of a C++ understanding question as opposed to a Reaper question, but its related to the reaper_plugin_functions.h. I'm using Windows/ Visual Studio 2013 / REAPER (64-bit).

If I use one of the functions, like plugin_register, it compiles OK when I add reaper_plugin_functions.h to my project, but it fails to link:

unresolved external symbol "int (_cdecl* plugin_register)(char const*,void*)"(?plugin_register@@3P6AHPEBDPEAX@ZEA )

I see all the functions in there are marked extern, but from what I understand, that doesn't mean that I still don't need to link in the object.

When I saw that linker error, I thought "Yeah, that makes sense". But in the REAPER program directory, I don't see a lib/dll that I should add in my link, nor does sws_extensions ever do that anyways. And now I'm confused :|.

The examples outside of sws_extensions (ninjamloop,m3u,raw,csurf) don't use plugin_register, but it looks like they use other methods found in there and also don't have a problem.

Any help in explaining where my issue is or might be is greatly appreciated!
srb is offline   Reply With Quote
Old 10-22-2014, 01:13 PM   #2
srb
Human being with feelings
 
Join Date: Oct 2014
Posts: 2
Default

Nevermind this post.. I figured it out.

I'm not sure how/where sws_extensions does it but if declared the pointer to plugin_register function at the top of the source file that was using it, then it links a-OK.

Heh, I still don't understand how that works but that's a question for a more cpp general forum .
srb is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 12:18 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.