简体   繁体   中英

Linking errors when trying to build GLFW

I'm using CMAKE to build GLFW, but its spewing out the following error: No CMAKE_C_COMPILER could be found. . This is the entire output log, though i think the important bit is:

LINK : fatal error LNK1104: cannot open file 'ucrtd.lib'

I've done some searching and it seems like my Visual Studio installation is fried, when i try to repair it i get a ton of errors about packages that cannot be found. I've tried to reinstall some C++ redist and the Windows 7 SDK, though that didnt fix it.

Update:

You need to specify the generator when running cmake, if you use VS2013:

cmake . -G "Visual Studio 12 2013 Win64"

For Visual Studio 2015 it should be

cmake . -G "Visual Studio 14 2015 Win64"

Here is the complete list of generators. Maybe you have to leave out the "Win64" part.

Original post:

According to

https://connect.microsoft.com/VisualStudio/feedback/details/1160492/linker-errors-after-upgrading-from-ctp5-to-ctp6

you could try to add $UniversalCRT_LibraryPath to Configuration Properties -> VC++Directories -> Library Directories. Does this solve your problem?

One thing you could also try is to uninstall and then reinstall MSVC.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM