Hi all,
I encounter a problem when compiling in Ubuntu a c++ code wrote
originally also in linux environment. It seems to be the problem of
standard template library but I totally don't know how to handle it.
Could anybody help me out?
Below please see the error message:
.......
block.cpp:(.gnu.linkonce.t._ZN6lembsk5FieldISt6vec torINS_5PointESaIS2_EEE7setsizeEiiii+0x5ca):
undefined reference to `std::__default_alloc_template<true,
0>::_S_free_list'
block.cpp:(.gnu.linkonce.t._ZN6lembsk5FieldISt6vec torINS_5PointESaIS2_EEE7setsizeEiiii+0x5d8):
undefined reference to `std::__default_alloc_template<true,
0>::_S_node_allocator_lock'
block.cpp:(.gnu.linkonce.t._ZN6lembsk5FieldISt6vec torINS_5PointESaIS2_EEE7setsizeEiiii+0x5ea):
undefined reference to `std::__default_alloc_template<true,
0>::_S_node_allocator_lock'
.../../lembsk/liblembsk.a(block.o): In function `void
std::_Construct<std::vector<double, std::allocator<double,
std::vector<double, std::allocator<double >(std::vector<double,
std::allocator<double*, std::vector<double, std::allocator<double
const&)':
block.cpp:(.gnu.linkonce.t._ZSt10_ConstructISt6vec torIdSaIdEES2_EvPT_RKT0_+0x40):
undefined reference to `std::__default_alloc_template<true,
0>::allocate(unsigned int)'
collect2: ld returned 1 exit status
make[2]: *** [lembsk] Error 1
make[2]: Leaving directory
`/home/vito/_research_stanford/code/lembsk/Optimized/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/home/vito/_research_stanford/code/lembsk/Optimized'
make: *** [all] Error 2
Thanks so much!
Vito 3 5887 we********@gmail.com napsal:
Hi all,
I encounter a problem when compiling in Ubuntu a c++ code wrote
originally also in linux environment. It seems to be the problem of
standard template library but I totally don't know how to handle it.
Could anybody help me out?
Below please see the error message:
......
block.cpp:(.gnu.linkonce.t._ZN6lembsk5FieldISt6vec torINS_5PointESaIS2_EEE7setsizeEiiii+0x5ca):
undefined reference to `std::__default_alloc_template<true,
0>::_S_free_list'
block.cpp:(.gnu.linkonce.t._ZN6lembsk5FieldISt6vec torINS_5PointESaIS2_EEE7setsizeEiiii+0x5d8):
undefined reference to `std::__default_alloc_template<true,
0>::_S_node_allocator_lock'
block.cpp:(.gnu.linkonce.t._ZN6lembsk5FieldISt6vec torINS_5PointESaIS2_EEE7setsizeEiiii+0x5ea):
undefined reference to `std::__default_alloc_template<true,
0>::_S_node_allocator_lock'
../../lembsk/liblembsk.a(block.o): In function `void
std::_Construct<std::vector<double, std::allocator<double,
std::vector<double, std::allocator<double >(std::vector<double,
std::allocator<double*, std::vector<double, std::allocator<double
const&)':
block.cpp:(.gnu.linkonce.t._ZSt10_ConstructISt6vec torIdSaIdEES2_EvPT_RKT0_+0x40):
undefined reference to `std::__default_alloc_template<true,
0>::allocate(unsigned int)'
collect2: ld returned 1 exit status
make[2]: *** [lembsk] Error 1
make[2]: Leaving directory
`/home/vito/_research_stanford/code/lembsk/Optimized/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/home/vito/_research_stanford/code/lembsk/Optimized'
make: *** [all] Error 2
Thanks so much!
Vito
Hi. Are you linking with g++ or with gcc? C++ code should be compiled
and linked with g++, because it automaticaly adds to linker standard
C++ library (in default behaviour). we********@gmail.com wrote:
Hi all,
I encounter a problem when compiling in Ubuntu a c++ code wrote
originally also in linux environment. It seems to be the problem of
standard template library but I totally don't know how to handle it.
Could anybody help me out?
Below please see the error message:
......
block.cpp:(.gnu.linkonce.t._ZN6lembsk5FieldISt6vec torINS_5PointESaIS2_EEE7setsizeEiiii+0x5ca):
undefined reference to `std::__default_alloc_template<true,
0>::_S_free_list'
block.cpp:(.gnu.linkonce.t._ZN6lembsk5FieldISt6vec torINS_5PointESaIS2_EEE7setsizeEiiii+0x5d8):
undefined reference to `std::__default_alloc_template<true,
0>::_S_node_allocator_lock'
block.cpp:(.gnu.linkonce.t._ZN6lembsk5FieldISt6vec torINS_5PointESaIS2_EEE7setsizeEiiii+0x5ea):
undefined reference to `std::__default_alloc_template<true,
0>::_S_node_allocator_lock'
../../lembsk/liblembsk.a(block.o): In function `void
std::_Construct<std::vector<double, std::allocator<double,
std::vector<double, std::allocator<double >(std::vector<double,
std::allocator<double*, std::vector<double, std::allocator<double
const&)':
block.cpp:(.gnu.linkonce.t._ZSt10_ConstructISt6vec torIdSaIdEES2_EvPT_RKT0_+0x40):
undefined reference to `std::__default_alloc_template<true,
0>::allocate(unsigned int)'
collect2: ld returned 1 exit status
make[2]: *** [lembsk] Error 1
make[2]: Leaving directory
`/home/vito/_research_stanford/code/lembsk/Optimized/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/home/vito/_research_stanford/code/lembsk/Optimized'
make: *** [all] Error 2
Thanks so much!
What does "g++ --version" say?
- J.
I linked with g++.
Ondra Holub wrote:
we********@gmail.com napsal:
Hi all,
I encounter a problem when compiling in Ubuntu a c++ code wrote
originally also in linux environment. It seems to be the problem of
standard template library but I totally don't know how to handle it.
Could anybody help me out?
Below please see the error message:
......
block.cpp:(.gnu.linkonce.t._ZN6lembsk5FieldISt6vec torINS_5PointESaIS2_EEE7setsizeEiiii+0x5ca):
undefined reference to `std::__default_alloc_template<true,
0>::_S_free_list'
block.cpp:(.gnu.linkonce.t._ZN6lembsk5FieldISt6vec torINS_5PointESaIS2_EEE7setsizeEiiii+0x5d8):
undefined reference to `std::__default_alloc_template<true,
0>::_S_node_allocator_lock'
block.cpp:(.gnu.linkonce.t._ZN6lembsk5FieldISt6vec torINS_5PointESaIS2_EEE7setsizeEiiii+0x5ea):
undefined reference to `std::__default_alloc_template<true,
0>::_S_node_allocator_lock'
../../lembsk/liblembsk.a(block.o): In function `void
std::_Construct<std::vector<double, std::allocator<double,
std::vector<double, std::allocator<double >(std::vector<double,
std::allocator<double*, std::vector<double, std::allocator<double
const&)':
block.cpp:(.gnu.linkonce.t._ZSt10_ConstructISt6vec torIdSaIdEES2_EvPT_RKT0_+0x40):
undefined reference to `std::__default_alloc_template<true,
0>::allocate(unsigned int)'
collect2: ld returned 1 exit status
make[2]: *** [lembsk] Error 1
make[2]: Leaving directory
`/home/vito/_research_stanford/code/lembsk/Optimized/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/home/vito/_research_stanford/code/lembsk/Optimized'
make: *** [all] Error 2
Thanks so much!
Vito
Hi. Are you linking with g++ or with gcc? C++ code should be compiled
and linked with g++, because it automaticaly adds to linker standard
C++ library (in default behaviour).
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Nikola Milutinovic |
last post by:
Hi all.
I'm not subscribed to the list, so all replies to me mail directly.
I ran into a small problem, for which we have found a workaround. I was compiling PostgreSQL v7.4.1 and it's...
|
by: Martin Bless |
last post by:
I need to access a MSSQL database (MS-Sql, not MySQL!)and would very
much like to use mssql-0.09.tar.gz which is available from
http://www.object-craft.com.au/projects/mssql/download.html
...
|
by: Arturo DiDonna |
last post by:
Hello everyone. I am trying to compile someone else code and I am
stuck with compilation problems using
the g++ 3.3 compiler. Basically, when compiling the following code, I
get this error...
|
by: modemer |
last post by:
Hello,
I got weird compiling message similar like following when I compiled my
simple code on Sun 5.8 with CC WorkShop 6 update 2 C++ 5.3.
CC -g -o myclass.o -c myclass.cpp
CC -g -o main.o...
|
by: David W. Fenton |
last post by:
Today I was working on a hideous old app that I created a long time
ago that does a lot of showing/hiding/resizing of fields on one of
the forms. I had used constants to store reference values for...
|
by: Dmitri Shvetsov |
last post by:
Hi All,
Did somebody have a problem compiling some solution in VS2003? I get the
error every time that some files are locked and are using by another
process. I repeat compiling again and again...
|
by: Aaron Queenan |
last post by:
When I build a C++ library to .NET using the managed C++ compiler, I get the
following error message:
Linking...
LINK : error LNK2020: unresolved token (0A000005) _CrtDbgReport
LINK : error...
|
by: Rudy Ray Moore |
last post by:
Hi guys,
I just upgraded to "Visual Studio .net 2003 7.1 c++" from VS6.
Some things I like (proper for loop variable scoping, for example), but some
other things are troubling me.
One...
|
by: erkidevries |
last post by:
Problem compiling Tkinter program with bmp images (using py2exe)
I have a Tkinter gui program that uses bmp as backgrounds.
The program itself works when I run from the source.
I placed the...
|
by: WebSnozz |
last post by:
I have an application written in C that does a lot of low level stuff.
It does a lot of things like casting from void*'s. I want to create a
new GUI for it in either C# or MC++, but reuse the...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
| |