I got the DLL from a student at my university who was working on the same piece of hardware and all I got was the file .h with the functions I can use and the Dll itself.
At the moment I don´t think I´m using QLibrary. In the .cpp file I just try to access the functions by calling them:
int err = 0;
err = loc_ini();
while (1) {
//Sleep(1);
err = loc_getposition(&loc_pos);
//Sleep(500);
cout << "Posicion x:" << loc_pos.x << endl;
cout << "posicion y:" << loc_pos.y << endl << endl;
}
}
int err = 0;
err = loc_ini();
while (1) {
//Sleep(1);
err = loc_getposition(&loc_pos);
//Sleep(500);
cout << "Posicion x:" << loc_pos.x << endl;
cout << "posicion y:" << loc_pos.y << endl << endl;
}
}
To copy to clipboard, switch view to plain text mode
This was enough in Code::blocks but it doesn´t work in QT/VisualStudio. Should I use something like:
typedef void (*MyPrototype)();
MyPrototype myFunction = (MyPrototype) myLib.resolve("mysymbol");
if (myFunction)
myFunction();
QLibrary Sniffer("Sniffer");
typedef void (*MyPrototype)();
MyPrototype myFunction = (MyPrototype) myLib.resolve("mysymbol");
if (myFunction)
myFunction();
To copy to clipboard, switch view to plain text mode
Should I use something like that?
Bookmarks