SHARE
TWEET

Untitled

a guest Feb 22nd, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # CMakeLists.txt
  2. cmake_minimum_required(VERSION 2.8)
  3. add_executable(test test.cxx)
  4. add_definitions(-std=c++0x -stdlib=libc++)
  5.    
  6. #include <iostream>
  7.  
  8. int main()
  9. {
  10.   std::cout << "Howdy" << std::endl;
  11.   return 0;
  12. }
  13.    
  14. Linking CXX executable test
  15. Undefined symbols for architecture x86_64:
  16.   "std::__1::locale::use_facet(std::__1::locale::id&) const", referenced from:
  17.       std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::endl<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) in test.cxx.o
  18.   "std::__1::ios_base::getloc() const", referenced from:
  19.       std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::endl<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) in test.cxx.o
  20.   "std::__1::basic_ostream<char, std::__1::char_traits<char> >::put(char)", referenced from:
  21.       std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::endl<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) in test.cxx.o
  22.   "std::__1::basic_ostream<char, std::__1::char_traits<char> >::flush()", referenced from:
  23.       std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::endl<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) in test.cxx.o
  24.   "std::__1::basic_ostream<char, std::__1::char_traits<char> >::sentry::sentry(std::__1::basic_ostream<char, std::__1::char_traits<char> >&)", referenced from:
  25.       std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<<<std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*) in test.cxx.o
  26.   "std::__1::basic_ostream<char, std::__1::char_traits<char> >::sentry::~sentry()", referenced from:
  27.       std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<<<std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*) in test.cxx.o
  28.   "std::__1::cout", referenced from:
  29.       _main in test.cxx.o
  30.   "std::__1::ctype<char>::id", referenced from:
  31.       std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::endl<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) in test.cxx.o
  32.   "std::__1::locale::~locale()", referenced from:
  33.       std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::endl<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) in test.cxx.o
  34.   "std::__1::ios_base::__set_badbit_and_consider_rethrow()", referenced from:
  35.       std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<<<std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*) in test.cxx.o
  36.   "std::__1::ios_base::clear(unsigned int)", referenced from:
  37.       std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<<<std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*) in test.cxx.o
  38. ld: symbol(s) not found for architecture x86_64
  39. clang: error: linker command failed with exit code 1 (use -v to see invocation)
  40. make[2]: *** [test] Error 1
  41. make[1]: *** [CMakeFiles/test.dir/all] Error 2
  42. make: *** [all] Error 2
  43.    
  44. clang++ -std=c++0x -stdlib=libc++ test.cxx
  45.    
  46. /usr/bin/c++    -std=c++0x -stdlib=libc++ -o CMakeFiles/test.dir/test.cxx.o -c /Users/luis/test.cxx
  47.    
  48. /usr/bin/c++    -Wl,-search_paths_first -Wl,-headerpad_max_install_names   CMakeFiles/test.dir/test.cxx.o  -o test
  49.    
  50. cmake_minimum_required(VERSION 2.8)
  51. set (CMAKE_CXX_FLAGS "-std=c++0x -stdlib=libc++ -g3 -Wall -O0")
  52. add_executable(test test.cxx)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top