for the cerr error
using namespace std;
using namespace std;
To copy to clipboard, switch view to plain text mode
for the TestDll() error, probably:
you defined a function (varible) myFunction, call that instead?
and you should probably also declare it to return a char* instead of void?
#include <QCoreApplication>
#include <QLibrary>
#include <iostream>
using namespace std;
typedef char* (*MyPrototype)();
MyPrototype myFunction =
(MyPrototype
) QLibrary::resolve("dllprog",
"TestDll");
int main(int argc, char *argv[])
{
char *b = TestDll();
cout << endl << b;
return 0;
}
#include <QCoreApplication>
#include <QLibrary>
#include <iostream>
using namespace std;
QLibrary myLib("dllprog");
typedef char* (*MyPrototype)();
MyPrototype myFunction =
(MyPrototype) QLibrary::resolve("dllprog", "TestDll");
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
char *b = TestDll();
cout << endl << b;
return 0;
}
To copy to clipboard, switch view to plain text mode
(all untested, of course...)
HTH
Bookmarks