Created
April 7, 2013 00:40
-
-
Save ariscop/5328317 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[andrew@andrews-laptop tmp]$ cat test.cpp | |
#include <string> | |
using namespace std; | |
int main(int argc, char *argv[]) { | |
string *str = new string("test"); | |
} | |
[andrew@andrews-laptop tmp]$ g++ -nostdlib test.cpp | |
/usr/bin/ld: warning: cannot find entry symbol _start; defaulting to 0000000000400144 | |
/tmp/ccueTy8M.o: In function `main': | |
test.cpp:(.text+0x1a): undefined reference to `std::allocator<char>::allocator()' | |
test.cpp:(.text+0x28): undefined reference to `operator new(unsigned long)' | |
test.cpp:(.text+0x3b): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)' | |
test.cpp:(.text+0x4b): undefined reference to `std::allocator<char>::~allocator()' | |
test.cpp:(.text+0x5d): undefined reference to `operator delete(void*)' | |
test.cpp:(.text+0x71): undefined reference to `std::allocator<char>::~allocator()' | |
test.cpp:(.text+0x7c): undefined reference to `_Unwind_Resume' | |
/tmp/ccueTy8M.o:(.eh_frame+0x13): undefined reference to `__gxx_personality_v0' | |
collect2: error: ld returned 1 exit status | |
[andrew@andrews-laptop tmp]$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment