【问题标题】:How to install TBB on Windows and get it work with Eclipse如何在 Windows 上安装 TBB 并使其与 Eclipse 一起工作
【发布时间】:2017-08-01 11:53:04
【问题描述】:

我想在 Windows 上安装 Intel 的 Thread Building Blocks 并让它与 Eclipse IDE 和 C++ 一起工作。我是整个 C 语言的新手,从源代码构建、make、cmake、cygwin 和其他东西。

到目前为止我已经尝试过:

  • 加载 TBB 包和源代码并尝试将其包含在 Eclipse 中
  • 尝试从源代码“制作”TBB,但仅从 GNUWin32make 得到错误 2
  • 尝试了许多教程、技巧以及更多我不记得的内容

我该怎么做?

Win 10 - 64bit,Eclipse Oxygen 4.7.0,cygwin 2.8.2,编译器:mingw

【问题讨论】:

    标签: c++ windows eclipse intel tbb


    【解决方案1】:

    正如您在Release_Notes.txt 中看到的,库不支持 Cygwin。但是您有几种情况:

    1. 使用 Visual Studio 和二进制包
    2. 使用 Linux(如果您确实需要 GCC)
    3. 在没有 (!) Cygwin (difference) 的情况下使用 Mingw。在这种情况下,从源代码构建库应该可以完美运行。
    4. 将库移植到 cygwin(这是一个重要但真正的解决方案)

    【讨论】:

    • 您好,感谢您的回答。我尝试使用 Mingw 进行构建,但仍然出现错误。我在我的路径变量中得到了 Mingw,并在 tbb 的源文件夹中尝试了 make 命令。使用找不到“./build/detect.js”的错误退出。但是文件在那里。
    • 尝试cd srcmake tbb tbbmalloc compiler=gcc stdver=c++11 如果不起作用 - 提供输出
    • 您好,我试过了,但遇到了同样的错误。 C:\Users\Leon\Documents\tbb\src>make tbb tbbmalloc compiler=gccstdver=c++11 The command "\"cscript /nologo /E:jscript ../build/detect.js /arch gccstdver=c++11\""" is spelled wrong or could not be find. The command "\"cscript /nologo /E:jscript ../build/detect.js /runtime gccstdver=c++11\""" is spelled wrong or could not be find. ../build/common.inc:73: *** Architecture not detected. Stop. 我应该尝试删除所有编译器、cygwin 和所有其他东西并重新安装吗?如果我做对了,我只需要 Mingw?
    • 1.你在gccstdver之间失去了空间2.尝试执行where g++g++ -v
    【解决方案2】:

    在这里复制丢失了空间。

    在哪里g++

    C:\Program Files\mingw-w64\x86_64-7.1.0-posix-seh-rt_v5-rev0\mingw64\bin\g++.exe C:\MinGW\bin\g++.exe

    g++ -v 使用内置规范。 COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=C:/程序\ 文件/mingw-w64/x86_64-7.1.0-posix-seh-rt_v5-rev0/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/7.1.0/lto-wrapper.exe 目标:x86_64-w64-mingw32 配置: ../../../src/gcc-7.1.0/configure --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --prefix=/mingw64 --with-sysroot=/c/mingw710/x86_64-710-posix-seh-rt_v5-rev0/mingw64 --启用共享 --enable-static --disable-multilib --enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes --enable-threads=posix --enable-libgomp --enable -libatomic --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --enable-libstdcxx-filesystem-ts=yes --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with- gnu-as --with-gnu-ld --with-arch=nocona --with-tune=core2 --with-libiconv --with-system-zlib --with-gmp=/c/mingw710/prerequisites/x86_64 -w64-mingw32-static --with-mpfr=/c/mingw710/prerequisites/x86_64-w64-mingw32-static --with-mpc=/c/mingw710/prerequisites/x86_64-w64-mingw32-static --with- isl=/c/mingw710/prerequisites/x86_64-w64-mingw32-static --with-pkg version='x86_64-posix-seh-rev0,由 MinGW-W64 项目构建'--with-bugurl=http://sourceforge.net/projects/mingw-w64 CFLAGS='-O2 -pipe -fno-ident -I/c/mingw710/x86_64-710-posix -seh-rt_v5-rev0/mingw64/opt/include -I/c/mingw710/prerequisites/x86_64-zlib-static/include -I/c/mingw710/prerequisites/x86_64-w64-mingw32-static/include'CXXFLAGS=' -O2 -管道 -fno-ident -I/c/mingw710/x86_64-710-posix-seh-rt_v5-rev0/mingw64/opt/include -I/c/mingw710/prerequisites/x86_64-zlib-static/include -I/c/mingw710/prerequisites/x86_64 -w64-mingw32-静态/包括'CPPFLAGS=' -I/c/mingw710/x86_64-710-posix-seh-rt_v5-rev0/mingw64/opt/include -I/c/mingw710/prerequisites/x86_64-zlib-static/include -I/c/mingw710/prerequisites/x86_64 -w64-mingw32-static/include' LDFLAGS='-pipe -fno-ident -L/c/mingw710/x86_64-710-posix-seh-rt_v5-rev0/mingw64/opt/lib -L/c/mingw710/prerequisites/x86_64-zlib-static/lib -L/c/mingw710/prerequisites/x86_64 -w64-mingw32-static/lib ' 线程模型:posix gcc 版本 7.1.0 (x86_64-posix-seh-rev0, 由 MinGW-W64 项目)

    【讨论】:

    • 奇怪,我在我的电脑上检查了相同的版本,它可以工作;主要区别是:我将编译器“靠近”驱动器根目录以防止空格和长路径(环境变量有一些限制)。我想您应该在使用前直接检查您的环境(清理它)和源编译器,例如:set PATH=C\bin\mingw-w64\bin;%PATH% 还要检查您尝试使用的 TBB 版本
    猜你喜欢
    • 2012-05-30
    • 1970-01-01
    • 2012-05-19
    • 2012-12-29
    • 2015-11-27
    • 1970-01-01
    • 1970-01-01
    • 2022-12-06
    • 2020-03-15
    相关资源
    最近更新 更多