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
Linker error 2019 when using shogun on windows #4219
Comments
Nobody can help me? |
Sorry! As of now, you will have to check how we build shogun in appveyor and try to replicate that. |
Is it possible to get the release and debug version of shogun binaries built with AppVeyor? |
Shogun is part of vcpkg microsoft/vcpkg#2977 (comment) You could try that and let us know how it went |
Thanks for your reply. I just cloned vcpkg from git repository and tried but I got the following error:
|
@fyoda you dont need to clone vcpkg just do: |
@fyoda could you actually provide the full version of your msvc? |
@fyoda and if for some strange reason vcpkg does not work you can still opt to user the windows binary packages in conda-forge |
The msvc version is: 14.00.24215.1 |
I have tried using conda, but it generates a lot a linker errors when I try to link shogun lib to the sample code posted above. |
I have re-tried with vcpkg on another PC but I get the following error:
|
@fyoda could you actually post the linker errors as that seems to be pretty strange... since you the python module (shogun package in conda) itself is linked to that .lib... so i guess you are missing some linker flags. on the other hand i'm not so sure what command yields you to the output of: |
I'm sorry the [657/659] is my fault, comes from copy/paste. @vigsterkr to summarize, I added set VCPKG_DEFAULT_TRIPLET=x64-windows before installing shogun through vcpkg.
In the following I report the last portion of log file install-x64-windows-dbg-out.log:
|
mmm you are building an octave interface? :) |
I just did:
I think something strange happens when nlopt is built.. |
@fyoda this is a vcpkg issue unfortunately :( |
i see you've already sent in an issue, let's have this one track it: microsoft/vcpkg#3207 |
Hi @fyoda, do you solve your problem? I met a similar problem today. vcpkg#9588 |
@lyhyl as you can see there's a pr to try to fix this: vigsterkr@0f959a6 it certainly solves all the unresolved external symbols but i had a problem of actually running the tests... if you happen to have windows on your desk and happy to help maybe we can finally find a final solution for this |
I'm glad you're still working on it @vigsterkr. I'll try to solve it based on your pr. I'm just curious why the project will generate such a huge static link library. Really unfriendly to linker😂. |
i mean i had a branch where i've manually set all the SHOGUN_EXPORT things... but i've dropped that in favour of |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue is now being closed due to a lack of activity. Feel free to reopen it. |
Hello,
I'm trying to use shogun on windows. I built the library with msvc 2015 64bit. In the following there is the cmake report:
The library build successfully but when I try to build the following example code:
I get the following error:
link /NOLOGO /DYNAMICBASE /NXCOMPAT /INCREMENTAL:NO /SUBSYSTEM:CONSOLE "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST:embed /OUT:..\build_release\shoguntest.exe @C:\Users\myUser\AppData\Local\Temp\shoguntest.exe.14740.610.jom shogun.lib(Time.obj) : error LNK2019: unresolved external symbol __imp_timeGetTime referenced in function "public: __cdecl shogun::CTime::CTime(bool)" (??0CTime@shogun@@QEAA@_N@Z) ..\build_release\shoguntest.exe : fatal error LNK1120: 1 unresolved externals
I don't understand where is the problem.
The text was updated successfully, but these errors were encountered: