Thread: Avisynth+
View Single Post
Old 2nd June 2019, 00:03   #4693  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,493
I'm writing a C++ program that creates its own Avisynth environment. When I compile it, I get:

Code:
error LNK2001: unresolved external symbol "struct AVS_Linkage const * const AVS_linkage" (?AVS_linkage@@3PEBUAVS_Linkage@@EB)
That goes away if I add:

Code:
#define AVS_LINKAGE_DLLIMPORT
which is what I used to do in my old plugins. Nowadays, in my plugins, I do:

Code:
const AVS_Linkage *AVS_linkage = 0;

extern "C" __declspec(dllexport) const char* __stdcall AvisynthPluginInit3(IScriptEnvironment* env, const AVS_Linkage* const vectors) {
	AVS_linkage = vectors;
	...
but I don't know how to, or if I should, translate this to my standalone C++ program. So - since I have no idea what this vectors thing is about - what's the right thing to do?
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline