Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when building: unresolved external symbol #39

Closed
rster2002 opened this issue Aug 31, 2019 · 2 comments
Closed

Error when building: unresolved external symbol #39

rster2002 opened this issue Aug 31, 2019 · 2 comments

Comments

@rster2002
Copy link

rster2002 commented Aug 31, 2019

I tried rebuilding the application because I wanted to remap some buttons, but I couldn't get it to work. I'm not experienced in building .cpp files, but when I try I get an error log saying that the builder can't resolve external symbols.

The full log after running cl XJoy.cpp:

XJoy.cpp
Microsoft (R) Incremental Linker Version 14.00.24210.0
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:XJoy.exe 
/machine:arm 
XJoy.obj 
XJoy.obj : error LNK2019: unresolved external symbol vigem_alloc referenced in function "void __cdecl `dynamic initializer for 'client''(void)" (??__Eclient@@YAXXZ)
XJoy.obj : error LNK2019: unresolved external symbol vigem_free referenced in function "void __cdecl initialize_left_joycon(void)" (?initialize_left_joycon@@YAXXZ)
XJoy.obj : error LNK2019: unresolved external symbol vigem_connect referenced in function "void __cdecl initialize_xbox(void)" (?initialize_xbox@@YAXXZ)
XJoy.obj : error LNK2019: unresolved external symbol vigem_disconnect referenced in function "void __cdecl disconnect_exit(void)" (?disconnect_exit@@YAXXZ)
XJoy.obj : error LNK2019: unresolved external symbol vigem_target_x360_alloc referenced in function "void __cdecl initialize_xbox(void)" (?initialize_xbox@@YAXXZ)
XJoy.obj : error LNK2019: unresolved external symbol vigem_target_free referenced in function "void __cdecl disconnect_exit(void)" (?disconnect_exit@@YAXXZ)
XJoy.obj : error LNK2019: unresolved external symbol vigem_target_add referenced in function "void __cdecl initialize_xbox(void)" (?initialize_xbox@@YAXXZ)
XJoy.obj : error LNK2019: unresolved external symbol vigem_target_remove referenced in function "void __cdecl disconnect_exit(void)" (?disconnect_exit@@YAXXZ)
XJoy.obj : error LNK2019: unresolved external symbol vigem_target_x360_update referenced in function "unsigned long __cdecl left_joycon_thread(void *)" (?left_joycon_thread@@YAKPAX@Z)
XJoy.obj : error LNK2019: unresolved external symbol hid_init referenced in function main
XJoy.obj : error LNK2019: unresolved external symbol hid_exit referenced in function "void __cdecl initialize_left_joycon(void)" (?initialize_left_joycon@@YAXXZ)
XJoy.obj : error LNK2019: unresolved external symbol hid_enumerate referenced in function "void __cdecl initialize_left_joycon(void)" (?initialize_left_joycon@@YAXXZ)
XJoy.obj : error LNK2019: unresolved external symbol hid_open referenced in function "void __cdecl initialize_left_joycon(void)" (?initialize_left_joycon@@YAXXZ)
XJoy.obj : error LNK2019: unresolved external symbol hid_write referenced in function "void __cdecl subcomm(struct hid_device_ *,unsigned char *,unsigned char,unsigned char,unsigned char,unsigned char)" (?subcomm@@YAXPAUhid_device_@@PAEEEEE@Z)
XJoy.obj : error LNK2019: unresolved external symbol hid_read_timeout referenced in function "void __cdecl subcomm(struct hid_device_ *,unsigned char *,unsigned char,unsigned char,unsigned char,unsigned char)" (?subcomm@@YAXPAUhid_device_@@PAEEEEE@Z)
XJoy.obj : error LNK2019: unresolved external symbol hid_read referenced in function "unsigned long __cdecl left_joycon_thread(void *)" (?left_joycon_thread@@YAKPAX@Z)
XJoy.exe : fatal error LNK1120: 16 unresolved externals

I might just be doing something wrong, but I thought I would let you decide whether or not it's a bug or just me not knowing how things work.

@sam0x17
Copy link
Member

sam0x17 commented Aug 31, 2019

This happens when it can't find the vigem bus library, and its been so long I honestly forget the details of what needs to be in place to link properly.

https://github.com/ViGEm/ViGEmBus

You might want to get some help from nefarious, who makes ViGEm https://discordapp.com/invite/QTJpBX5. He would probably be able to tell you exactly what to do based on that error.

@sam0x17 sam0x17 closed this as completed Aug 31, 2019
@rster2002
Copy link
Author

Thanks for the response. I'll look there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants