Hello folks,

I'm building an executable called foo.exe (project name foo) and a library called foo.lib (project name libfoo) that the executable depends on. I have an ImportLibrary line for foo.exe which looks like this:
ImportLibrary="<path>\lib\Debug\foo.lib"

and an OutputFile line for foo.lib that looks like this:
OutputFile="<path>\lib\Debug\foo.lib"

My build for the executable (foo.exe) fails with the following error:

"LINK : fatal error LNK1149: output filename matches input filename 'foo.lib'"

A few questions:
1. I'm not sure if the error is because of the same name, but in any case, it seems to be wrong because one of the two libraries will be overwritten by the other. How do I avoid this (apart from using different names, of course) ? 2. Why is an import library required for the executable ? Isn't it only for DLL's?

Regards,
Hari

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to