crt1.o在linux x64上没有这样的文件c ++编译错误(crt1.o no such file c++ compilation error on linux x64)

编程入门 行业动态 更新时间:2024-10-13 22:20:01
crt1.o在linux x64上没有这样的文件c ++编译错误(crt1.o no such file c++ compilation error on linux x64)

我正在开发Linux平台上的第一步。 我已经安装了Centos x64。 我试图用一些函数和几个单元测试来构建一个小程序。

我使用Netbeans 7.1.2作为开发环境。

以下是构建过程的输出:

CLEAN SUCCESSFUL (total time: 671ms) "/usr/bin/gmake" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf gmake[1]: Entering directory `/home/john/Dev/GoatsCheese' "/usr/bin/gmake" -f nbproject/Makefile-Debug.mk dist/Debug/GNU-Linux-x86/goatscheese gmake[2]: Entering directory `/home/john/Dev/GoatsCheese' mkdir -p build/Debug/GNU-Linux-x86 rm -f build/Debug/GNU-Linux-x86/main.o.d g++ -m32 -c -g -I/usr/include/cppunit -MMD -MP -MF build/Debug/GNU-Linux-x86/main.o.d -o build/Debug/GNU-Linux-x86/main.o main.cpp mkdir -p dist/Debug/GNU-Linux-x86 g++ -m32 -o dist/Debug/GNU-Linux-x86/goatscheese build/Debug/GNU-Linux-x86/main.o /usr/bin/ld: crt1.o: No such file: No such file or directory collect2: ld returned 1 exit status

编译器被设置为创建32位可执行文件,但我不认为这会是一个问题(32位可执行文件可以在Windows上的x64平台上创建 - 我熟悉的平台)。

Locate在以下位置找到crt1.o文件:

locate crt1.o /usr/lib64/Mcrt1.o /usr/lib64/Scrt1.o /usr/lib64/crt1.o /usr/lib64/gcrt1.o

我不确定是否遗漏了一个包,或者我是否应该创建一个符号链接。

I'm making my first steps on the linux platform. I've installed Centos x64. I'm attempting to build a small program with a couple of functions and a couple of unit tests.

I'm using Netbeans 7.1.2 as the development environment.

Here is the output from the build process:

CLEAN SUCCESSFUL (total time: 671ms) "/usr/bin/gmake" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf gmake[1]: Entering directory `/home/john/Dev/GoatsCheese' "/usr/bin/gmake" -f nbproject/Makefile-Debug.mk dist/Debug/GNU-Linux-x86/goatscheese gmake[2]: Entering directory `/home/john/Dev/GoatsCheese' mkdir -p build/Debug/GNU-Linux-x86 rm -f build/Debug/GNU-Linux-x86/main.o.d g++ -m32 -c -g -I/usr/include/cppunit -MMD -MP -MF build/Debug/GNU-Linux-x86/main.o.d -o build/Debug/GNU-Linux-x86/main.o main.cpp mkdir -p dist/Debug/GNU-Linux-x86 g++ -m32 -o dist/Debug/GNU-Linux-x86/goatscheese build/Debug/GNU-Linux-x86/main.o /usr/bin/ld: crt1.o: No such file: No such file or directory collect2: ld returned 1 exit status

The compiler is set to create a 32-bit executable, but I shouldn't think that would be a problem (32 bit executables can be created on an x64 platform on Windows - the platform I'm familiar with).

Locate finds the crt1.o file in the following places:

locate crt1.o /usr/lib64/Mcrt1.o /usr/lib64/Scrt1.o /usr/lib64/crt1.o /usr/lib64/gcrt1.o

I'm not sure if I'm missing a package or if I should create a symlink.

最满意答案

您需要安装32位标准C库开发包。 它可能被命名为libc6-dev-i386 。

You need to install the 32-bit standard C library development package. It's probably named something like libc6-dev-i386.

更多推荐

本文发布于:2023-07-06 07:40:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1047420.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:错误   文件   linux   compilation   file

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!