- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个使用 SFML 的 CMake 项目,它运行良好,但在更新到 Xcode 10 之后,找不到 CMake 寻找的所有编译器文件。
clang:警告:libstdc++ 已弃用;移动到 libc++
我不确定如何移动到不同的库源。
我尝试使用 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=libc++")
来使用标志。
它还告诉我:检查工作的 CXX 编译器:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- broken
。我可以在终端中正常运行 g++/c++
命令。我假设他们正在同一个地方寻找。
我正在尝试编译的 CMake 文件。它是 SFML 之一: SFML CMake
完整错误信息:
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- broken
CMake Error at /Applications/CMake.app/Contents/share/cmake-3.7/Modules/CMakeTestCXXCompiler.cmake:44 (message):
The C++ compiler
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /Users/DSchana/Documents/Libraries/SFML/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_af3d5/fast"
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f
CMakeFiles/cmTC_af3d5.dir/build.make CMakeFiles/cmTC_af3d5.dir/build
Building CXX object CMakeFiles/cmTC_af3d5.dir/testCXXCompiler.cxx.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-arch x86_64 -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.07.sdk
-mmacosx-version-min=10.7 -o
CMakeFiles/cmTC_af3d5.dir/testCXXCompiler.cxx.o -c
/Users/DSchana/Documents/Libraries/SFML/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
warning: include path for stdlibc++ headers not found; pass '-std=libc++'
on the command line to use the libc++ standard library instead
[-Wstdlibcxx-not-found]
1 warning generated.
Linking CXX executable cmTC_af3d5
/Applications/CMake.app/Contents/bin/cmake -E cmake_link_script
CMakeFiles/cmTC_af3d5.dir/link.txt --verbose=1
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-arch x86_64 -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.07.sdk
-mmacosx-version-min=10.7 -Wl,-search_paths_first
-Wl,-headerpad_max_install_names
CMakeFiles/cmTC_af3d5.dir/testCXXCompiler.cxx.o -o cmTC_af3d5
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum
deployment target of OS X 10.9 [-Wdeprecated]
ld: library not found for -lstdc++
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
make[1]: *** [cmTC_af3d5] Error 1
make: *** [cmTC_af3d5/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:47 (project)
-- Configuring incomplete, errors occurred!
最佳答案
好的。结果我只需要将 set(CMAKE_CXX_FLAGS "-stdlib=libc++")
添加到我的 CMakeLists.txt
关于c++ - Xcode 10 更新后 CMake 找不到 stdc++11,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52502852/
程序: #include #include int main() { std::stringstream ss; ss , std::allocator >::_M_sync(st
为什么我会遇到这些链接错误? 这是一个简短的链接错误示例,有数百个类似的错误: /tmp/main-NtNkRQ.o: In function __cxx_global_var_init': /hom
本机环境:win10系统 64位 vs2017 最近码代码时偶然发现了bits/stdc++.h这个头文件(万能头文件),基本上所有的代码只要用了这个头文件就不再写其他头文件了。 看到它就仿佛开
我有一个用 C++ 编写的库,但没有使用 stdc++ 库,因为它在某些平台上不可用。 但是,我的 libsmartrest.la 中仍然有 stdc++ 库依赖项,这使得依赖于该库的所有库都无法链接
我正在开发一个大约有 50 个依赖项的 iOS 项目。几乎所有这些都是用 cocoapods 管理的。有些是开源代码,有些是动态框架,有些是静态框架。 在这个项目中,我想利用 iOS 12 的新 AP
我有一个要在 Linux 下构建的 C++ 应用程序,它需要链接到第三方共享库,但是这个库是用最新版本的 GCC/glibc (4.8.3/2.18) 构建的).当我尝试使用较新版本的 GCC/gli
我正在使用 Ubuntu 并尝试使用 synaptic 来安装其中包含“GLUT”一词的所有内容以及 SDL 和 opengl 。但仍然是一个简单的程序无法编译。它显示了这个: opengl1.cpp
我用我的代码发布了一个问题,其唯一的#include指令如下: #include 我的老师告诉我要这样做,但是在评论部分,我被告知我不应该这样做。 为什么? 最佳答案 在Stack Overflow
这个问题在这里已经有了答案: Why should I not #include ? (9 个回答) 关闭 6 年前。 我在 C++ 上创建了一个基本的井字游戏,我在不包含 bits/stdc++
是否可以在 Linux 上将我的程序与 libpthreads 和 libstdc++ 静态链接? 最佳答案 是的,按照正常情况使用 -static。 关于linux - 与 pthreads 和 s
这个问题在这里已经有了答案: Why should I not #include ? (9 个回答) 关闭 4 年前。 #include #include #include //#includ
当我尝试编译我的项目时,我遇到了这个错误: g++ -c -pipe -std=c++11 -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORT
我试图在我的 C++ 代码中包含头文件 bits/stdc++,但编译器似乎不支持它。有什么办法让它工作吗? 我使用 OS X Yosemite 10.10.2 和 Xcode 6.1.1。 最佳答案
我用我的代码发布了一个问题,其唯一的 #include 指令如下: #include 我的老师告诉我这样做,但在评论部分我被告知我不应该这样做。 为什么? 最佳答案 包括在 Stack Overfl
我有动态链接 stdc++ 的库。我想用新文件创建新的共享库,链接它们并静态链接 libstdc++。 我试图将 -static-libstdc++ 添加到编译中,但它不起作用。我检查了 ldd,我的
我在配置 iOS 项目时遇到困难,该项目使用链接到 gcc 使用的旧 libstdc++ 的静态库。该库是 32 位和 64 位的。 有 6 个库(例如 libssl.a)是 32 位的,必须更新。如
我在这里试过: http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/index.html 我找到了 new.h,但没有找到实现它的代码。 谢谢
我有一个使用 SFML 的 CMake 项目,它运行良好,但在更新到 Xcode 10 之后,找不到 CMake 寻找的所有编译器文件。 clang:警告:libstdc++ 已弃用;移动到 libc
每当使用 arm-none-eabi(-g++、-gcc 和 -c++ 构建 C++ 源代码时code>) 包含一个 stdlib header ,gcc 表示找不到该文件: 测试.cpp: #inc
我正在尝试向需要使用 C++ 库的大型 C 项目添加一些代码。 C++ 库使用标记为 extern "C"的函数提供了一个包装器,该函数提供对库功能的访问 //Some C++ library //m
我是一名优秀的程序员,十分优秀!