Перейти к содержанию
Посмотреть в приложении

A better way to browse. Learn more.

Форум Академгородка, Новосибирск

A full-screen app on your home screen with push notifications, badges and more.

Чтобы установить это приложение на iOS и iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
Чтобы установить это приложение на Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

c++ и gcc

Опубликовано

Пытаясь закомпилить хоть что-нить на C++, получаю странную ошибку.

$ cat test.cpp
#include <iostream>
int main() {
   return 0;
}

$ gcc test.cpp
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/cstdlib:135: ошибка: ‘::system’ не был декларирован

Никто не знает, в чем дело?

Рекомендуемые сообщения

Опубликовано
  • Автор

Естественноhttps://academ.club/html/emoticons/smile.gif

На самом деле, мое "Без разницы" и означало, что вывод компилятора тот же.

Опубликовано

Что-то у вас в gcc отломано, вот что должно быть (gcc 4.1.1):

cat >test.cpp
#include <iostream>
int main() {
   return 0;
}
[den@den tmp]$ gcc test.cpp
/tmp/.private/den/ccOMmP2E.o: In function `__static_initialization_and_destruction_0(int, int)':
test.cpp:(.text+0x3e): undefined reference to `std::ios_base::Init::Init()'
/tmp/.private/den/ccOMmP2E.o: In function `__tcf_0':
test.cpp:(.text+0x85): undefined reference to `std::ios_base::Init::~Init()'
/tmp/.private/den/ccOMmP2E.o:(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
[den@den tmp]$ g++ test.cpp
[den@den tmp]$ gcc test.cpp -lstdc++
[den@den tmp]$

Опубликовано
  • Автор

QUOTE (den @ Oct 28 2007, 03:48)
Что-то у вас в gcc отломано

Спасибо, но и gcc с параметрами, и g++ дают то же самое.

PS мне тоже приходила мысль, что что-то там отломано... https://academ.club/html/emoticons/biggrin.gif

Присоединяйтесь к обсуждению

Вы можете написать сейчас и зарегистрироваться позже. Если у вас есть аккаунт, авторизуйтесь, чтобы опубликовать от имени своего аккаунта.

Гость
Ответить в этой теме...

Аккаунт

Навигация

Поиск

Поиск

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.