Question

I have a VST plugin that compiles fine with VS200X / MSVC. I am trying to make a Codeblocks/MinGW project also for users who prefer that environment.

When I build the dll with codeblocks it works in a VST host, with GUI, until I start trying to include resources (.png files)

I include the .rc file in the codeblocks project. The resource paths in my resource.h don't have spaces.

If i try and copy the built .dll file the OS has it locked. It is almost as if windres is not compiling the resources successfully and retains a handle on the file - although by the size of the .dll it looks like the resources are there. If I try and run the dll in a vst host via GDB it doesn't hit any breakpoints... presumably the host can't load the .dll.

here are the codeblocks cbp compiler settings...

<Target title="Release Win32">
<Option output="build-win-cb\IPlugEffect" prefix_auto="1" extension_auto="1" />
<Option working_dir="build-win-cb\" />
<Option object_output="build-win-cb\Release" />
<Option type="3" />
<Option compiler="gcc" />
<Option parameters="IPlugEffect.dll" />
<Option host_application="C:\Program Files\vsthost\vsthost.exe" />
<Compiler>
<Add option="-O3" />
<Add option="-msse2" />
<Add option="-ffast-math" />
<Add option="-DVST_API" />
<Add option="-DWIN32" />
<Add option="-D_WIN32_WINNT=0x0501" />
<Add option="-DWINVER=0x0501" />
<Add option="-D_CRT_SECURE_NO_DEPRECATE" />
<Add option="-DPNG_NO_ASSEMBLER_CODE" />
<Add option="-DPNG_LIBPNG_SPECIALBUILD" />
<Add option="-DDLL_BUILD" />
</Compiler>
</Target>

resource.h

...
// Unique IDs for each image resource.
#define KNOB_ID       101
// Image resource locations for this plug.
...

IPlugEffect.rc

#include "resource.h"

KNOB_ID       PNG KNOB_FN
#define KNOB_FN       "resources/img/knob.png"
Was it helpful?

Solution

problem solved. My dll symbol exports/visibility were not correct for gcc.

http://forum.cockos.com/showpost.php?p=835609&postcount=21

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top