c++ - 使用 g++ 构建 Nirgam

标签 c++

您好,我正在尝试在 VMware 环境中使用 Debian 构建 nirgam 软件。当我发出命令 make 时,我最终遇到如下错误。

g++: error: unrecognized command line option ‘-W1,-soname,application/lib/App_send.so’
make: *** [application/lib/App_send.so] Error 1

makefile 的片段如下,

application/lib/%.so : application/src/%.o
    $(CC) -shared -W1,-soname,$@ -o $@ $<

router/lib/%.so : router/src/%.o
    $(CC) -shared -W1,-soname,$@ -o $@ $<

请让我知道我要去哪里错了。

非常感谢您的建议。

最佳答案

你把makefile复制错了,选项不是-W1而是-Wl加上字母l(小写的L) 而不是数字 1

关于c++ - 使用 g++ 构建 Nirgam,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30209302/

相关文章:

c++ - 我无法将 'fill' std::vector 构造函数与 unique_ptrs 一起使用

c++ - 访问动态数组中的结构中的字符串变量时如何修复 "segmentation fault (core dumped)"错误

c++ - 函数模板 : default type parameter

c++ - 为什么 visual studio 为 char -1 打印 FFFFFFFF?

c++ - 为什么要在 C++ 结构中添加填充符?

c++ - VS 2017 for C语言报错

c++ - 在dll和exe中使用全局变量

c++ - ZeroMQ后台线程创建

c++ - 在 C++ 中使用 eigen3 进行继承和转换

c++ - 索引绘图 : data copied from a working example is displayed incorrectly