Error LNK1104 cannot open file 'libcpmtd.lib'


#1

Whenever I try to compiled my project, I get the error "Error LNK1104 cannot open file ‘libcpmtd.lib’ ", but this only happens on a specific computer, and only when I try to compile programs that use cinder. I’ve tried reinstalling visual studio and resetting all the settings, but I can’t figure out why this is happening. I’ve searched through the files for Visual studio, and have found a handful of files named ‘libcpmtd.lib’, so the’res a good chance the file is there. I don’t know how to get Visual Studio to tell me where its looking for that file, or where that file is opened (I assume it’s a #include somewhere, or something similar). Any help would be appreciated.

compiler/cinder versions:
VS community 2015
VS toolset 2013 (v120)
cinder version 0.8.6

Thanks,
Zachary


#2

Could it be this?


#3

Worked a bit, but caused more errors. That seems like that fix resolves a symptom, not the underlying issue. Is there a way I can have VS say which files are requesting the libraries be included, or where VS is looking for them? I may be able to use that to track down where this issue is originating.

Thanks,
Zachary

(Sorry for the messy formatting, there were too many to copy over one by one)

Severity	Code	Description	Project	File	Line	Suppression State
Error	LNK2038	mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in draw.obj	AIPong	C:\Users\zacha\Github Repositories\AI-Pong\vc2013\libcpmtd.lib(syserror.obj)	1	
Error	LNK2038	mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in draw.obj	AIPong	C:\Users\zacha\Github Repositories\AI-Pong\vc2013\libcpmtd.lib(xlock.obj)	1	
Error	LNK2038	mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in draw.obj	AIPong	C:\Users\zacha\Github Repositories\AI-Pong\vc2013\libcpmtd.lib(stdthrow.obj)	1	
Error	LNK2038	mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in draw.obj	AIPong	C:\Users\zacha\Github Repositories\AI-Pong\vc2013\libcpmtd.lib(xthrow.obj)	1	
Error	LNK2038	mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in draw.obj	AIPong	C:\Users\zacha\Github Repositories\AI-Pong\vc2013\libcpmtd.lib(future.obj)	1	
Error	LNK2038	mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in draw.obj	AIPong	C:\Users\zacha\Github Repositories\AI-Pong\vc2013\libcpmtd.lib(xlocale.obj)	1	
Error	LNK2038	mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in draw.obj	AIPong	C:\Users\zacha\Github Repositories\AI-Pong\vc2013\libcpmtd.lib(uncaught.obj)	1	
Error	LNK2038	mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in draw.obj	AIPong	C:\Users\zacha\Github Repositories\AI-Pong\vc2013\libcpmtd.lib(locale0.obj)	1	
Error	LNK2038	mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in draw.obj	AIPong	C:\Users\zacha\Github Repositories\AI-Pong\vc2013\libcpmtd.lib(ios.obj)	1	
Error	LNK2038	mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in draw.obj	AIPong	C:\Users\zacha\Github Repositories\AI-Pong\vc2013\libcpmtd.lib(excptptr.obj)	1	
Error	LNK2038	mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in draw.obj	AIPong	C:\Users\zacha\Github Repositories\AI-Pong\vc2013\libcpmtd.lib(ppltasks.obj)	1	
Error	LNK2005	"private: void __thiscall Concurrency::details::_ExceptionHolder::ReportUnhandledError(void)" (?ReportUnhandledError@_ExceptionHolder@details@Concurrency@@AAEXXZ) already defined in cinder-v120_d.lib(App.obj)	AIPong	C:\Users\zacha\Github Repositories\AI-Pong\vc2013\libcpmtd.lib(ppltasks.obj)	1	
Error	LNK2005	"public: void __thiscall Concurrency::details::_TaskEventLogger::_LogCancelTask(void)" (?_LogCancelTask@_TaskEventLogger@details@Concurrency@@QAEXXZ) already defined in cinder-v120_d.lib(App.obj)	AIPong	C:\Users\zacha\Github Repositories\AI-Pong\vc2013\libcpmtd.lib(ppltasks.obj)	1	
Error	LNK2005	"public: void __thiscall Concurrency::details::_TaskEventLogger::_LogScheduleTask(bool)" (?_LogScheduleTask@_TaskEventLogger@details@Concurrency@@QAEX_N@Z) already defined in cinder-v120_d.lib(App.obj)	AIPong	C:\Users\zacha\Github Repositories\AI-Pong\vc2013\libcpmtd.lib(ppltasks.obj)	1	
Error	LNK2005	"public: void __thiscall Concurrency::details::_TaskEventLogger::_LogTaskCompleted(void)" (?_LogTaskCompleted@_TaskEventLogger@details@Concurrency@@QAEXXZ) already defined in cinder-v120_d.lib(App.obj)	AIPong	C:\Users\zacha\Github Repositories\AI-Pong\vc2013\libcpmtd.lib(ppltasks.obj)	1	
Error	LNK2005	"public: void __thiscall Concurrency::details::_TaskEventLogger::_LogTaskExecutionCompleted(void)" (?_LogTaskExecutionCompleted@_TaskEventLogger@details@Concurrency@@QAEXXZ) already defined in cinder-v120_d.lib(App.obj)	AIPong	C:\Users\zacha\Github Repositories\AI-Pong\vc2013\libcpmtd.lib(ppltasks.obj)	1	
Error	LNK2038	mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in draw.obj	AIPong	C:\Users\zacha\Github Repositories\AI-Pong\vc2013\libcpmtd.lib(cout.obj)	1	
Error	LNK2038	mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in draw.obj	AIPong	C:\Users\zacha\Github Repositories\AI-Pong\vc2013\libcpmtd.lib(xdateord.obj)	1	
Error	LNK2038	mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in draw.obj	AIPong	C:\Users\zacha\Github Repositories\AI-Pong\vc2013\libcpmtd.lib(locale.obj)	1	
Error	LNK2038	mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in draw.obj	AIPong	C:\Users\zacha\Github Repositories\AI-Pong\vc2013\libcpmtd.lib(nothrow.obj)	1	
Error	LNK2038	mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in draw.obj	AIPong	C:\Users\zacha\Github Repositories\AI-Pong\vc2013\libcpmtd.lib(StlLCMapStringA.obj)	1	
Error	LNK2038	mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in draw.obj	AIPong	C:\Users\zacha\Github Repositories\AI-Pong\vc2013\libcpmtd.lib(iosptrs.obj)	1	
Error	LNK2038	mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in draw.obj	AIPong	C:\Users\zacha\Github Repositories\AI-Pong\vc2013\libcpmtd.lib(mutex.obj)	1	
Error	LNK2038	mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in draw.obj	AIPong	C:\Users\zacha\Github Repositories\AI-Pong\vc2013\libcpmtd.lib(cond.obj)	1	
Error	LNK2038	mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in draw.obj	AIPong	C:\Users\zacha\Github Repositories\AI-Pong\vc2013\libcpmtd.lib(winapisupp.obj)	1	
Error	LNK2038	mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in draw.obj	AIPong	C:\Users\zacha\Github Repositories\AI-Pong\vc2013\libcpmtd.lib(StlCompareStringA.obj)	1	
Error	LNK2038	mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in draw.obj	AIPong	C:\Users\zacha\Github Repositories\AI-Pong\vc2013\libcpmtd.lib(winapinls.obj)	1	
Error	LNK2038	mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in draw.obj	AIPong	C:\Users\zacha\Github Repositories\AI-Pong\vc2013\libcpmtd.lib(wlocale.obj)	1	
Error	LNK2038	mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in draw.obj	AIPong	C:\Users\zacha\Github Repositories\AI-Pong\vc2013\libcpmtd.lib(StlCompareStringW.obj)	1	
Error	LNK2038	mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in draw.obj	AIPong	C:\Users\zacha\Github Repositories\AI-Pong\vc2013\libcpmtd.lib(StlLCMapStringW.obj)	1	
Warning	LNK4229	invalid directive '/ThrowingNew' encountered; ignored	AIPong	C:\Users\zacha\Github Repositories\AI-Pong\vc2013\LIBCMTD.lib(new_scalar.obj)	1	
Warning	LNK4229	invalid directive '/GUARDSYM:___CxxFrameHandler,S' encountered; ignored	AIPong	C:\Users\zacha\Github Repositories\AI-Pong\vc2013\libvcruntimed.lib(trnsctrl.obj)	1	
Warning	LNK4229	invalid directive '/GUARDSYM:___CxxFrameHandler3,S' encountered; ignored	AIPong	C:\Users\zacha\Github Repositories\AI-Pong\vc2013\libvcruntimed.lib(trnsctrl.obj)	1	
Warning	LNK4229	invalid directive '/GUARDSYM:___CxxFrameHandler2,S' encountered; ignored	AIPong	C:\Users\zacha\Github Repositories\AI-Pong\vc2013\libvcruntimed.lib(trnsctrl.obj)	1	
Warning	LNK4229	invalid directive '/GUARDSYM:___CxxLongjmpUnwind@4,S' encountered; ignored	AIPong	C:\Users\zacha\Github Repositories\AI-Pong\vc2013\libvcruntimed.lib(trnsctrl.obj)	1	
Warning	LNK4229	invalid directive '/GUARDSYM:__except_handler4,S' encountered; ignored	AIPong	C:\Users\zacha\Github Repositories\AI-Pong\vc2013\libvcruntimed.lib(_chandler4_.obj)	1	
Error	LNK1104	cannot open file 'libucrtd.lib'	AIPong	C:\Users\zacha\Github Repositories\AI-Pong\vc2013\LINK	1

#4

I just realized that I completely ignored the fact that the computer it works on is running Windows 8.1 and the computer that the compile fails on runs Windows 10. Could this be the cause of the issue?

Additionally, I repaired the installations of all the C++ redistributables, as well as VS 2015. Now it gives me the error “RC1015 cannot open include file ‘cinder/CinderResources.h’.” Despite this, I can still open the file by right clicking on the include and clicking ‘open document’, so I’d think it could be opened during compilation.

Does anyone have any thoughts on this? Thanks.


#5

When you get that Resources message it is usually because VS has a different location in the settings for where it looks for resources than for normal includes. Go to your solution properties > Resources > Additional Include Directories. Make sure the path to CinderResources.h is in there.


#6

I added this path to the included resources:
C:\cinder_0.8.6_vc2013\cinder_0.8.6_vc2013\include\

I added these paths to the included libraries:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\lib
C:\cinder_0.8.6_vc2013\cinder_0.8.6_vc2013\lib\msw\x86

The included libraries paths were basically just brute forcing it by finding each file that it wanted in the directory and re-including it in the solution.

However, now there appear to be a bunch of errors regarding what versions of some files are being used, attached below (Again, too many to do individually, so they’re just copied in).

Severity	Code	Description	Project	File	Line	Suppression State
Warning	LNK4229	invalid directive '/GUARDSYM:___CxxLongjmpUnwind@4,S' encountered; ignored	DSShooter	C:\Users\zacha\Github Repositories\DSShooter\DSShooter\vc2013\libvcruntimed.lib(trnsctrl.obj)	1	
Error	LNK2038	mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in draw.obj	DSShooter	C:\Users\zacha\Github Repositories\DSShooter\DSShooter\vc2013\libcpmtd.lib(xlock.obj)	1	
Error	LNK2038	mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in draw.obj	DSShooter	C:\Users\zacha\Github Repositories\DSShooter\DSShooter\vc2013\libcpmtd.lib(xlocale.obj)	1	
Error	LNK2038	mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in draw.obj	DSShooter	C:\Users\zacha\Github Repositories\DSShooter\DSShooter\vc2013\libcpmtd.lib(uncaught.obj)	1	
Error	LNK2038	mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in draw.obj	DSShooter	C:\Users\zacha\Github Repositories\DSShooter\DSShooter\vc2013\libcpmtd.lib(stdthrow.obj)	1	
Error	LNK2038	mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in draw.obj	DSShooter	C:\Users\zacha\Github Repositories\DSShooter\DSShooter\vc2013\libcpmtd.lib(xthrow.obj)	1	
Error	LNK2038	mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in draw.obj	DSShooter	C:\Users\zacha\Github Repositories\DSShooter\DSShooter\vc2013\libcpmtd.lib(locale0.obj)	1	
Error	LNK2038	mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in draw.obj	DSShooter	C:\Users\zacha\Github Repositories\DSShooter\DSShooter\vc2013\libcpmtd.lib(syserror.obj)	1	
Error	LNK2038	mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in draw.obj	DSShooter	C:\Users\zacha\Github Repositories\DSShooter\DSShooter\vc2013\libcpmtd.lib(future.obj)	1	
Error	LNK2038	mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in draw.obj	DSShooter	C:\Users\zacha\Github Repositories\DSShooter\DSShooter\vc2013\libcpmtd.lib(ios.obj)	1	
Error	LNK2038	mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in draw.obj	DSShooter	C:\Users\zacha\Github Repositories\DSShooter\DSShooter\vc2013\libcpmtd.lib(excptptr.obj)	1	
Error	LNK2038	mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in draw.obj	DSShooter	C:\Users\zacha\Github Repositories\DSShooter\DSShooter\vc2013\libcpmtd.lib(ppltasks.obj)	1	
Error	LNK2005	"private: void __thiscall Concurrency::details::_ExceptionHolder::ReportUnhandledError(void)" (?ReportUnhandledError@_ExceptionHolder@details@Concurrency@@AAEXXZ) already defined in cinder-v120_d.lib(App.obj)	DSShooter	C:\Users\zacha\Github Repositories\DSShooter\DSShooter\vc2013\libcpmtd.lib(ppltasks.obj)	1	
Error	LNK2005	"public: void __thiscall Concurrency::details::_TaskEventLogger::_LogCancelTask(void)" (?_LogCancelTask@_TaskEventLogger@details@Concurrency@@QAEXXZ) already defined in cinder-v120_d.lib(App.obj)	DSShooter	C:\Users\zacha\Github Repositories\DSShooter\DSShooter\vc2013\libcpmtd.lib(ppltasks.obj)	1	
Error	LNK2005	"public: void __thiscall Concurrency::details::_TaskEventLogger::_LogScheduleTask(bool)" (?_LogScheduleTask@_TaskEventLogger@details@Concurrency@@QAEX_N@Z) already defined in cinder-v120_d.lib(App.obj)	DSShooter	C:\Users\zacha\Github Repositories\DSShooter\DSShooter\vc2013\libcpmtd.lib(ppltasks.obj)	1	
Error	LNK2005	"public: void __thiscall Concurrency::details::_TaskEventLogger::_LogTaskCompleted(void)" (?_LogTaskCompleted@_TaskEventLogger@details@Concurrency@@QAEXXZ) already defined in cinder-v120_d.lib(App.obj)	DSShooter	C:\Users\zacha\Github Repositories\DSShooter\DSShooter\vc2013\libcpmtd.lib(ppltasks.obj)	1	
Error	LNK2005	"public: void __thiscall Concurrency::details::_TaskEventLogger::_LogTaskExecutionCompleted(void)" (?_LogTaskExecutionCompleted@_TaskEventLogger@details@Concurrency@@QAEXXZ) already defined in cinder-v120_d.lib(App.obj)	DSShooter	C:\Users\zacha\Github Repositories\DSShooter\DSShooter\vc2013\libcpmtd.lib(ppltasks.obj)	1	
Error	LNK2038	mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in draw.obj	DSShooter	C:\Users\zacha\Github Repositories\DSShooter\DSShooter\vc2013\libcpmtd.lib(cout.obj)	1	
Error	LNK2038	mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in draw.obj	DSShooter	C:\Users\zacha\Github Repositories\DSShooter\DSShooter\vc2013\libcpmtd.lib(xdateord.obj)	1	
Error	LNK2038	mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in draw.obj	DSShooter	C:\Users\zacha\Github Repositories\DSShooter\DSShooter\vc2013\libcpmtd.lib(locale.obj)	1	
Error	LNK2038	mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in draw.obj	DSShooter	C:\Users\zacha\Github Repositories\DSShooter\DSShooter\vc2013\libcpmtd.lib(nothrow.obj)	1	
Error	LNK2038	mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in draw.obj	DSShooter	C:\Users\zacha\Github Repositories\DSShooter\DSShooter\vc2013\libcpmtd.lib(StlLCMapStringA.obj)	1	
Error	LNK2038	mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in draw.obj	DSShooter	C:\Users\zacha\Github Repositories\DSShooter\DSShooter\vc2013\libcpmtd.lib(iosptrs.obj)	1	
Error	LNK2038	mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in draw.obj	DSShooter	C:\Users\zacha\Github Repositories\DSShooter\DSShooter\vc2013\libcpmtd.lib(mutex.obj)	1	
Error	LNK2038	mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in draw.obj	DSShooter	C:\Users\zacha\Github Repositories\DSShooter\DSShooter\vc2013\libcpmtd.lib(cond.obj)	1	
Error	LNK2038	mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in draw.obj	DSShooter	C:\Users\zacha\Github Repositories\DSShooter\DSShooter\vc2013\libcpmtd.lib(winapisupp.obj)	1	
Error	LNK2038	mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in draw.obj	DSShooter	C:\Users\zacha\Github Repositories\DSShooter\DSShooter\vc2013\libcpmtd.lib(StlCompareStringA.obj)	1	
Error	LNK2038	mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in draw.obj	DSShooter	C:\Users\zacha\Github Repositories\DSShooter\DSShooter\vc2013\libcpmtd.lib(winapinls.obj)	1	
Error	LNK2038	mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in draw.obj	DSShooter	C:\Users\zacha\Github Repositories\DSShooter\DSShooter\vc2013\libcpmtd.lib(wlocale.obj)	1	
Error	LNK2038	mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in draw.obj	DSShooter	C:\Users\zacha\Github Repositories\DSShooter\DSShooter\vc2013\libcpmtd.lib(StlCompareStringW.obj)	1	
Error	LNK2038	mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in draw.obj	DSShooter	C:\Users\zacha\Github Repositories\DSShooter\DSShooter\vc2013\libcpmtd.lib(StlLCMapStringW.obj)	1	
Warning	LNK4229	invalid directive '/ThrowingNew' encountered; ignored	DSShooter	C:\Users\zacha\Github Repositories\DSShooter\DSShooter\vc2013\LIBCMTD.lib(new_scalar.obj)	1	
Warning	LNK4229	invalid directive '/GUARDSYM:___CxxFrameHandler,S' encountered; ignored	DSShooter	C:\Users\zacha\Github Repositories\DSShooter\DSShooter\vc2013\libvcruntimed.lib(trnsctrl.obj)	1	
Warning	LNK4229	invalid directive '/GUARDSYM:___CxxFrameHandler3,S' encountered; ignored	DSShooter	C:\Users\zacha\Github Repositories\DSShooter\DSShooter\vc2013\libvcruntimed.lib(trnsctrl.obj)	1	
Warning	LNK4229	invalid directive '/GUARDSYM:___CxxFrameHandler2,S' encountered; ignored	DSShooter	C:\Users\zacha\Github Repositories\DSShooter\DSShooter\vc2013\libvcruntimed.lib(trnsctrl.obj)	1	
Warning	LNK4229	invalid directive '/GUARDSYM:__except_handler4,S' encountered; ignored	DSShooter	C:\Users\zacha\Github Repositories\DSShooter\DSShooter\vc2013\libvcruntimed.lib(_chandler4_.obj)	1	
Error	LNK1104	cannot open file 'libucrtd.lib'	DSShooter	C:\Users\zacha\Github Repositories\DSShooter\DSShooter\vc2013\LINK	1

#7

Hi,

It seems you are trying to link libraries / objects compiled with different versions of Visual Studio. MSCVER 1900 refers to VS2015. MSCVER 1800 is VS2013. From a quick glance at the thread, I suspect that you have copied stdlib compiled with VS2015, but the rest of the toolchain is VS2013.

Bala.


#8

It seems that the VS2013 toolset wasn’t installed correctly, was causing those issues. Oddly, I wasn’t able to install only the toolset, but had to install VS express 2013 instead. After that, everything seemed to work itself out, although I still needed to point VS to the correct folder.

Thanks for the assistance!