Compiling VST Module Architecture samples

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

I get this when trying to compile the MidiEcho sample using Visual C++ 6 on XP:

-----
Compiling...
plugparams.cpp
C:\Steinberg VST Module Architecture\public.sdk\source\common\plugparams.cpp(134) : error C2664: 'SetTimer' : cannot convert parameter 4 from 'void (struct HWND__ *,unsigned int,unsigned long,unsigned long)' to 'void (__stdcall *)(struct HWND__ *,un
signed int,unsigned int,unsigned long)'
None of the functions with this name in scope match the target type
Error executing cl.exe.

midiecho.dll - 1 error(s), 0 warning(s)
-----

Everything I find related to this on the web suggests ensure the Workspace/Project are setup for win32 app rather than console.

Here are the build settings:

-----
/nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../../../pluginterfaces" /I "../../../../source/common" /I "../../../../source/midi" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MIDIECHO_EXPORTS" /FR"Debug/" /Fp"Debug/midiecho.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
-----

...not a console app, so I'm at a loss. Could someone smarter than I please point in the right direction in order to get this thing compiled???

Much appreciation ~ jp

Post

mmmmm.... midi echo!
Can't wait to have my filter tweaks echo'd while the tune plays on...

Post

Mailing-list archives are a wonderful thing, aren't they?

Problem and Solution are both there.

Cheers ~ jp

Post

could it be that your workspace is using a different calling convention? One of the functions above is defined as _stdcall*

(look in Project settings >> c/c++ >> code generation)

Make sure you have also selected 'Multithreaded DLL' for the run-time library too.

Post

Yes, the problem had to do with the version of Platform SDK that comes with VC++ 6.

The CALLBACK Macro was not defined to be _stdcall.

A cast could be used to hush the compiler, but I opted to update the SDK (which took a while to get the correct headers/libraries worked out...)

Users of VC++ 7 don't have this problem.

All is well now.

Cheers ~ jp

Post Reply

Return to “DSP and Plugin Development”