This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Installation of Visual Studio 2010 (any edition) installs only 2 files in the C++ headers directory
I am so desperate Right now its not funny I have searched the entire internet for the answer and its not working.... i have installed and reinstalled visual studio 2010 pro at least 4 times and it doesnt fix anything..... heres my problem
I try to make a simple Hello world project and boom it fails saying this..
#include<iostream>
using namespace std;
int main()
{
cout << "Hello World.." << endl;
return 0;
}
1>------ Build started: Project: ds, Configuration: Debug Win32 ------
1>Build started 1/21/2013 12:31:36 PM.
1>InitializeBuildStatus:
1> Touching "Debug\ds.unsuccessfulbuild".
1>ClCompile:
1> d.cpp
1>c:\users\dj\documents\visual studio 2010\projects\ds\ds\d.cpp(1): fatal error C1083:
Cannot open include file: 'iostream': No such file or directory
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:00.32
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
my include folder in VC only has these names
ammintrin
omp
pgobootrun
srv
wmiatlprov
Im not to great with this so if ur gonna answer can you put it noob terms:)
Thank you in advance..
When you choose console aplication check the option: include precompiled header, most likely you created an empty project in which case you must manualy add the path to iostream file
in .vcxproj directory includes you should have:
Include Directories $(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include;
and
Library
$(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSdkDir)lib;$(FrameworkSDKDir)\lib
if you have these and stdafx.h include in cpp but still no path to iostream you should check PATH environment variable not to be broken or any of the variables $(VCInstallDir) $(WindowsSdkDir) $(FrameworkSDKDir)
Related
I had a functional remote build. Got a new Windows PC. Installed VS, set up same environment variables, pulled same source code from svn, pointed VS at the same remote machine using the same remote account.
Basic error is the windows (local) path is being concatenated to the linux (remote) one:
1>g++ : error : /home/tyler/vsBuildRoot/trunk/CoreTech/ThirdPartyTools/Encryption/Rijndael/Project/Linux/S/buildroot/CoreTech/ThirdPartyTools/Encryption/Rijndael/Project/Linux/../../Source/Rijndael.cpp: No such file or directory
Can anyone provide any hints as to how these inputs might result in the given outputs?
1>Target "ResolveRemoteDir" in file "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Application Type\Linux\1.0\Linux.targets":
1> Using "ResolveRemoteDir" task from assembly "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Application Type\Linux\1.0\Microsoft.Build.Linux.Tasks.dll".
1> Task "ResolveRemoteDir"
1> Task Parameter:RemoteProjectDir=/home/tyler/vsBuildRoot/trunk/CoreTech/ThirdPartyTools/Encryption/Rijndael/Project/Linux/
1> Task Parameter:RemoteTarget=802522027;192.168.1.107 (username=, port=22, authentication=PrivateKey)
1> Task Parameter:ProjectDir=S:\buildroot\CoreTech\ThirdPartyTools\Encryption\Rijndael\Project\Linux\
1> Task Parameter:IntermediateDir=../../Build/Rijndael/Linux/LIB/Release/x64/
1> Task Parameter:RemoteProjectDirFile=../../Build/Rijndael/Linux/LIB/Release/x64/802522027.RemoteProjectDirFile.tlog
1> Task Parameter:RequireRemoteConnection=True
1> Output Property: _ResolvedRemoteProjectDir=/home/tyler/vsBuildRoot/trunk/CoreTech/ThirdPartyTools/Encryption/Rijndael/Project/Linux/S/buildroot/CoreTech/ThirdPartyTools/Encryption/Rijndael/Project/Linux
1> Done executing task "ResolveRemoteDir".
Some tasks correctly generate _ResolvedRemoteProjectDir, some do not. The key inputs always seem to be the same. I should note that this happens for multiple projects...which are clearly inheriting something different. I just can't figure out what.
I am very stumped.
Worth noting, that s: is a virtual drive that is sometimes referenced through various variables in our build. The physical drive never is. On this computer, that maps to c:\S_Drive. If I open the solution from there, the remote directory does change to c:\S_Drive
I'm working on a Hololens application using Unity 2018.2.20f1. I'm building the application for UWP from Unity without a problem. However, after opening up the generated solution in the VisualStudio 2017 (Community Edition) and trying to build it, the build process fails with the following errors:
Severity Code Description Project File Line Suppression State
Error MSB3073 The command ""D:\Projects\VSProjects\VirtualPrague\Il2CppOutputProject\\IL2CPP\build\il2cpp.exe" --libil2cpp-static --compile-cpp -architecture=x86 -configuration=Release -platform=winrt -outputpath="D:\Projects\VSProjects\VirtualPrague\\build\bin\Win32\Release\GameAssembly.dll" --data-folder="D:\Projects\VSProjects\VirtualPrague\\build\bin\Win32\Release\\" -cachedirectory="D:\Projects\VSProjects\VirtualPrague\\build\obj\il2cppOutputProject\Win32\Release\\" -generatedcppdir="D:\Projects\VSProjects\VirtualPrague\Il2CppOutputProject\\Source" --additional-defines=WINDOWS_UWP --additional-defines=UNITY_UWP --additional-defines=UNITY_WSA_10_0 --additional-defines=UNITY_WSA --additional-defines=UNITY_WINRT --additional-defines=PLATFORM_WINRT -dotnetprofile=unityjit -verbose --map-file-parser="D:\Projects\VSProjects\VirtualPrague\Il2CppOutputProject\\IL2CPP\MapFileParser\MapFileParser.exe"" exited with code -532462766. Il2CppOutputProject C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.MakeFile.Targets 44
and
Severity Code Description Project File Line Suppression State
Error LNK1181 cannot open input file 'D:\Projects\VSProjects\VirtualPrague\build\bin\Win32\Release\GameAssembly.lib' VirtualPrague D:\Projects\VSProjects\VirtualPrague\VirtualPrague\LINK 1
In the output there are multiple exceptions, similar to this one:
1>il2cpp.exe didn't catch exception: System.IO.IOException: The process cannot access the file 'C:\Users\dev\AppData\Local\Temp\tmpDE97.tmp' because it is being used by another process.
1> at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
1> at System.IO.File.InternalDelete(String path, Boolean checkHost)
1> at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller)
1> at Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(HashSet`1 objectFiles, CppToolChainContext toolChainContext)
1> at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
1> at il2cpp.Program.DoRun(String[] args)
1> at il2cpp.Program.Run(String[] args)
1> at il2cpp.Program.Main(String[] args)
The exceptions are the same but were thrown for different files. I tried to reinstall the Visual Studio and managed to get a build. The next day I turned on the PC and this error was back. I stopped all of the VS instances and processed from the task manager, deleted all of the files from the Temp folder and managed to get a build a couple more times. Then this error came back.
From what I can tell, during the build process, Visual Studio creates some *.tmp files and for some reason thinks that another process is using it.
Any idea why this is happening and how can it be solved?
Thanks a lot!
Edit: So here is what I did so far (this is more of a work around rather then a solution)
Uninstall vs and unity
Clear the registry with ccleaner and Advanced Uninstaller Pro
Install vs and Unity
Every time I want to get a build I,
Close all of vs instances
Clear Temp folder (C:\Users\dev\AppData\Local\Temp)
Delete previous vs solution
Build from Unity
Run vs as Administrator
Build and deploy the solution from vs
And it works for the most the time. Also, changing the solution configuration (from debug to release and vice versa) helps sometimes.
I'm getting an RC2247 error (Symbol name too long) when attempting to display the dialogs in a Win32 app. The error is occurring in this file:
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\um\winnt.h
This worked fine under VS2015. The error started when I upgraded to VS2017.
I have seen the following posts, they don't appear to be relevant because they pertain to prsht.h:
RC2247 : Cannot open Rc file : Resource explorer cannot load resource ; Load failed
http://social.msdn.microsoft.com/Forums/en-US/vcprerelease/thread/4a648d6a-ea81-44d3-89c2-57fa5caa6fd6
The error disappears if I comment out the entire resource.rc file. The error occurs if the RC contains the single line:
#include <winnt.h>
When I click on "Edit code"", nothing happens.
I am grateful for any suggestions.
We must not include windows.h or winnt.h to .rc file - this headers - for are for c/c++ compilers and not designed for RC (resource compiler which process .rc file). as result if we include such files we may get errors.
We need include #include <winres.h> to .rc files. this file specially designed for the RC compiler. Internally it included:
#include <winuser.rh>
#include <commctrl.rh>
#include <dde.rh>
#include <winnt.rh>
#include <dlgs.h>
#include <winver.h>
and define some macros.
All standard windows definitions, which we need/use in rc file - exist in winres.h (and it subincludes). From another side in it no extra symbols/definitions wich exist in windows.h - it's not needed for rc and some time can cause errors.
So simply #include <winres.h> at the beginning of resource files and all will be OK.
I have run into this complaint rc2247 when trying to edit the rc file in a project compiled in vs2010. This had been upgraded from vs2050. I found that if I chose to open the .sin file via 'version selector' instead of going straight to vs2010, then it still opens in vs2010 but there is no problem in editing the rc. I don't pretend to understand !
CalendarMan
I am using Windows 10 64-bit machine with Visual Studio Professional 2013 and I want to install SystemC. I downloaded SystemC 2.3.1 and I tried following the "Installation notes" provided but they're slightly outdated.
For one, it says "for VS 2005 and higher on Windows 7 machines" but I am using Windows 10, nevertheless I still tried to follow it. Second, the inclusion of src and lib files cannot be followed as stated there since this method was changed in VS2013. There seems to be no global setting anymore via Tools->Options->Projects->VCC++ directions tab.
Now, I was able to successfully buiold the SystemC.sln solution. However, when I tried to build an example project I got the following error:
LINK : fatal error LNK1104: cannot open file
'C:\Users\Andrew\Downloads\systemc-2.3.1a\systemc-2.3.1a\msvc80\SystemC\Debug.obj'
Even though I think I've correctly specified the src and lib directories in the project properties.
Can anyone explain how to build SystemC with VS2013 on Windows 10 x64?
Update: if you use CMake with Visual Studio, check Setting up a SystemC project with CMake: undefined reference to `sc_core
Currently I have no MSVC2013 installed, so here are steps for MSVC2017 that worked for me.
Download latest SystemC from http://accellera.org/downloads/standards/systemc
Open systemc-2.3.1a\msvc80\SystemC\SystemC.sln in Visual Studio
Visual Studio will offer to update solution, click ok. You can ignore report with warnings.
In VS menu bar set configuration to “Debug“ “Win32”. (In my case was already selected by default)
Build solution (F7)
In console, you may find messages like:
Unknown compiler version - please run the configure tests and report the results
You can ignore them. Solution should build without errors:
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
As a result you will have SystemC.lib in systemc-2.3.1a\msvc80\SystemC\Debug
Now you can create some test SystemC project.
File->New -> Project -> Win32 Console application
Right click on project in solution explorer -> Properties
In Configuration Properties -> C/C++ -> General-> Additional include directories
Add path to: \systemc-2.3.1a\src
In Configuration Properties -> C/C++ -> Code generation -> Runtime Library
Select: Multi-threaded Debug (/MTd)
In Configuration Properties -> C/C++ -> Language -> Enable Run-Time Type Information
Select: Yes (/GR)
In Configuration Properties -> C/C++ -> Command Line -> Additional options
Type: /vmg
In Configuration Properties -> Linker -> General -> Additional Library Directories
Add path to: systemc-2.3.1a\msvc80\SystemC\Debug
In Configuration Properties -> Linker -> Input -> Additional dependencies
Add: SystemC.lib
Now it's time to type some code. For example this "Hello world":
#include "stdafx.h"
struct test_module : sc_module {
SC_HAS_PROCESS(test_module);
test_module(::sc_core::sc_module_name) {
SC_THREAD(test_thread);
}
sc_signal<std::string> message{ "message" };
void test_thread() {
message.write("Hello world!");
wait(1, SC_NS);
cout << message.read() << endl;
sc_stop();
}
};
int sc_main(int argc, char** argv)
{
test_module tmod{ "tmod" };
sc_start();
return 0;
}
In stdafx.h add:
#include <systemc.h>
Build project, it will fail with:
\systemc-2.3.1a\src\systemc.h(120): error C2039: 'gets': is not a member of 'std'
gets was removed from std namespace in latest MSVCs, but it is not really required.
So just open systemc.h and comment out Line 120:
// using std::gets;
In case you got error about sprintf
Add _CRT_SECURE_NO_WARNINGS to list of preprocessor definitions
Build again. Run without debugging (Ctrl+F5). You should see the following introduction test on your console:
SystemC 2.3.1-Accellera --- Feb 1 2017 14:43:06
Copyright (c) 1996-2014 by all Contributors,
ALL RIGHTS RESERVED
Hello world!
Info: /OSCI/SystemC: Simulation stopped by user.
Press any key to continue . . .
Hope that helps
I was trying to build Chromium on Windows and met following error:
1>------ Build started: Project: webcore_bindings_sources, Configuration: Debug Win32 ------
1>Build started 9/6/2012 11:31:11 AM.
1>InitializeBuildStatus:
1> Touching "..\..\..\..\..\build\Debug\obj\webcore_bindings_sources\webcore_bindings_sources.unsuccessfulbuild".
1>CustomBuild:
1> ExceptionCodeDescription
1> Can't locate strict.pm in #INC (#INC contains: C:\chromium\src\third_party\WebKit\Source\WebCore\bindings\scripts /usr/lib/perl5/5.10/i686-cygwin /usr/lib/perl5/5.10 /usr/lib/perl5/site_perl/5.10/i686-cygwin /usr/lib/perl5/site_perl/5.10 /usr/lib/perl5/vendor_perl/5.10/i686-cygwin /usr/lib/perl5/vendor_perl/5.10 /usr/lib/perl5/vendor_perl/5.10 /usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/vendor_perl/5.8 .) at C:\chromium\src\third_party\WebKit\Source\WebCore\dom\make_dom_exceptions.pl line 33.
1> BEGIN failed--compilation aborted at C:\chromium\src\third_party\WebKit\Source\WebCore\dom\make_dom_exceptions.pl line 33.
It looks like my Perl path is not in the Visual Studio, so I'd like to add the path into this #INC, but not sure where to add it.
Try by setting the PERL5LIB environment variable.
There is this nice article which explains how to modify #INC on windows
Just found that this means cygwin is not mounted properly in Visual Studio.
The solution is:
In Solution Explorer go to the properties of the project
Go to Properties -> Build Events -> Pre-Build Event
On Command Line put:
$(SolutionDir)..\third_party\cygwin\setup_mount.bat
This thread has more details.