Running TBB code on windows 7 using code blocks - c++

i have installed TBB setup for windows 7 and want to execute code in it.i don't have visual studio setup and i have code blocks IDE. i want to execute my TBB code in it.Pls Help to configure Code Blocks.
I have done Linker settings i.e i have included libraries from this path
C:\Program Files\Intel\Composer XE 2013\tbb\lib\ia32\
and i have set search directory to
C:\Program Files\Intel\Composer XE 2013\tbb\include\tbb
still also when i compile it gives error tbb/task_scheduler_init.h :No such file or directory.
Can anyone pls suggest how to run TBB code in windows??

I have set the search directory to
C:\Program Files\Intel\Composer XE 2013\tbb\include\tbb
Pretty clear from the error message and the location of the file you gave that you should have set the search directory to
C:\Program Files\Intel\Composer XE 2013\tbb\include

Related

Having trouble with setting up C++ in Visual Studio

I'm getting a common error on the issue that I'm having but nothing has worked:
1>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.31326\include\yvals.h(12,10): fatal error C1083: Cannot open include file: 'crtdbg.h': No such file or directory
I've been told to download the C++ dev kit again, the Windows SDK again, Reset my PC after download and manually change the path inside the file that can't find it.
As it turns out the file exists (and the Windows SDK too, I assume), Visual studio is just looking for it in the wrong spot, So I figure this is a setup issue. It exists in this location C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt. You could say why not just manually link to it? I have but then another file can't be found, so I change that and then another one can't be found and so on. I'd appreciate the help as this is the reason I get scared to use Visual Studio and go back running to Code, thank you!
Does this issue also occur if I create an empty C++ project and build it? If it works fine, this issue is more relevant to your current project.
Please check the target platform version of your project. Right click the project name and select ‘Properties’—‘Configuration Properties’—‘General’— ‘Windows SDK Version’ like the following, and select the Windows 10 SDK to have a try.
You could also refer to the method in this issue.
(PS:You need to make sure that the SDK you install is consistent with the operating system, for example if you use Win 11 then you should install the Windows 11 SDK.)

qt creator 5.10 failed to retrieve msvc environment error

i just installed qt creator 5.10 and i opened a simple widget application this is the error that i get even without running the application
:-1: error: Failed to retrieve MSVC Environment from "D:\pograml files\visual studio2\VC\Auxiliary\Build\vcvarsall.bat":
'chcp' is not recognized as an internal or external command,
operable program or batch file.
'wmic' is not recognized as an internal or external command,
operable program or batch file.
i haven't found any solutions for this, if anyone could help me i would be very thankful
When Qt starts, I used to get a list of 10 errors related to MSVC kit because each detected MSVC platform compiler has an Initialization script for setting environment. like:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat x86_amd64
I traced the failure by running all Initialization one by one on same command line (cmd) window; In the beginning I used to run only Initialization for x86_amd64 which runs without errors thus I didn't notice anything wrong. But on same window running Initialization for next compiler " ...\vcvarsall.bat x86_amd64" the error appeared which in my case was something like:
" ..program Files\MySQL\Utilities xxx was not expected at this time"
I just checked and found that path does not exist at all in my storage, so I removed it from PATH system env settings, and surprised things went normal after that!
To add to the answer of #John Wesley, I too had to alter my system's PATH enviroment variable to fix the "failed to retrieve msvc environment" error. However, my problem was slightly different.
In short, remove any unused directories from your PATH.
To explain, my PATH contained the following entries in the following order:
C:\Program Files (x86)\Common Files\Oracle\Java\javapath;
C:\ProgramData\Oracle\Java\javapath;
C:\Program Files (x86)\Intel\iCLS Client\;
C:\Program Files\Intel\iCLS Client\;
C:\Windows\system32;
C:\Windows;
C:\Windows\System32\Wbem;
[lots more enties followed...]
Hence my case was different to John's because it already had the required entries of:
C:\Windows\system32;
C:\Windows;
C:\Windows\System32\Wbem;
The fix for my system was to delete the first two entries (which I do not need because I manually set my Java paths). After I did that, I reopened Qt Creator and it worked!
It has been working for the past week without problem, however, sometimes the message "failed to retrieve msvc environment" still pops up for a moment, but then disappears again.
I met this error building qt project in Qt Creator. then solved by adding some paths to my system path, which not included them before.
C:\Windows\System32
C:\Windows
C:\Windows\System32\Wbem
Then reopen Qt Creator.
I faced the same problem as you. I use Visual Studio 2017 Community Edition with Qt 5.6.0. Windows 10.
In the beginning, I used "Visual Studio Installer" to repair. However it does not work.
Then I append "C:\Windows\System32" to "PATH" variable to Environment variables" since chcp is a exe in System3 and somehow I cannot find "C:\Windows\System32" in "PATH".
After that, I delete the Visual Studio (C:\Program Files (x86)\Microsoft Visual Studio) directly from File Explorer. ( I shift+deleted it )
Then re-install the "Visual Studio 2017" again.
It works!
I do not know which step is important. I think to add System32 to PATH variable and re-install VS2017 may the solution
In my case, I found the problem in my System Path variable. If the Path contains double quote anywhere, Qt emits this error.
I have meet the "error: Failed to retrieve MSVC Environment" for no reason. I deleated the debug file of my project and it does work.

'cl' is not recognized as an internal or external command

Below is the error message when I run "scons" to compiler in windows7:
-----------------------------------------------------------------------------------
'cl' is not recognized as an internal or external command,
operable program or batch file.
scons: *** [out\windows-x86-MD-unicode-vs2008-rel\obj-static\src\featuresets\ada pters\im-history\AddToChatRoomHistoryVisitor.obj] Error 1
scons: building terminated because of errors.
-----------------------------------------------------------------------------------
I have added path to environment variables already, but still met this problem.
Below is the PATH info of environment variables:
--------------------------------------------------------------------------------------------
PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v
1.0\;C:\Program Files\CREDANT\Shield v7.1\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Fil
es\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\TortoiseSVN\bin;C:\Python27;C:\cygwin64\bin
;C:\Python27\scons-2.3.1;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program File
s\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Progra
m Files (x86)\Microsoft Visual Studio 10.0\VC\bin;C:\Python27\Scripts;C:\Program Files (x86)\Microso
ft Visual Studio 10.0\VC\lib;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include
--------------------------------------------------------------------------------------------
The location of the cl.exe executable is not in the system PATH environment variable.
In other words the cmd.exe command line processor has been asked to run the cl.exe executable but it can't find it. It is either not in the PATH or not installed.
I have added path to environment variables already, but still met this problem.
To test this open a command prompt and type in:
cl.exe -?
SCons has logic to find the location of the visual studio install and set the path and other environment variables needed by visual studio tools by inspecting the registry and also default install locations.
If it's failing for you then you should produce a debug log and pastebin it somewhere for us to see.
use:
set SCONS_MSCOMMON_DEBUG=%TEMP%\SCONS_MSVS_DEBUG.log
and then runs scons from the same shell. The log will be in
%TEMP%\SCONS_MSVS_DEBUG.log
You might also try the latest version of SCons 2.4.1 as I note there were some fixes for MSVS/MSVC in later versions. But in theory 2.3.1 should find Visual Studio 2010..
Simply do window search for cl.exe, and add that path to PATH variable, save it. Close the existing open command and reopen it it before executing cl.exe. Hope this will work.
I was having the same issue and found a better way to fix it from #bdbaddog answer to get the debug log from set SCONS_MSCOMMON_DEBUG=%TEMP%\SCONS_MSVS_DEBUG.log SCons seem to find the cl.exe
00073ms:MSCommon/vc.py:_check_cl_exists_in_vc_dir#588:checking for cl.exe at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\Hostx64\x64\cl.exe:
00073ms:MSCommon/vc.py:_check_cl_exists_in_vc_dir#590:found cl.exe!:
And scons env env['ENV']['PATH'] has the cl.exe path but it doesn't use it, So I just updated the session path using scons path like below and it worked
os.environ['PATH'] = env['ENV']['PATH']

Visual Studio 2012 - Required file "tracker.exe" is missing

I tried to compile the source code of cryengine 3 and I always get the following error message.
Error 1 error : Required file "tracker.exe" is missing. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets 251 6 CryGame
For some reason I couldn't find any information on google.
Could it be possible that my Visual Studio installtion is somehow corrupt? I am still using the release candidate
A quote from MS website about tracker.exe:
Tracker.exe is required to correctly incrementally generate resources
in some circumstances, such as when building on a 64-bit OS using
32-bit MSBuild. This build requires Tracker.exe, but it could not be
found. The task is looking for Tracker.exe beneath the
InstallationFolder value of the registry key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A.
Possible solutions:
Install the Microsoft Windows SDK v7.0A or later.
Manually set the above registry key to the correct location.
You short-circuit that lookup instead by setting the
ResGenTrackerSdkPath property to the 7.1 .NET 4.0 tools location. In
the build definition, under "MSbuild Arguments", you can add the
following:
/p:ResGenTrackerSdkPath=":\Program Files(x86)\Microsoft SDKs\Windows\v7.1\Bin\NETFX 4.0 Tools
EDIT: your path may differ a little, but this still shows the general path to add
You can go to the directory "C:\Program Files (x86)\Microsoft SDKs\Windows".
Then, you search for the key "tracker.exe", if you can't find it, it might been deleted somehow.
The best way is:
Copy the folder "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools"
To your PC at the same directory.
If it didn't work, you can copy the folder into them[the following picture] every one.
picture:

Eclipse CDT can't build - not sure what's wrong (console included)

I'm now going to give c++ a try to see what this language have to offer. I'm having some trouble setting it all up though. I have downloaded Eclipse CDT and followed this guide : http://www.dcs.vein.hu/bertok/oktatas/cpp_by_eclipse/eclipse_for_cpp_on_windows.html#Install_gdb
I am using Windows 7 64bit.
I have never installed a compiler before, and I'm not sure what exactly I am doing wrong. It gives me an "Launch failed. no binary found" error when I try to run my program. However there is no binaries folder. I have tried building, it loads for a while, but nothing really happens.
Any idea what to do? I am completely new at c++ so please be patient and let me know if there's anything I am missing :)
The console in eclipse says the following:
Build of configuration Debug for project Test2 **
Internal Builder is used for build ** cl /c /EHs /MD /Zi /nologo /Fospam.obj ..\spam.cpp Internal Builder: Cannot run program "cl" (in directory "C:\cppworkspace\Test2\Debug"): CreateProcess error=2, Den angivne fil blev ikke fundet Error: Program "cl" is not found in PATH
PATH=[C:\oraclexe\app\oracle\product\10.2.0\server\bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\EgisTec\MyWinLocker 3\x86;C:\Program Files (x86)\EgisTec\MyWinLocker 3\x64;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\TortoiseSVN\bin;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;c:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;C:\MinGW\bin] Build error occurred, build is stopped Time consumed: 156 ms.
If you will compile with Eclipse CDT + MingGW Compiler you should use the MinGW toolchain
MingW Toolchain
If you want use Eclipse + Microsoft C++ compiler, need change for "Microsoft Visual C++" toolchain and put in PATH
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin
or whatever you have because CL program is there...
The problem is simple enough, Eclipse can't find your compiler.
On the lengthy PATH that is quoted I don't see 'c:\MinGW\bin' so I'm guessing you had problems with step 4 under section install MinGW.
Having said all that I don't think Eclipse is a very good environment for developing C++ and I don't think MinGW is a particularly good compiler. I'd seriously recommend you take a look at Visual C++ 2010 Express, which you can download from here http://www.microsoft.com/visualstudio/en-us/products/2010-editions/express
EDIT
OK now I do see 'c:\MinGW\bin', so apologies for that. I think the likely explanation is that you have selected the wrong 'tool chain'. Eclipse thinks you want to build with Visual C++ but you have downloaded MinGW. But really get Visual C++ 2010 Express and forget about Eclipse, it's much easier.