Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我必须链接一个名称中没有lib前缀的静态库。我知道如何与简单的g++即链接如下
lib
g++
g++ -l:"mylib.a" a.cpp
我想用 MPC 做同样的事情。我尝试在 MPC 文件中跟踪。那些不工作。
lit_libs += $(LIB_NAME)生成g++ -l"mylib" a.cpp需要lib作为前缀。
lit_libs += $(LIB_NAME)
g++ -l"mylib" a.cpp
pure_libs += $(LIB_NAME)生成g++ "mylib" a.cpp找不到库。
pure_libs += $(LIB_NAME)
g++ "mylib" a.cpp
请给我MPC链接没有lib前缀的库的选项。
MPC
pure_libs += -l:$(LIB_NAME).a
这解决了我的问题。