将 -lm 标志传递给 qt 编译器以摆脱"无法打开文件 'm.lib'
Passing the -lm flag to qt compiler to get rid of "cannot open file “m.lib”
我正在qt中编译一个库,在编译过程中我遇到了这个错误(在带有qt设计器的windows 7 x64上):
无法打开文件"m.lib"
当我四处搜索时,我发现我必须将-lm标志传递给编译器,但我不知道如何传递它?!
我把它留在了qmake标志中,但它说它是未知的!
我将qt设计器与qt5.2和msv2012编译器结合使用。
http://doc.qt.io/qt-5/qmake-project-files.html#declaring-其他库
你可能也需要告诉它图书馆在哪里。
LIBS += -L/path/to/my/lib -lm
希望能有所帮助。
相关文章:
- 如何指定我希望我的LIB链接到的DLL文件?-Visual Studio 2019
- CMake 生成的 MSVC 项目找不到符号,即使为其相关 dll 正确生成了 lib 文件也是如此
- 从 .lib 文件创建一个.dll文件
- 看不到文件'SDL2.lib'
- 可执行文件C++包括.obj,.lib和.dll吗?
- 我应该安装 .cmake 文件来共享/cmake 还是 lib/cmake?
- 链接:致命错误LNK1104:无法打开文件"python37_d.lib"
- 在 Windows 10 下使用 GTest 的 CMake - 致命错误 LNK1104:无法打开文件"gtest.lib",但存在调试"gtestd.lib"
- 链接器找不到导入的 DLL 的 LIB 文件
- LNK1104无法打开文件"legacy_stdio_definitions.lib"
- 有没有适用于Windows.lib文件的GNU二进制文件描述符(BFD)
- 在Qt中链接具有非标准名称的lib文件
- bitbake-grpc交叉编译/配置失败,错误为c-ares::care引用文件/usr/lib/libcares.s
- C++-在没有自定义.lib文件的情况下从Lua C模块调用Lua函数
- LNK 1104 无法打开文件 'glfw3.lib
- 是否可以将 EXE 文件作为 lib 文件链接到另一个项目?
- C++ CLR dll 需要 .lib 文件,但非 CLR 不需要
- G++ 无法链接 curl lib 文件
- 开放式阅读WAV文件lib
- LNK1104无法打开文件'...lib.obj'