Hello,
I generated a DLL using the Dynamic Library project from the introjucer and I succeeded in opening it and calling a function from it using the DynamicLibrary class. However, I am running into the follow error that I don't understand how to deal with.
HEAP[hellodllopenerDBG.exe]: HEAP: Free Heap block 00F0B828 modified at 00F0DD58 after it was freed
The code in my sample application just looks like this
void initialise (const String& commandLine) override
{
// This method is where you should put your application's initialisation code..
DynamicLibrary test;
test.open("hello.dll");
test.close();
mainWindow = new MainWindow (getApplicationName());
}
And my DLL code
.h file
#ifdef HELLOFUNCDLL_EXPORTS
#define HELLOFUNCDLL_API __declspec(dllexport)
#else
#define HELLOFUNCDLL_API __declspec(dllimport)
#endif
#include "JuceHeader.h"
namespace HelloFunc
{
class MyHelloFunc
{
public:
static HELLOFUNCDLL_API int hello();
};
}
.c file
#include "hellofunc.h"
namespace HelloFunc
{
int MyHelloFunc::hello()
{
return 42;
}
}
I'm probably doing a whole bunch of things wrong but I'm new with DLLs and I can't find any examples. Any advice is appreciated. Thanks!
