Author Topic: More errors compiling wiiuse (SOLVED)  (Read 7779 times)

Offline Chinook

  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
on: March 08, 2010, 03:02:31 PM
I've been trying to use wiiuse for a bit and it doesn't work. I read the fixes in http://www.wiimoteproject.com/programmers-den/errors-compiling-wiiuse-dll/ got the old driver kit and tried again. The wiiuse source compiles now with the following warnings

1>Generating Code...
1>Linking...
1>   Creating library .\Release/wiiuse.lib and object .\Release/wiiuse.exp
1>events.obj : warning LNK4217: locally defined symbol _wiiuse_write_data imported in function _handshake_expansion
1>ir.obj : warning LNK4049: locally defined symbol _wiiuse_write_data imported
1>events.obj : warning LNK4217: locally defined symbol _wiiuse_set_ir imported in function _event_status
1>io.obj : warning LNK4049: locally defined symbol _wiiuse_set_ir imported
1>io.obj : warning LNK4217: locally defined symbol _wiiuse_set_leds imported in function _wiiuse_handshake
1>io.obj : warning LNK4217: locally defined symbol _wiiuse_status imported in function _wiiuse_handshake
1>io_win.obj : warning LNK4217: locally defined symbol _wiiuse_disconnected imported in function _wiiuse_io_read
1>wiiuse.obj : warning LNK4217: locally defined symbol _wiiuse_disconnect imported in function _wiiuse_cleanup
1>wiiuse.obj : warning LNK4217: locally defined symbol _wiiuse_set_ir_position imported in function _wiiuse_init
1>wiiuse.obj : warning LNK4217: locally defined symbol _wiiuse_set_aspect_ratio imported in function _wiiuse_init
1>Embedding manifest...
1>Build log was saved at "file://c:\Users\Chinook\Desktop\Wiimote\wiiuse_v0.12_src.tar\wiiuse_v0.12_src\wiiuse_v0.12\src\msvc\Release\BuildLog.htm"
1>wiiuse - 0 error(s), 10 warning(s)
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========


but then when I compile the example I get
1>------ Build started: Project: wiiuseexample, Configuration: Debug Win32 ------
1>Linking...
1>example.obj : error LNK2019: unresolved external symbol __imp__wiiuse_set_ir referenced in function _handle_event
1>example.obj : error LNK2019: unresolved external symbol __imp__wiiuse_toggle_rumble referenced in function _handle_event
1>example.obj : error LNK2019: unresolved external symbol __imp__wiiuse_motion_sensing referenced in function _handle_event
1>example.obj : error LNK2019: unresolved external symbol __imp__wiiuse_cleanup referenced in function _main
1>example.obj : error LNK2019: unresolved external symbol __imp__wiiuse_poll referenced in function _main
1>example.obj : error LNK2019: unresolved external symbol __imp__wiiuse_rumble referenced in function _main
1>example.obj : error LNK2019: unresolved external symbol __imp__wiiuse_set_leds referenced in function _main
1>example.obj : error LNK2019: unresolved external symbol __imp__wiiuse_connect referenced in function _main
1>example.obj : error LNK2019: unresolved external symbol __imp__wiiuse_find referenced in function _main
1>example.obj : error LNK2019: unresolved external symbol __imp__wiiuse_init referenced in function _main
1>.\Debug/wiiuseexample.exe : fatal error LNK1120: 10 unresolved externals
1>Build log was saved at "file://c:\Users\Chinook\Desktop\Wiimote\wiiuse_v0.12_src.tar\wiiuse_v0.12_src\wiiuse_v0.12\example\msvc\Debug\BuildLog.htm"
1>wiiuseexample - 11 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I only have a bit of c++ console programming experience (c++ for engineers and scientists is one crappy book) so any help is greatly appreciated.

I just tried compiling the WiiYourself demo and it seems to have worked
« Last Edit: March 13, 2010, 03:38:12 PM by Chinook »



Offline Saman

  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Reply #1 on: March 10, 2010, 02:43:46 AM
The example project doesn't have wiiuse library import set. Either set it manually in project/linker options or add wiiuse project to the example solution and set dependency on it.



Offline Chinook

  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Reply #2 on: March 13, 2010, 03:37:33 PM
Tried it and it didn't work. But then I changed the debug to release like I did with the library source and it worked.
Thanks for the help anyway.



Offline mmmatjaz

  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Reply #3 on: June 21, 2010, 09:50:05 AM
Tried it and it didn't work. But then I changed the debug to release like I did with the library source and it worked.
Thanks for the help anyway.

Hi,

I'm also new to form apps and am having problems with linker. Some time ago I wrote a console application to read from wiimote and it worked perfectly. Now I'm trying to make a form application and I used the same code, I included header and added wiiuse.lib file to additional dependencies. Program wont't compile, I'm getting linker errors LNK2031, 2028, 2019, 1120.
I'm using Visual Studio 2008 and same DDK version in both projects.
What exactily did you mean in the quoted sentence - "debug to release"? Can you pls explain what u did to fix the problem

EDIT: Now I modified project properties as in the link above:
Additional included Directories: "...\WinDDK\7600.16385.0\inc\api"
Additional Library Directories:     "...\WinDDK\7600.16385.0\lib\wxp\i386"

The linker errors are gone, but now I'm getting errors in ctype.h, excpt.h and windef.h

Any ideas? I read that downgrading DDK helps, but it doesn't make any sense, since current DDK worked with console application
« Last Edit: June 21, 2010, 10:11:41 AM by mmmatjaz »