-
Notifications
You must be signed in to change notification settings - Fork 151
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
Linking errors with AVX trigonometric functions on MSVC 14 #147
Comments
Hi. Thanks for the report. Questions:
|
Hi Matthias, responses below;
|
For some reason I never saw an error on my builds. I'm pretty sure this is just an incompatible |
I switched the C++ calling convention option from __cdecl (/Gd) to __vectorcall (/Gv) for all polarcoord examples and the Vc project and got this link error below (similar to the previous reported error) for polarcoord_avx and polarcoord_default example projects. If I don't change Vc to use /Gv the polarcoord_sse does not link either, only polarcoord_scalar builds. |
All Options (Debug) for example_polarcoord_avx.prj
/GS /TP /W3 /Zc:wchar_t /I"D:\work\SXall\Vc" /I"D:\work\SXall\Vc\include" /I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt" /I"D:\work\SXall\Vc\examples\polarcoord\example_polarcoord_scalar" /I"D:\work\SXall\Vc\examples\polarcoord\INTERFACE" /I"D:\work\SXall\Vc\examples\polarcoord\example_polarcoord_sse" /I"D:\work\SXall\Vc\examples\polarcoord\example_polarcoord_avx" /Zi /Gm- /Od /Ob0 /Fd"example_polarcoord_avx.dir\Debug\vc140.pdb" /Zc:inline /fp:precise /D "WIN32" /D "_WINDOWS" /D "_DEBUG" /D "Vc_IMPL=AVX" /D "_CRT_SECURE_NO_WARNINGS" /D "SSE2" /D "SSE3" /D "SSSE3" /D "SSE4_1" /D "SSE4_2" /D "AVX" /D "CMAKE_INTDIR="Debug"" /D "_MBCS" /errorReport:prompt /WX- /Zc:forScope /RTC1 /GR /Gd /MDd /Fa"Debug/" /EHsc /nologo /Fo"example_polarcoord_avx.dir\Debug" /Fp"example_polarcoord_avx.dir\Debug\example_polarcoord_avx.pch"
Testcase
example_polarcoord_avx, linkTest, linkTestLibDynamic1, linkTestLibDynamic2, trigonometrix_avx, sorted_avx, subscript_avx, scatterinterleavedmemory_avx
Actual Results
Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol "public: static class Vc_1::Vector<float,struct Vc_1::VectorAbi::Avx> __cdecl Vc_1::Common::Trigonometric<struct Vc_1::ImplementationT<6> >::atan2<class Vc_1::Vector<float,struct Vc_1::VectorAbi::Avx> >(class Vc_1::Vector<float,struct Vc_1::VectorAbi::Avx> const &,class Vc_1::Vector<float,struct Vc_1::VectorAbi::Avx> const &)" (??$atan2@V?$Vector@MUAvx@VectorAbi@Vc_1@@@Vc_1@@@?$Trigonometric@U?$ImplementationT@$05@Vc_1@@@common@Vc_1@@sa?AV?$Vector@MUAvx@VectorAbi@Vc_1@@@2@AEBV32@0@Z) referenced in function "class Vc_1::Vector<float,struct Vc_1::VectorAbi::Avx> __cdecl Vc_1::atan2<float,struct Vc_1::VectorAbi::Avx>(class Vc_1::Vector<float,struct Vc_1::VectorAbi::Avx> const &,class Vc_1::Vector<float,struct Vc_1::VectorAbi::Avx> const &)" (??$atan2@MUAvx@VectorAbi@Vc_1@@@Vc_1@@ya?AV?$Vector@MUAvx@VectorAbi@Vc_1@@@0@AEBV10@0@Z) example_polarcoord_avx D:\work\SXall\Vc\build\examples\polarcoord\main.obj 1
Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol "public: static class Vc_1::Vector<float,struct Vc_1::VectorAbi::Avx> __cdecl Vc_1::Common::Trigonometric<struct Vc_1::ImplementationT<6> >::sin<class Vc_1::Vector<float,struct Vc_1::VectorAbi::Avx> >(class Vc_1::Vector<float,struct Vc_1::VectorAbi::Avx> const &)" (??$sin@V?$Vector@MUAvx@VectorAbi@Vc_1@@@Vc_1@@@?$Trigonometric@U?$ImplementationT@$05@Vc_1@@@common@Vc_1@@sa?AV?$Vector@MUAvx@VectorAbi@Vc_1@@@2@AEBV32@@z) referenced in function "class Vc_1::Vector<float,struct Vc_1::VectorAbi::Avx> __cdecl Vc_1::sin<float,struct Vc_1::VectorAbi::Avx>(class Vc_1::Vector<float,struct Vc_1::VectorAbi::Avx> const &)" (??$sin@MUAvx@VectorAbi@Vc_1@@@Vc_1@@ya?AV?$Vector@MUAvx@VectorAbi@Vc_1@@@0@AEBV10@@z) linkTest D:\work\SXall\Vc\build\tests\linkTest0.obj 1
Expected Results
No Link Errors.
Compilation Details
After adding to the include path the universal C Runtime directory "C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt" I was able to build Vc and all examples that do not use Qt4 except example_polarcoord_avx and example_polarcoord_default; when compiling the tests, I also ran into link errors (LNK2001) in many projects: linkTest, linkTestLibDynamic1, linkTestLibDynamic2, trigonometrix_avx, sorted_avx, subscript_avx, scatterinterleavedmemory_avx.
How to resolve these linking problems? They seem related to trigonometric functions.
The text was updated successfully, but these errors were encountered: