Vcpkg: gsl build Failed: env.c.obj : error LNK2001: unresolved external symbol _fp_env_string

Created on 4 May 2017  ·  2Comments  ·  Source: microsoft/vcpkg

The gsl(https://www.gnu.org/software/gsl/) built failed as follows When I build it under windows 7 sp1 64 chinese edition with cmake 3.8.0 and visual studio 2017.

env.c.obj : error LNK2001: unresolved external symbol _fp_env_string
libgsl.dll : fatal error LNK1120: 1 unresolved externals
LINK failed. with 1120
ninja: build stopped: subcommand failed.

port-bug vcpkg-bug

Most helpful comment

The problem is that the file 0002-add-fp-control.patch has CRLF line endings, and git apparently can't deal with that when patching (it works when you convert to LF). The solution would be to force LF endings when checking out, so maybe adding a gitattributes to force LF endings for all .patch files might be the best way to fix this and prevent similar errors...?

All 2 comments

The problem is that the file 0002-add-fp-control.patch has CRLF line endings, and git apparently can't deal with that when patching (it works when you convert to LF). The solution would be to force LF endings when checking out, so maybe adding a gitattributes to force LF endings for all .patch files might be the best way to fix this and prevent similar errors...?

It works so!
Need someone to add a gitattribute to force LF endings for all .patch files!

Was this page helpful?
0 / 5 - 0 ratings