sandervs / javahidapi

Automatically exported from code.google.com/p/javahidapi
Other
0 stars 0 forks source link

Windows x64 #3

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago

Whem I compile (x64) the hidapi files, I get the following errors with Visual 
Studio:

1>hid-java.obj : error LNK2019: unresolved external symbol 
__imp_WideCharToMultiByte referenced in function convertToUTF8
1>MSVCRTD.lib(_error_.obj) : error LNK2001: unresolved external symbol 
__imp_WideCharToMultiByte
1>hid.obj : error LNK2019: unresolved external symbol 
__imp_SetupDiDestroyDeviceInfoList referenced in function hid_enumerate
1>MSVCRTD.lib(_error_.obj) : error LNK2001: unresolved external symbol 
__imp_GetProcAddress
1>MSVCRTD.lib(_pdblkup_.obj) : error LNK2001: unresolved external symbol 
__imp_GetProcAddress
1>hid.obj : error LNK2019: unresolved external symbol __imp_LoadLibraryA 
referenced in function lookup_functions
1>hid.obj : error LNK2019: unresolved external symbol __imp_LocalFree 
referenced in function register_error
1>hid.obj : error LNK2019: unresolved external symbol __imp_WriteFile 
referenced in function hid_write
1>hid.obj : error LNK2019: unresolved external symbol __imp_CancelIo referenced 
in function hid_read
....... and so on 

1>C:\***********\javahidapi\windows\Debug\hidapi-jni.dll : fatal error LNK1120: 
46 unresolved externals

Does anyone have the solution for this problem? 

What version of the product are you using? On what operating system?
Visual Studio 2010 Express
Windows 7

Original issue reported on code.google.com by open.led...@gmail.com on 31 Oct 2011 at 3:52

GoogleCodeExporter commented 8 years ago
I can build it, but when I run it from Java I got
hidapi-jni.dll: Can't find dependent libraries

Same env: win 7 & VS 2010 Express

Original comment by bartek.z...@gmail.com on 3 Nov 2011 at 1:37

GoogleCodeExporter commented 8 years ago
I'm sorry I can't offer more help than this, but I just successfully built the 
dll for x64 and tested that it is working with Java. It sounds like the issue 
is with your environments and not the API itself.

I am also using Windows 7 and VS 2010 Express.

Original comment by dmorr...@gmail.com on 12 Nov 2011 at 8:27

GoogleCodeExporter commented 8 years ago
I solved the problem. One should check target architecture! If it's 32bit it 
WILL NOT WORK. It should to be changed to x64. If VS doesn't have one, you 
should install Windows 7 SDK and change toolset in project configuration. Then 
change target arch. to 64bit.

Original comment by bartek.z...@gmail.com on 14 Nov 2011 at 10:58

GoogleCodeExporter commented 8 years ago
I'm also getting the linker errors (unresolved external symbol). I have the 
opposite problem though in that the win32 platform builds with no errors but 
the x64 fails. I'm using Win7 and I've tried it with VS Express and Premium. 

Question or bartek..:
 When you said "change toolset in project configuration" did you mean Property Pages > Configuration Properties > General Platform Toolset? Did you set it to 'Windows7.1SDK'?

I've done that for the x64 platform and no change.

Quick sample:

1>Link:
1>     Creating library 
C:\playground\MMP\SW\javahidapi\windows\Release\hidapi.lib and object 
C:\playground\MMP\SW\javahidapi\windows\Release\hidapi.exp
1>hid-java.obj : error LNK2001: unresolved external symbol 
__imp_WideCharToMultiByte
1>hid.obj : error LNK2001: unresolved external symbol __imp_CreateFileA
...

Original comment by jemi...@gmail.com on 22 Nov 2011 at 6:55

GoogleCodeExporter commented 8 years ago
Windows build files has been updated.

Original comment by kroko...@gmail.com on 10 Jan 2012 at 12:52