本文介绍了CMAKE:如何使用Visual Studio在Windows上将可执行文件链接到Winmm imm32版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以轻松找到这些库?

Is it possible to find these libraries easily?

我不想重新发明轮子并编写超长的find_library调用!

I do not want to reinvent the wheel and write uber-long find_library call!

甚至,我只想将"winmm.lib等"行放入

Even more, I just want to put line "winmm.lib etc" into

"Librarian" => "Additional dependencies"
or
"Linker" => "Additional dependencies"

这些库是Windows和Visual Studio的好朋友,因此他们非常了解如何找到它们.

These libraries are good friends of Windows and Visual Studio so they know very well how to find them.

推荐答案

Andre的解决方案有效.在我的项目中,此行完成了窍门:

Solution from Andre works. In my project this line did the trick:


target_link_libraries(${target_name} winmm.lib)

这篇关于CMAKE:如何使用Visual Studio在Windows上将可执行文件链接到Winmm imm32版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-03 12:53