arm-uclinux-gcc: crt1.o не найден

1046
Hamish Milne

Недавно я установил набор инструментов arm-uclinux из arm-uclinux-tools-base-gcc3.4.0-20040610.sh. Я запустил скрипт и попытался скомпилировать тестовую программу:

/usr/local/arm-uclinux-tools/bin/arm-uclinux-gcc hello.c -o hello  /usr/local/arm-uclinux-tools/lib/gcc/arm-uclinux/3.4.0/../../../../arm-uclinux/bin/ld.real: crt1.o: No such file: No such file or directory collect2: ld returned 1 exit status 

Я часами искал эту проблему и ничего не нашел, кроме подсказки о том, что uclibc не устанавливается. Разве он не скомпилирован вместе с набором инструментов?

Я использую Ubuntu 11 64 бит.

0

1 ответ на вопрос

1
Simon Sheehan

Take a look at this thread. If you'd rather just skip to the point, here's a quote from it

"Try using the command g++ instead of gcc. The g++ command is used for compiling C++ code (whereas gcc defaults to C code), and will automatically link against libstdc++.so. If you really want to use gcc to compile, you must manually tell it to link against the c++ library, e.g. "

$ gcc foo.cpp -l stdc++ 
Какое отношение имеет libstdc ++ к тому, что основной объект времени выполнения C не найден? Ignacio Vazquez-Abrams 13 лет назад 0
Нет, та же проблема с -l stdc ++ :( В любом случае я просто компилирую C, так что это не должно быть проблемой ... Hamish Milne 13 лет назад 0