Guest User

Untitled

a guest
Jul 10th, 2022
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 3.88 KB | None | 0 0
  1. /*
  2. minimal example path.cpp
  3. */
  4.  
  5. #include <iostream>
  6. #include <filesystem>
  7. namespace fs = std::filesystem;
  8. int main()
  9. {
  10.     std::cout << "Current path is " << fs::current_path() << '\n';      
  11. }
  12.  
  13. /*
  14. compield with clang14++ -std=c++20 path.cpp
  15. results in:
  16. clang version 14.0.6 (https://github.com/tru/llvm-release-build 686807a176470032c208f27da2cc31b1c10777c6)
  17. Target: x86_64-apple-darwin17.7.0
  18. Thread model: posix
  19. InstalledDir: /Users/alia/.local/clang_llvm_apple/bin
  20.  "/Users/alia/.local/clang_llvm_apple/bin/clang-14" -cc1 -triple x86_64-apple-macosx10.13.0 -Wundef-prefix=TARGET_OS_ -Werror=undef-prefix -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -emit-obj -mrelax-all --mrelax-relocations -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name path.cpp -mrelocation-model pic -pic-level 2 -mframe-pointer=all -ffp-contract=on -fno-rounding-math -funwind-tables=2 -faligned-alloc-unavailable -fcompatibility-qualified-id-block-type-checking -fvisibility-inlines-hidden-static-local-var -target-cpu penryn -tune-cpu generic -mllvm -treat-scalable-fixed-error-as-warning -debug-info-kind=standalone -dwarf-version=4 -debugger-tuning=lldb -target-linker-version 14.0.6 -v -fcoverage-compilation-dir=/Users/alia/.tmp -resource-dir /Users/alia/.local/clang_llvm_apple/lib/clang/14.0.6 -stdlib=libc++ -internal-isystem /Users/alia/.local/clang_llvm_apple/bin/../include/c++/v1 -internal-isystem /usr/local/include -internal-isystem /Users/alia/.local/clang_llvm_apple/lib/clang/14.0.6/include -internal-externc-isystem /usr/include -O0 -Wall -Wextra -Wconversion -Wshadow -pedantic -std=c++20 -fdeprecated-macro -fdebug-compilation-dir=/Users/alia/.tmp -ferror-limit 19 -fsanitize=address,alignment,array-bounds,bool,builtin,enum,float-cast-overflow,function,integer-divide-by-zero,nonnull-attribute,null,pointer-overflow,return,returns-nonnull-attribute,shift-base,shift-exponent,signed-integer-overflow,unreachable,vla-bound,vptr -fsanitize-recover=alignment,array-bounds,bool,builtin,enum,float-cast-overflow,function,integer-divide-by-zero,nonnull-attribute,null,pointer-overflow,returns-nonnull-attribute,shift-base,shift-exponent,signed-integer-overflow,vla-bound,vptr -fsanitize-system-ignorelist=/Users/alia/.local/clang_llvm_apple/lib/clang/14.0.6/share/asan_ignorelist.txt -fsanitize-address-use-after-scope -fsanitize-address-globals-dead-stripping -fno-assume-sane-operator-new -stack-protector 1 -fblocks -fencode-extended-block-signature -fregister-global-dtors-with-atexit -fgnuc-version=4.2.1 -fno-implicit-modules -fcxx-exceptions -fexceptions -fmax-type-align=16 -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /var/folders/_z/1q84ymcj36dgx7d2z7ybs6h40000gn/T/path-e3571d.o -x c++ path.cpp
  21. clang -cc1 version 14.0.6 based upon LLVM 14.0.6 default target x86_64-apple-darwin17.7.0
  22. #include "..." search starts here:
  23. #include <...> search starts here:
  24.  /Users/alia/.local/clang_llvm_apple/bin/../include/c++/v1
  25.  /usr/local/include
  26.  /Users/alia/.local/clang_llvm_apple/lib/clang/14.0.6/include
  27.  /usr/include
  28.  /System/Library/Frameworks (framework directory)
  29.  /Library/Frameworks (framework directory)
  30. End of search list.
  31.  "/Users/alia/.local/clang_llvm_apple/bin/ld64.lld" -demangle -dynamic -arch x86_64 -platform_version macos 10.13.0 10.13.0 -o a.out /var/folders/_z/1q84ymcj36dgx7d2z7ybs6h40000gn/T/path-e3571d.o -lc++ /Users/alia/.local/clang_llvm_apple/lib/clang/14.0.6/lib/darwin/libclang_rt.asan_osx_dynamic.dylib -rpath @executable_path -rpath /Users/alia/.local/clang_llvm_apple/lib/clang/14.0.6/lib/darwin -lSystem /Users/alia/.local/clang_llvm_apple/lib/clang/14.0.6/lib/darwin/libclang_rt.osx.a
  32. ld64.lld: error: undefined symbol: std::__1::__fs::filesystem::__current_path(std::__1::error_code*)
  33. >>> referenced by /var/folders/_z/1q84ymcj36dgx7d2z7ybs6h40000gn/T/path-e3571d.o
  34. clang-14: error: linker command failed with exit code 1 (use -v to see invocation)
  35. */
Advertisement
Add Comment
Please, Sign In to add comment