编译器未创建可执行文件
我正在重新编译现有的源文件,但它无法创建可执行文件,尽管生成的文件具有执行权限
-rwxrwxr-x 1 ilvweb ilv 2949112 Jan 31 09:34 karny
$ file karny
karny: ELF 64-bit MSB dynamic lib SPARCV9 Version 1, dynamically linked, not stripped
用于编译的命令
g++ -m64 -mcpu=v9 -DSUNOS -DNDEBUG -g -Wno-deprecated -o karny tkm.o THlm.o Connection.o Socket.o ThLogger.o File.o TextFile.o File.o Timer.o lPlugin.o \
-G -lm
是否缺少任何选项
如果我们同时拥有 gcc 和 g++ 以及为 g++ 编写的源代码以便重新编译使用 gcc 可以做什么,目前在这个环境中我们只能使用 gcc
I was recompiling the existing source files but it is not able to create the executable though it file generated has execute permission
-rwxrwxr-x 1 ilvweb ilv 2949112 Jan 31 09:34 karny
$ file karny
karny: ELF 64-bit MSB dynamic lib SPARCV9 Version 1, dynamically linked, not stripped
The command used for compilation
g++ -m64 -mcpu=v9 -DSUNOS -DNDEBUG -g -Wno-deprecated -o karny tkm.o THlm.o Connection.o Socket.o ThLogger.o File.o TextFile.o File.o Timer.o lPlugin.o \
-G -lm
Is there any option missing
If we have both gcc and g++ and the source written for g++ in order to recompile with gcc what could be done as the as the currently in this environment we can use only gcc
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
根据 GCC 手册:
当您使用(SysV 派生的)Solaris 时,您似乎要求 GCC 创建一个共享对象。你有那个-G 有什么具体原因吗?
According to the GCC manual:
Seeing as you're on (SysV-derived) Solaris, it would seem you're asking GCC to create a shared object. Is there a specific reason you have that -G?
根据
file
,您创建了一个共享对象(通常命名为*.so
)。According to
file
, you made a shared object (which usually would be named*.so
).