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

VS 15 build error #15

Closed
Pamnki opened this issue Jan 10, 2017 · 9 comments
Closed

VS 15 build error #15

Pamnki opened this issue Jan 10, 2017 · 9 comments

Comments

@Pamnki
Copy link

Pamnki commented Jan 10, 2017

I'm trying to compile this miner using VS 15 and I'm getting this error. Is there anything I'm missing?

1>jpsock.obj : error LNK2019: unresolved external symbol __imp_closesocket referenced in function "public: void __cdecl jpsock::disconnect(void)" (?disconnect@jpsock@@QEAAXXZ)
1>jpsock.obj : error LNK2019: unresolved external symbol __imp_connect referenced in function "private: bool __cdecl jpsock::jpsock_thd_main(void)" (?jpsock_thd_main@jpsock@@AEAA_NXZ)
1>jpsock.obj : error LNK2019: unresolved external symbol __imp_recv referenced in function "private: bool __cdecl jpsock::jpsock_thd_main(void)" (?jpsock_thd_main@jpsock@@AEAA_NXZ)
1>jpsock.obj : error LNK2019: unresolved external symbol __imp_send referenced in function "private: bool __cdecl jpsock::cmd_ret_wait(char const *,struct jpsock::opq_json_val &)" (?cmd_ret_wait@jpsock@@AEAA_NPEBDAEAUopq_json_val@1@@Z)
1>jpsock.obj : error LNK2019: unresolved external symbol __imp_shutdown referenced in function "public: void __cdecl jpsock::disconnect(void)" (?disconnect@jpsock@@QEAAXXZ)
1>jpsock.obj : error LNK2019: unresolved external symbol __imp_socket referenced in function "private: bool __cdecl jpsock::prv_connect(char const *)" (?prv_connect@jpsock@@AEAA_NPEBD@Z)
1>jpsock.obj : error LNK2019: unresolved external symbol __imp_WSAStartup referenced in function "public: __cdecl jpsock::jpsock(unsigned __int64)" (??0jpsock@@QEAA@_K@Z)
1>jpsock.obj : error LNK2019: unresolved external symbol __imp_WSAGetLastError referenced in function "private: bool __cdecl jpsock::set_socket_error_strerr(char const *)" (?set_socket_error_strerr@jpsock@@AEAA_NPEBD@Z)
1>jpsock.obj : error LNK2019: unresolved external symbol __imp_getaddrinfo referenced in function "private: bool __cdecl jpsock::prv_connect(char const *)" (?prv_connect@jpsock@@AEAA_NPEBD@Z)
1>jpsock.obj : error LNK2019: unresolved external symbol __imp_freeaddrinfo referenced in function "private: bool __cdecl jpsock::jpsock_thd_main(void)" (?jpsock_thd_main@jpsock@@AEAA_NXZ)
@dimecoin
Copy link
Contributor

dimecoin commented Jan 10, 2017

Are you building on Windows 7 ? I was able to build on Windows 7 by using the Windows 8.1 SDK

If not, make sure your linker paths are setup correct. That is, you need to link against the included rapidjson and crypto directories:

C:\dimecoin\projects\xmr-stak-cpu\crypto;C:\dimecoin\projects\xmr-stak-cpu\rapidjson;%(AdditionalLibraryDirectories)

@Pamnki
Copy link
Author

Pamnki commented Jan 10, 2017

Im using Windows 10. I tried to put

D:\Users\PwnK\Downloads\xmr-stak-cpu\crypto;D:\Users\PwnK\Downloads\xmr-stak-cpu\rapidjson;%(AdditionalLibraryDirectories)

to Additional Library Directories but it didn't fix the problem.

@dimecoin
Copy link
Contributor

Did you add files as existing items or as reference?

@Pamnki
Copy link
Author

Pamnki commented Jan 10, 2017

I added the files using File, New, Project From Existing Code and chose Visual C++ and then I just chose the folder location.

@dimecoin
Copy link
Contributor

ah, I see, I just did new project. you also need to link again 'ws2_32.lib'

@Pamnki
Copy link
Author

Pamnki commented Jan 10, 2017

That fixed the problem. Thank you!

@Pamnki Pamnki closed this as completed Jan 10, 2017
@fireice-uk
Copy link
Owner

dimecoin - rapidjson is all header files, nothing to link against

crypto is c, but msvc will link it as long as it is added to the project.

@dimecoin
Copy link
Contributor

Yea, I was wrong here. Those don't need to be in lib path. Just need to link against 'ws2_32.lib' and it should work.

@M-AMAIRI
Copy link

thank you @dimecoin :)

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

4 participants