Strannaya oshibka
Форум — Development
Est' odna programma, inogda ona zapuskaetsya s oshibkoi segmentirovaniya, inogda - net.
Pri zapuske s gdb vsegda zapuskaetsya bez oshibok. Kak byt'?
Est' odna programma, inogda ona zapuskaetsya s oshibkoi segmentirovaniya, inogda - net.
Pri zapuske s gdb vsegda zapuskaetsya bez oshibok. Kak byt'?
Tut takoi vopros. Ya sobirayu 2 faila http://pastebin.com/vN6SYpdj
i tut oshibka:
In file included from test.cpp:36:0:
Ordered2DSet.cpp: In copy constructor «Ordered2DSet::Ordered2DSet(const Ordered2DSet&)»:
Ordered2DSet.cpp:543:3: ошибка: некорректное использование «Btree<Point, Point>::Btree»
http://pastebin.ubuntu.com/772656/
http://pastebin.ubuntu.com/772659/
http://pastebin.ubuntu.com/772661/
http://pastebin.ubuntu.com/772664/
Ошибку выдает
g++ -c test.cpp
g++ -c Btree.cpp
g++ test.o Btree.o
test.o: In function `main':
test.cpp:(.text+0x15b): undefined reference to `Btree<Point, Point>::Btree()'
test.cpp:(.text+0x1a7): undefined reference to `Btree<Point, Point>::Search(Point)'
test.cpp:(.text+0x1da): undefined reference to `Btree<Point, Point>::Add(Point, Point)'
test.cpp:(.text+0x275): undefined reference to `Btree<Point, Point>::Add(Point, Point)'
test.cpp:(.text+0x2c5): undefined reference to `Btree<Point, Point>::Search(Point)'
test.cpp:(.text+0x2ed): undefined reference to `Btree<Point, Point>::Amount_key() const'
test.cpp:(.text+0x312): undefined reference to `Btree<Point, Point>::Clear()'
test.cpp:(.text+0x362): undefined reference to `Btree<Point, Point>::Delete(Point)'
test.cpp:(.text+0x373): undefined reference to `Btree<Point, Point>::~Btree()'
test.cpp:(.text+0x388): undefined reference to `Btree<Point, Point>::~Btree()'
collect2: выполнение ld завершилось с кодом возврата 1
make: *** [a.out] Ошибка 1
Пожалуйста помогите! Ошибка - при компиляции - http://pastebin.ubuntu.com/772579/
In function `main':
test.cpp:(.text+0xad): undefined reference to `std::cout'
test.cpp:(.text+0xb2): undefined reference to `std::basic_ostream<char, std::char_traits<char> >::operator<<(int)'
/tmp/ccWn3jvE.o: In function `__static_initialization_and_destruction_0(int, int)':
test.cpp:(.text+0xda): undefined reference to `std::ios_base::Init::Init()'
test.cpp:(.text+0xdf): undefined reference to `std::ios_base::Init::~Init()'
collect2: выполнение ld завершилось с кодом возврата 1