Well, I have Project.Configuration.dll, which exports function:
@Q_DECL_EXPORT Configurator* getConfiguration(void);@
I have got a lot of problems:
- In debug directory is Project.Configuration.dll, but in Project.exe QLibrary can't find "Project.Configuration" (with omitted suffix)
- I can't get that exported function because there are errors with this code:
typedef Configurator* (ConfigurationPrototype)(void);
Configurator* Config = 0;
QLibrary *ConfigLib = new QLibrary(QString("Project.Configuration.dll"));
ConfigurationPrototype GetConfigurator = (ConfigurationPrototype)ConfigLib->resolve("getConfigurator"); // this makes errors
error: C2072: 'GetConfigurator' : initialization of a function
error: C2205: 'GetConfigurator' : cannot initialize extern variables with block scope
error: C2066: cast to function type is illegal
error: C2440: 'initializing' : cannot convert from 'ConfiguratorPrototype (__cdecl *)' to 'ConfiguratorPrototype'
There are no conversions to function types, although there are conversions to references or pointers to functions
Could you tell me, where is the problem?