Jump to content

C++ build , LNK1104 File "libcpmtd.lib" cannot be opened.


Recommended Posts

I tried opening a fresh Leadwerks project in c++, but when I tried to build it, I got the following error:

LNK1104 File "libcpmtd.lib" cannot be opened. 

it has to do with the Linker ? There were some ancient threads but they didn't help me.

In the tutorials where it says Build > Run Without Debugging, I couldn't find it, the closest thing I found was Debug > Start without debugging so there is probably a mistake in the tutorial.

No matter what I change, even If I remove everything in the main.cpp , when I start it from the editor everything happens as before, so I figured thats not the way it works.

Still I haven't been able to fix this.

Link to comment
Share on other sites

3 hours ago, gamecreator said:

Do you have an old Visual Studio?  The Steam page says at least 2015 is required.  I use 2017 with no issues.

 

3 hours ago, reepblue said:

You need Visual Studio 2017.

I am using visual studio 2017 community

Link to comment
Share on other sites

I have german visual studio, but translated there is another message:

Warning MSB8038 Spectre sharpening is enabled, but no defused Spectre libraries were found. Make sure that the Visual Studio workload contains the mitigated Spectre libraries. For more information, see https://aka.ms/Ofhn4c. test2 C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VCTargets\VCTargets\Microsoft.CppBuild.targets 402    

  • Confused 1
Link to comment
Share on other sites

The warning about spectre does not have anything to do with that linker error. Could you verify that the lib-file exists? It should be most likely in (the number might differ)
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\lib\x86\libcpmtd.lib

Furthermore make sure, the path, where you found the library is found in the Library Directories (in the expanded form of the $(VC_LibraryPath_x86) variable) of your active configuration (see image below)

image.thumb.png.c8e2fae14ba35e16d7b0b12b5c74e0d9.png

Also make sure, you are using the correct platform toolset: General -> Platform Toolset should be set to "Visual Studio 2017 (v141)" (at least it is for me ;) )

 

 

  • Thanks 1
  • Upvote 1
Link to comment
Share on other sites

  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...