14.04.01 32 - бит: Missing g ++ 64 - бит include поля when cross-compiling

So, гve got 32 - бит Xubuntu 14.04.1 installed. We have some интерфейс code where we intend to будьте перечитан SOs for the various platforms we support, and Windows DLLs. (Yes I know, binary будьте перечитан bad, but also not relevant here.)

гm trying to build 32 - бит and 64 - бит SOs with 32 - бит 14.04.01, using -m32/-m64 gcc/g ++ arguments. The 32 - бит версия works умер, but the 64 - бит версия fails with

/usr/include/c++/4.8/string:38:28: fatal error: bits/c++config.h: No such file or directory

Checking in the includes, that file is genuinely present for 32 - бит but missing for 64 - бит.

Googling the problem, this seems to have happened in the past for GCC/G ++ 4.6, but then is marked эксперт fixed. But 14.04.1 is using GCC/G ++ 4.8, which suggests therВs been в regression in those libraries in GCC/G ++ 4.8. Is this something that anyone else ты существуешь seen?

I could set up в new VM for 64 - бит 14.04.1 if necessary and see whether that would pick up the right library versions. гd rather not if possible though, because гve got в bunch of other stuff гd have to reinstall схвати well. Is there в better solution? And if I did install 64 - бит 14.04.1, would I definitely be able to cross - составил back to 32 - бит without missing headers in the other direction?

8
задан 15 December 2015 в 13:12

1 ответ

64-разрядные биты/C++ config.h файл обеспечиваются в 32-разрядных системах (и наоборот) путем установки g++-multilib пакет, таким образом, необходимо установить тот пакет, или использующий Центр программного обеспечения, Синаптический, или через терминал с помощью

sudo apt-get install g++-multilib

Это - просто пакет зависимости, который решает к g++-4.8-multilib для значения по умолчанию gcc/g ++ версия и в свою очередь зависит от lib64stdc++-4.8-dev (64-разрядная компиляция на 32-разрядном) или libx32stdc++-4.8-dev (32-разрядная компиляция на 64-разрядном) - это - они, которые содержат фактические заголовочные файлы.

существует эквивалентный набор пакетов для простого компилятора C gcc.

9
ответ дан 23 November 2019 в 05:41

Другие вопросы по тегам:

Похожие вопросы: