Re: [Plib-users] using plib with qt
Brought to you by:
sjbaker
|
From: John F. F. <joh...@cy...> - 2010-03-25 23:09:26
|
Laura,
Hello and welcome to the PLIB community.
I don't have Qt on my machine but I can
tell you how things are defined on my Windows XP
box with MSVC 6.0. I selected the "go to the
definition of LoadLibrary" and find the following.
<quote>
#define LoadLibrary LoadLibraryA
</quote>
Tracking back:
<quote>
WINBASEAPI
HMODULE
WINAPI
LoadLibraryA(
LPCSTR lpLibFileName
</quote>
);
<quote>
typedef CONST CHAR *LPCSTR, *PCSTR;
</quote>
<quote>
#define CONST const
</quote>
<quote>
typedef char CHAR;
</quote>
So it looks like Windows/MSVC defines the
argument simply to be a "const char *". Did you
put the "*" in your explicit cast?
- John
At 08:46 AM 3/24/2010, you wrote:
>Hello,
>
>I like to use the Joystick library from Plib in
>a Qt Project. Up to now I used VC++ 6.0 with
>Plib and it works fine. Now I want to use it with Qt but don't know how.
>
>
>I do some changes to my .pro file:
>
>INCLUDEPATH = C:/plib-1.8.5/src/js C:/plib-1.8.5/src/util
>
>win32:LIBS +=
>C:/plib-1.8.5/src/js/Debug/js_d.lib C:/plib-1.8.5/src/util/Debug/ul_d.lib
>
>
>and in main.cpp I do:
>
>#include <js.h>
>
>
>But when I compile then I get an error:
>
>..\..\plib-1.8.5\src\util/ul.h:554: error:
>cannot convert 'char*' to 'const WCHAR*' for
>argument '1' to 'HINSTANCE__* LoadLibraryW(const WCHAR*)'
>
>
>I change line 554 in ul.h from:
>
>handle = (HMODULE) LoadLibrary ( dllname ) ;
>
>into:
>
>handle = (HMODULE) LoadLibrary ( (const WCHAR) dllname ) ;
>
>but this doesn't work too and I get 3 new errors.
>
>
>I don't know what to do more now. Can anybody
>help me getting plib run in my Qt project? Would be very nice.
>
>Best regards
>
>Laura
>--
>GMX DSL: Internet, Telefon und Entertainment für nur 19,99 EUR/mtl.!
>http://portal.gmx.net/de/go/dsl02
>
>------------------------------------------------------------------------------
>Download Intel® Parallel Studio Eval
>Try the new software tools for yourself. Speed compiling, find bugs
>proactively, and fine-tune applications for parallel performance.
>See why Intel Parallel Studio got high marks during beta.
>http://p.sf.net/sfu/intel-sw-dev
>_______________________________________________
>plib-users mailing list
>pli...@li...
>https://lists.sourceforge.net/lists/listinfo/plib-users
|