2

I want to install Intel's Thread Building Blocks on Windows and get it to work with the Eclipse IDE and C++. I've been new to the whole C, build from source, make, cmake, cygwin and other stuff.

What I've tried so far:

  • Load the TBB packages and source and try to include it in Eclipse
  • Try to 'make' TBB from source but only got Error 2 from GNUWin32make
  • Tried many tutorials, tips and much more that I don't remember any more

How can I do this?

Win 10 - 64bit, Eclipse Oxygen 4.7.0, cygwin 2.8.2, Compiler: mingw

halfer
  • 18,701
  • 13
  • 79
  • 158
Leon Braun
  • 168
  • 8

2 Answers2

3

As you can see in Release_Notes.txt, a library doesn't have a Cygwin support. However you have several cases:

  1. Use Visual Studio and binary package
  2. Use Linux (if you really need GCC)
  3. Use Mingw without(!) Cygwin (difference). Building library from source code should work perfect in this case.
  4. Port library to cygwin (it's a non-trivial but real solution)
ntfs.hard
  • 323
  • 1
  • 3
  • 14
  • Hi, thanks for your answer. I tried to build with Mingw but still got errors. I got Mingw in my path variable and try the make command in the source folder of tbb. Make quits with the errors that it can't find "./build/detect.js". But the file is there. – Leon Braun Aug 02 '17 at 10:18
  • Try to `cd src` and `make tbb tbbmalloc compiler=gcc stdver=c++11` If it doesn't work -- provide an output – ntfs.hard Aug 02 '17 at 13:08
  • Hi, I've tried but got the same error. `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.` Should I try to delete all compilers, cygwin and all the other stuff and reinstall it? If I get it right I onle need Mingw? – Leon Braun Aug 03 '17 at 11:28
  • 1. You lose space between `gcc` and `stdver` 2. Try to execute `where g++` and `g++ -v` – ntfs.hard Aug 03 '17 at 14:19
0

lost the space by copiying here.

where 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 Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=C:/Program\ Files/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 Target: x86_64-w64-mingw32 Configured with: ../../../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-shared --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-pkgversion='x86_64-posix-seh-rev0, Built by MinGW-W64 project' --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 -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' 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 ' Thread model: posix gcc version 7.1.0 (x86_64-posix-seh-rev0, Built by MinGW-W64 project)

Leon Braun
  • 168
  • 8
  • Weird, I checked same version on my PC and it works; The main difference is: I keep compilers "near" the drive root to prevent spaces and long paths (env. variables has some limits). I guess you should check your environment(clean-up it) and source compiler directly e.g: `set PATH=C\bin\mingw-w64\bin;%PATH%` before use Also check what version of TBB do you try to use – ntfs.hard Aug 04 '17 at 14:03