I’m a beginner and try to use the FrontPanel dll with my Qt program in VS2008.
I added “okFrontPanelDLL.h” and "okFrontPanelDLL.cpp on my project, include the .h on my other class and put the okFrontPanel.dll on the main folder.
But when i first try to compile i get the error : '‘LoadLibraryW’ : cannot convert parameter 1 from ‘char *’ to ‘LPCWSTR’
Corresponding to the line : #if defined(WIN32)
return((DLL *) LoadLibrary(libname));
I already tryed to change the “Use Unicode Character Set” to “Use Multi-byte Character Set” but nothing change. Anyway i would like to use unicode character in my future application so i would like to resolve the problem instead of bypass it.
I also tryed to put (LPCWSTR) before the libname. Actually it seems to correct the error cause the code compile, but the dll isn’t load, so i feel that this trick didn’t really fix the problem.
I have a problem using FrontPanel in a qt project with vs2012. When i try to compile the code, i get the error: “’‘LoadLibraryW’ : cannot convert parameter 1 from ‘char *’ to ‘LPCWSTR’” in line 735 of the “okFrontPanelDLL.cpp” file.
Unfortunately, I don’t think this is the best forum to be asking the question. This forum is primarily focused on FrontPanel and Opal Kelly products. Although the question is related to the FrontPanel DLL, it is really about the Microsoft API LoadLibraryW. You might have more luck searching Microsoft or Qt forums.
I did a Google search for “Qt and LoadLibraryW” and found a few links that may be helpful: