Integrate Virtualkeys.hpp

Post questions, comments and feedback to our 3Dconnexion Windows Development Team.

Moderator: Moderators

Post Reply
Jeff_T69
Posts: 3
Joined: Mon Dec 08, 2014 4:00 am

Integrate Virtualkeys.hpp

Post by Jeff_T69 »

Hello,

I want to integrate the "virtualkeys.hpp" for my application.
So I add "siapp.lib" in Linker -> Input and also in Linker- > General the path of the library.
In C/C++ -> General I integrated the path for the Additional Include Directories.

Then I included in my header file:
#include "spwmacro.h" /* Common macros used by SpaceWare functions. */
#include "si.h" /* Required for any SpaceWare support within an app.*/
#include "siapp.h" /* Required for siapp.lib symbols */
#include "virtualkeys.hpp"

After this I get an error:

virtualkeys.hpp(179): error C2664: '_tcsicmp' : cannot convert parameter 1 from 'const wchar_t *const ' to 'const char *'

Okay, it cant't convert. I understand this because "_tcsicmp" is made for "const char*".
My question is, why this doesn't matter in the "3DxTest"-project, but in my project it does? :?:
jwick
Moderator
Moderator
Posts: 3331
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: Integrate Virtualkeys.hpp

Post by jwick »

Maybe it is the UNICODE, _UNICODE define?
3DxTest is Unicode enabled. I forget how. Probably one of those defines. I guess virtualkeys.hpp expects Unicode also.
Jeff_T69
Posts: 3
Joined: Mon Dec 08, 2014 4:00 am

Re: Integrate Virtualkeys.hpp

Post by Jeff_T69 »

Thank You for the tip! I think this fixed the problem.
(Configuration Properties --> Character Set = Use Unicode Character Set).

And after this i have 5 new errors (but now, in my code) . I really love programming :D
Post Reply