Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Improvements to the SDK

May
13,594
201
The x62/release version doesn't have a DEF file specified. And both release and debug refer to a library that we probably don't have.

1734286511581.webp
 
What library don't you have? TakeCmd.lib? If you don't have that you can't link to any takecmd.dll functions, so you probably can't do much with your plugin.

The library specified in the sample's properties (d:\TakeCommand33\x64\release\TakeCmd.lib;) probably doesn't exist. That causes a build error.

Code:
1>LINK : fatal error LNK1181: cannot open input file 'd:\TakeCommand33\x64\release\TakeCmd.lib'

The sample comes with a TakeCmd.lib (at the top level) and if I remove d:\TakeCommand33\x64\release\TakeCmd.lib in the properties, it's apparently found; I'm not sure how; I have no customizations to the VC Library Directories.
 
Why do you need a DEF file? The Plugin sample is using DLLExports.
Without the DEF file, the names of the plugin's exports are decorated and TCC won't load the plugin. This has always been the case.

Code:
TCC: (Sys) The specified procedure could not be found.
 "InitializePlugin"

See this thread (@Gisle Vanem)
 
There's also this

Code:
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2176,5): warning : The referenced project '..\dll\TakeCmd.vcxproj' does not exist.

which I reckon comes from here

1734363530548.webp


which I reckon (guess) comes from plugin.vcxproj

Code:
  <ItemGroup>
    <ProjectReference Include="..\dll\TakeCmd.vcxproj">
      <Project>{5bf5a5ec-3ec4-4b7c-9f26-b48803137703}</Project>
    </ProjectReference>
  </ItemGroup>
 
And these differ:

plugin.h: DLLExports LPPLUGININFO WINAPI GetPluginInfo( HMODULE hModule );

plugin.cpp: DLLExports LPPLUGININFO WINAPI GetPluginInfo( void )

'extern "C"' gets rid of the name mangling without a DEF file.

Code:
#define DLLExports extern "C" __declspec(dllexport)
 
Back
Top