Is there a 64bit HID.LIB and SETUPAPI.LIB ? [modified]
-
I'm updating an old (32bit) command line C++ program that I used to detect specific human input devices connected to the USB port. the includes for this project are:
extern "C"
{
#include "hidsdi.h"
#include "hidusage.h"
#include "hidpi.h"
}the project compiles without linking error as a 32bit application. However, as soon as I switch to 64bit I get linker errors such as:
Error 1 error LNK2019: unresolved external symbol HidD_FreePreparsedData referenced in function "public: __cdecl DgCpDfuFunctions::~DgCpDfuFunctions(void)" (??1DgCpDfuFunctions@@QEAA@XZ) DgCpDfuFunctions.obj
Error 2 error LNK2019: unresolved external symbol __imp_SetupDiDestroyDeviceInfoList referenced in function "private: int __cdecl DgCpDfuFunctions::FindControlPanel(struct _hidDeviceStruct *)" (?FindControlPanel@DgCpDfuFunctions@@AEAAHPEAU_hidDeviceStruct@@@Z) DgCpDfuFunctions.obj
Error 3 error LNK2019: unresolved external symbol __imp_SetupDiGetDeviceInterfaceDetailA referenced in function "private: int __cdecl DgCpDfuFunctions::FindControlPanel(struct _hidDeviceStruct *)" (?FindControlPanel@DgCpDfuFunctions@@AEAAHPEAU_hidDeviceStruct@@@Z) DgCpDfuFunctions.obj
Error 4 error LNK2019: unresolved external symbol __imp_SetupDiEnumDeviceInterfaces referenced in function "private: int __cdecl DgCpDfuFunctions::FindControlPanel(struct _hidDeviceStruct *)" (?FindControlPanel@DgCpDfuFunctions@@AEAAHPEAU_hidDeviceStruct@@@Z) DgCpDfuFunctions.obj
I made sure that the 64bit "project properties" -> "Linker" -> "Input" are set up exactly like the 32bit project. Note: I'm using the libraries from the Windows DDK, i.e. \lib\wxp\i386\hid.lib EDIT: I'm using Visual Studio 2005
modified on Wednesday, June 18, 2008 1:43 PM
-
I'm updating an old (32bit) command line C++ program that I used to detect specific human input devices connected to the USB port. the includes for this project are:
extern "C"
{
#include "hidsdi.h"
#include "hidusage.h"
#include "hidpi.h"
}the project compiles without linking error as a 32bit application. However, as soon as I switch to 64bit I get linker errors such as:
Error 1 error LNK2019: unresolved external symbol HidD_FreePreparsedData referenced in function "public: __cdecl DgCpDfuFunctions::~DgCpDfuFunctions(void)" (??1DgCpDfuFunctions@@QEAA@XZ) DgCpDfuFunctions.obj
Error 2 error LNK2019: unresolved external symbol __imp_SetupDiDestroyDeviceInfoList referenced in function "private: int __cdecl DgCpDfuFunctions::FindControlPanel(struct _hidDeviceStruct *)" (?FindControlPanel@DgCpDfuFunctions@@AEAAHPEAU_hidDeviceStruct@@@Z) DgCpDfuFunctions.obj
Error 3 error LNK2019: unresolved external symbol __imp_SetupDiGetDeviceInterfaceDetailA referenced in function "private: int __cdecl DgCpDfuFunctions::FindControlPanel(struct _hidDeviceStruct *)" (?FindControlPanel@DgCpDfuFunctions@@AEAAHPEAU_hidDeviceStruct@@@Z) DgCpDfuFunctions.obj
Error 4 error LNK2019: unresolved external symbol __imp_SetupDiEnumDeviceInterfaces referenced in function "private: int __cdecl DgCpDfuFunctions::FindControlPanel(struct _hidDeviceStruct *)" (?FindControlPanel@DgCpDfuFunctions@@AEAAHPEAU_hidDeviceStruct@@@Z) DgCpDfuFunctions.obj
I made sure that the 64bit "project properties" -> "Linker" -> "Input" are set up exactly like the 32bit project. Note: I'm using the libraries from the Windows DDK, i.e. \lib\wxp\i386\hid.lib EDIT: I'm using Visual Studio 2005
modified on Wednesday, June 18, 2008 1:43 PM
abiemann wrote:
Note: I'm using the libraries from the Windows DDK, i.e. \lib\wxp\i386\hid.lib
I am not sure about the problem but it seems that you are linking with 32-bit version of the library. Do you have a folder with x64 or IA64 in the lib folder. -Saurabh
-
abiemann wrote:
Note: I'm using the libraries from the Windows DDK, i.e. \lib\wxp\i386\hid.lib
I am not sure about the problem but it seems that you are linking with 32-bit version of the library. Do you have a folder with x64 or IA64 in the lib folder. -Saurabh
I tried the IA64 folder... but then I see this error:
hid.lib(HID.DLL) : fatal error LNK1112: module machine type 'IA64' conflicts with target machine type 'x64'
NOTE: this is my x64 debug configuration (preprocessor)
_DEBUG
WIN64
_CONSOLE
WINVER=0x0501
_CRT_SECURE_NO_WARNINGS
_CRT_SECURE_NO_DEPRECATEmodified on Wednesday, June 18, 2008 6:37 PM
-
I tried the IA64 folder... but then I see this error:
hid.lib(HID.DLL) : fatal error LNK1112: module machine type 'IA64' conflicts with target machine type 'x64'
NOTE: this is my x64 debug configuration (preprocessor)
_DEBUG
WIN64
_CONSOLE
WINVER=0x0501
_CRT_SECURE_NO_WARNINGS
_CRT_SECURE_NO_DEPRECATEmodified on Wednesday, June 18, 2008 6:37 PM
IA64 is Itanium. x64 is AMD64 (and EM64T - Intel's implementation of AMD64). The target market for Itanium is tiny because Itanium was a colossal failure. If you use a processor like an Athlon, Opteron, Xeon, Core 2, Core i7 and so on, it will be using x64 (AMD64/EM64T). If you buy 64bit Windows (such as XP 64 bit or Vista 64 bit) it will be x64. You can't use IA64 on an x64 platform, so you need the x64 (probably labelled AMD64) versions of these libs, not the IA64 ones, which is exactly what the first error says. I can't find these either (I only have x86 no matter what I try to install) so if you find/have found these 2 libs, please let me know :) Never mind, found it.
modified on Wednesday, December 3, 2008 7:12 PM