can't launch sparkR shell - windows

Hi I'm following this post to start using sparkR
I downloaded and unzipped the spark package.
and I added java to system path,
but can't launch sparkR shell.
Here's thing in powershell:
PS D:\spark-1.6.1-bin-hadoop2.6\bin> java -version
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) Client VM (build 25.91-b14, mixed mode)
PS D:\spark-1.6.1-bin-hadoop2.6\bin> dir
Directory: D:\spark-1.6.1-bin-hadoop2.6\bin
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 2/27/2016 12:02 AM 1099 beeline
-a---- 2/27/2016 12:02 AM 932 beeline.cmd
-a---- 2/27/2016 12:02 AM 1910 load-spark-env.cmd
-a---- 2/27/2016 12:02 AM 2143 load-spark-env.sh
-a---- 2/27/2016 12:02 AM 3459 pyspark
-a---- 2/27/2016 12:02 AM 1000 pyspark.cmd
-a---- 2/27/2016 12:02 AM 1486 pyspark2.cmd
-a---- 2/27/2016 12:02 AM 2384 run-example
-a---- 2/27/2016 12:02 AM 1012 run-example.cmd
-a---- 2/27/2016 12:02 AM 2682 run-example2.cmd
-a---- 2/27/2016 12:02 AM 2858 spark-class
-a---- 2/27/2016 12:02 AM 1010 spark-class.cmd
-a---- 2/27/2016 12:02 AM 2365 spark-class2.cmd
-a---- 2/27/2016 12:02 AM 3026 spark-shell
-a---- 2/27/2016 12:02 AM 1008 spark-shell.cmd
-a---- 2/27/2016 12:02 AM 1528 spark-shell2.cmd
-a---- 2/27/2016 12:02 AM 1075 spark-sql
-a---- 2/27/2016 12:02 AM 1050 spark-submit
-a---- 2/27/2016 12:02 AM 1010 spark-submit.cmd
-a---- 2/27/2016 12:02 AM 1126 spark-submit2.cmd
-a---- 2/27/2016 12:02 AM 1049 sparkR
-a---- 2/27/2016 12:02 AM 998 sparkR.cmd
-a---- 2/27/2016 12:02 AM 1010 sparkR2.cmd
PS D:\spark-1.6.1-bin-hadoop2.6\bin> sparkR
sparkR : The term 'sparkR' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ sparkR
+ ~~~~~~
+ CategoryInfo : ObjectNotFound: (sparkR:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Suggestion [3,General]: The command sparkR was not found, but does exist in the current location. Windows PowerShell doe
s not load commands from the current location by default. If you trust this command, instead type: ".\sparkR". See "get-
help about_Command_Precedence" for more details.
Any help's appreciated. Thanks
update: the feedback in shell fixed it
Suggestion [3,General]: The command sparkR was not found, but does exist in the current location. Windows PowerShell doe
s not load commands from the current location by default. If you trust this command, instead type: ".\sparkR". See "get-
help about_Command_Precedence" for more details.

Related

Why do I get a "The description file for 'AX8108-0110-0105' can not be found." in my TwinCAT Drive Manager 2 project?

I have a TwinCAT Drive Manager 2 project with several axis and it worked for some time. However, now when I open the project and select a terminal or a drive I get the following error in the drive manager project:
No description file
See TwinCAT Drive Manager 2 output window for more details
When I check the output window I see the following
INFO | 26/09/2022 10:06:13.543: EtherCATCache fullpath: C:\Users\rruiter\AppData\Roaming\Beckhoff\TwinCAT\3.1\Components\Base\Build_4024.29\EtherCATCache.xml
ERR | 26/09/2022 10:06:13.548: The description file for 'AX8108-0110-0105' can not be found.
INFO | 26/09/2022 10:06:15.668: EtherCATCache fullpath: C:\Users\rruiter\AppData\Roaming\Beckhoff\TwinCAT\3.1\Components\Base\Build_4024.29\EtherCATCache.xml
INFO | 26/09/2022 10:06:16.038: ------ get basic parameters from C:\TwinCAT\3.1\Config\Io\EtherCAT\Beckhoff AX86xx.xml for device AX8620-0000-0103 ------
INFO | 26/09/2022 10:06:16.055: ------ end of getting basic parameters ------
How can I get my TwinCAT Drive Manager 2 project to work again?
I found an easier way to fix it - in TwinCAT 3, at the top bar, choose TwinCAT. Then click on EtherCAT devices --> update device Description.
Run the process only once. then activate configuration or close TwinCAT and reopen it.
I solved it by reinstalling TwinCAT Drive Manager 2. It turned out that I recently updated to TwinCAT version 4024.32, which apparently removed some config files for 'AX8108-0110-0105'. See below the diff of the files in C:\TwinCAT\3.1\Config\Io\EtherCAT after installing 4032 and after reinstalling TwinCAT Drive Manager 2:
> git diff --no-index after_install_4032.txt after_reinstall_twincat_drive_manager_2.txt
diff --git a/after_install_4032.txt b/after_reinstall_twincat_drive_manager_2.txt
index b952ef4..fddc373 100644
--- a/after_install_4032.txt
+++ b/after_reinstall_twincat_drive_manager_2.txt
## -3,10 +3,10 ##
Directory: C:\TwinCAT\3.1\Config\Io\EtherCAT
-Mode LastWriteTime Length Name
----- ------------- ------ ----
-d----- 23/09/2022 14:20 Beckhoff AX5xxx
-d----- 23/09/2022 14:20 RES
+Mode LastWriteTime Length Name
+---- ------------- ------ ----
+d----- 26/09/2022 10:19 Beckhoff AX5xxx
+d----- 23/09/2022 14:20 RES
-a---- 18/02/2022 16:16 1940011 Beckhoff AMI8xxx.xml
-a---- 31/03/2022 14:50 257759 Beckhoff AMP86xx.xml
-a---- 19/01/2022 16:25 484557 Beckhoff AMP88xx.xml
## -15,11 +15,11 ## d----- 23/09/2022 14:20 RES
-a---- 18/02/2022 16:16 10223198 Beckhoff AT2xxx.xml
-a---- 18/02/2022 16:16 1523079 Beckhoff ATH2xxx.xml
-a---- 18/02/2022 16:16 296705 Beckhoff AX2xxx.xml
--a---- 18/02/2022 16:16 1318804 Beckhoff AX5xxx.xml
--a---- 18/02/2022 16:16 6936233 Beckhoff AX86xx.xml
--a---- 24/05/2022 15:17 362055 Beckhoff AX883x.xml
--a---- 18/02/2022 16:16 307413 Beckhoff AX88xx.xml
--a---- 18/02/2022 16:16 32531337 Beckhoff AX8yxx.xml
+-ar--- 02/06/2022 16:18 1312428 Beckhoff AX5xxx.xml
+-ar--- 21/07/2022 11:39 4956612 Beckhoff AX86xx.xml
+-ar--- 21/07/2022 11:39 362055 Beckhoff AX883x.xml
+-ar--- 21/07/2022 11:39 395079 Beckhoff AX88xx.xml
+-ar--- 21/07/2022 11:39 52169060 Beckhoff AX8yxx.xml
-a---- 18/02/2022 16:16 1958885 Beckhoff BKxxxx.xml
-a---- 18/02/2022 16:16 296057 Beckhoff CUxxxx.xml
-a---- 18/02/2022 16:16 130936 Beckhoff CXxxxx.xml

DLL load failed when importing TensorFlow with GPU support

I am trying to install TensorFlow with GPU support on Windows 10, but I get an error (shown below) when importing it. The CPU version works fine.
I have
installed tensorflow-gpu through pip
updated the NVidia drivers for my GTX 1050 with GeForce Experience
installed CUDA 10.1 with NVidia's network installer
installed cuDNN 7.5.0.56, taking care of copying every file in the right CUDA folder
installed TensorRT 5.1.2.2 via the zip method and copied the relevant DLLs in CUDA again
This is the error:
> python
Python 3.7.2 (tags/v3.7.2:9a3ffc0492, Dec 23 2018, 23:09:28) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow
Traceback (most recent call last):
File "C:\Users\user\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\user\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\user\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "C:\Users\user\AppData\Local\Programs\Python\Python37\lib\imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "C:\Users\user\AppData\Local\Programs\Python\Python37\lib\imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: DLL load failed: The specified module could not be found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\user\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\__init__.py", line 24, in <module>
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "C:\Users\user\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "C:\Users\user\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 74, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\Users\user\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\user\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\user\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "C:\Users\user\AppData\Local\Programs\Python\Python37\lib\imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "C:\Users\user\AppData\Local\Programs\Python\Python37\lib\imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: DLL load failed: The specified module could not be found.
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/errors
for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.
My PATH environment variable (I removed all non-Microsoft and non-NVidia entries):
> echo $env:PATH.Split(';')
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\libnvvp
C:\Program Files\Microsoft MPI\Bin\
C:\WINDOWS\system32
C:\WINDOWS
C:\WINDOWS\System32\Wbem
C:\WINDOWS\System32\WindowsPowerShell\v1.0\
C:\WINDOWS\System32\OpenSSH\
C:\Program Files\Microsoft SQL Server\130\Tools\Binn\
C:\Program Files\dotnet\
C:\Program Files (x86)\dotnet\
C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common
C:\Program Files\NVIDIA Corporation\Nsight Compute 2019.1\
C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\extras\CUPTI\lib64
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include
C:\Program Files\TensorRT-5.1.2.2\lib
C:\Program Files\TensorRT-5.1.2.2\bin
C:\tools\cuda\bin
TensorRT is installed in C:\Program Files\TensorRT-5.1.2.2.
Content of the CUDA bin folder:
PS C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin> ls
Directory: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 18/04/2019 12:39 crt
-a---- 09/02/2019 06:57 202752 bin2c.exe
-a---- 09/02/2019 06:57 74850816 cublas64_10.dll
-a---- 09/02/2019 06:57 36055552 cublasLt64_10.dll
-a---- 09/02/2019 06:57 374272 cuda-memcheck.exe
-a---- 09/02/2019 06:57 4320256 cudafe++.exe
-a---- 09/02/2019 06:57 339968 cudart32_101.dll
-a---- 09/02/2019 06:57 408064 cudart64_101.dll
-a---- 18/04/2019 15:19 392566784 cudnn64_7.dll
-a---- 09/02/2019 06:57 115644416 cufft64_10.dll
-a---- 09/02/2019 06:57 225792 cufftw64_10.dll
-a---- 09/02/2019 06:57 4785664 cuinj64_101.dll
-a---- 09/02/2019 06:57 2074624 cuobjdump.exe
-a---- 09/02/2019 06:57 49030656 curand64_10.dll
-a---- 09/02/2019 06:57 171052032 cusolver64_10.dll
-a---- 09/02/2019 06:57 87930368 cusparse64_10.dll
-a---- 09/02/2019 06:57 285184 fatbinary.exe
-a---- 09/02/2019 06:57 1323008 gpu-library-advisor.exe
-a---- 09/02/2019 06:57 233472 nppc64_10.dll
-a---- 09/02/2019 06:57 10049024 nppial64_10.dll
-a---- 09/02/2019 06:57 3719680 nppicc64_10.dll
-a---- 09/02/2019 06:57 1003008 nppicom64_10.dll
-a---- 09/02/2019 06:57 7227904 nppidei64_10.dll
-a---- 09/02/2019 06:57 46016512 nppif64_10.dll
-a---- 09/02/2019 06:57 24603136 nppig64_10.dll
-a---- 09/02/2019 06:57 5848064 nppim64_10.dll
-a---- 09/02/2019 06:57 17426944 nppist64_10.dll
-a---- 09/02/2019 06:57 194560 nppisu64_10.dll
-a---- 09/02/2019 06:57 2610688 nppitc64_10.dll
-a---- 09/02/2019 06:57 8202240 npps64_10.dll
-a---- 09/02/2019 06:57 247296 nvblas64_10.dll
-a---- 09/02/2019 06:57 384000 nvcc.exe
-a---- 09/02/2019 06:57 310 nvcc.profile
-a---- 09/02/2019 06:57 22919168 nvdisasm.exe
-a---- 09/02/2019 06:57 149298688 nvgraph64_10.dll
-a---- 18/04/2019 16:46 131539456 nvinfer.dll
-a---- 18/04/2019 16:46 3663360 nvinfer_plugin.dll
-a---- 09/02/2019 06:57 5960192 nvlink.exe
-a---- 18/04/2019 16:46 4457472 nvonnxparser.dll
-a---- 18/04/2019 16:46 2447872 nvparsers.dll
-a---- 09/02/2019 06:57 4243456 nvprof.exe
-a---- 09/02/2019 06:57 221696 nvprune.exe
-a---- 09/02/2019 06:57 4580352 nvrtc-builtins64_101.dll
-a---- 09/02/2019 06:57 15659520 nvrtc64_101_0.dll
-a---- 09/02/2019 06:57 53 nvvp.bat
-a---- 09/02/2019 06:57 5838336 ptxas.exe
And the content of C:\tools:
PS C:\tools> tree /F
Folder PATH listing
Volume serial number is 6A54-3EA7
C:.
└───cuda
│ NVIDIA_SLA_cuDNN_Support.txt
│
├───bin
│ cudnn64_7.dll
│
├───include
│ cudnn.h
│
└───lib
└───x64
cudnn.lib
The problem was that I installed CUDA 10.1 instead of 10.0. TensorFlow isn't yet compatible with 10.1.
Yes, some versions of TensorFlow doesn't support CUDA 10.1, in that case, CUDA 10.0 or lower version will solve your issue.
This is how i resolved it, If you are using pip or pip3 you have less chance succeeding in first time.
Uninstall Python,CUDA, CuNN, Tensorflow-gpu (if you already installed)
Install ANACONDA or MINICONDA
Open ANACONDA prompt and run following command:
conda create --name tf_gpu tensorflow-gpu
This will create an environment tf_gpu whcih will install all compatible versions of Python, CUDA, CuNN and Tensorflow
once all the packages installed open the ANACONDA prompt and type the following command
conda activate tf_gpu
This will change the conda '(base)' to '(tf_gpu)' environment
Then type python as usual to activate the python prompt
If you want to deactivate the 'tf_gpu' environment
conda deactivate

postgresql on windows server cant connect

This is with PostgreSQL 9.6.2.
At first I thought this was my problem with django or something, but it turns out it's likely not. The server is on a different machine from the client, so I need to connect to the LAN address. since that wasnt working, I tested on the server:
PS C:\WINDOWS\system32> Test-NetConnection 192.168.1.9 -p 5432
ComputerName : 192.168.1.9
RemoteAddress : 192.168.1.9
RemotePort : 5432
InterfaceAlias : Ethernet
SourceAddress : 192.168.1.9
TcpTestSucceeded : True
And that is in fact my postgres:
TCP 0.0.0.0:5432 Windows10:0 LISTENING
[postgres.exe]
Yet I cannot connect to the remote port even on the "server" (my desktop, as opposed to my laptop where the app is):
PS C:\WINDOWS\system32> C:\"Program Files"\PostgreSQL\9.6\bin\psql.exe -h 192.168.1.9 -p 5432 -U dev -d postgres
psql: FATAL: no pg_hba.conf entry for host "192.168.1.9", user "dev", database "postgres", SSL off
But -h localhost does connect and I can see my conf files:
postgres=# show config_file;
config_file
------------------------------------------------------
C:/Program Files/PostgreSQL/9.6/data/postgresql.conf
(1 row)
postgres=# show hba_file;
hba_file
--------------------------------------------------
C:/Program Files/PostgreSQL/9.6/data/pg_hba.conf
(1 row)
these files don't exist after initial install, but I edited the samples and saved a copy and so it makes sense to see them showing up there.
The only changes I made to the main conf file are these four lines:
listen_addresses = '*' # what IP address(es) to listen on;
port = 5432 # (change requires restart)
superuser_reserved_connections = 3 # (change requires restart)
ssl = off # (change requires restart)
Everything else from the sample remains commented out.
And I added only this one line to the bottom of the pg_hba:
host all dev 192.168.1.0/24 trust
So that brings me to the firewall. I'd added a rule to allow connections to the port, but now I've turned completely the firewall off. Also I added PostgreSQL Server's public and private flags on the list of apps allowed to connect through the firewall. and like you can see above it is listening.
What could be the issue?
edits:
contents of the config folder:
PS C:\Program Files\PostgreSQL\9.6\share> dir
Diretório: C:\Program Files\PostgreSQL\9.6\share
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- Saturday, 11, 3, 2017 contrib
8:16 PM
d----- Saturday, 11, 3, 2017 extension
8:19 PM
d----- Saturday, 11, 3, 2017 locale
8:16 PM
d----- Saturday, 11, 3, 2017 timezone
8:19 PM
d----- Saturday, 11, 3, 2017 timezonesets
8:19 PM
d----- Saturday, 11, 3, 2017 tsearch_data
8:18 PM
-a---- Wednesday, 22, 2, 2017 75988 conversion_create.sql
5:35 PM
-a---- Wednesday, 22, 2, 2017 109286 information_schema.sql
4:29 PM
-a---- Saturday, 11, 3, 2017 4481 pg_hba.conf
10:26 PM
-a---- Wednesday, 22, 2, 2017 4412 pg_hba.conf.sample
4:29 PM
-a---- Wednesday, 22, 2, 2017 1636 pg_ident.conf.sample
4:29 PM
-a---- Wednesday, 22, 2, 2017 604 pg_service.conf.sample
4:29 PM
-a---- Wednesday, 22, 2, 2017 650392 postgres.bki
5:26 PM
-a---- Wednesday, 22, 2, 2017 117036 postgres.description
5:26 PM
-a---- Wednesday, 22, 2, 2017 50 postgres.shdescription
5:26 PM
-a---- Sunday, 12, 3, 2017 22258 postgresql.conf
12:45 AM
-a---- Wednesday, 22, 2, 2017 22201 postgresql.conf.sample
4:29 PM
-a---- Wednesday, 22, 2, 2017 278 psqlrc.sample
4:29 PM
-a---- Wednesday, 22, 2, 2017 5690 recovery.conf.sample
4:29 PM
-a---- Wednesday, 22, 2, 2017 25073 snowball_create.sql
5:35 PM
-a---- Wednesday, 22, 2, 2017 33114 sql_features.txt
4:29 PM
-a---- Wednesday, 22, 2, 2017 37157 system_views.sql
4:29 PM

Powershell missing about_* help files after update

After the recent windows 10 anniversary update nearly all of the about_* help files are are no longer in powershells get-help search path. update-help as an admin does not fix this issue either. I can see that they still exist but is there a way to add these back to the get-help path:
PS C:\WINDOWS\system32\WindowsPowerShell\v1.0> help about_*
Name Category Module Synopsis
---- -------- ------ --------
about_BeforeEach_AfterEach HelpFile performed at t...
about_Mocking HelpFile Pester provide...
about_Pester HelpFile Pester is a BD...
about_should HelpFile Provides asser...
about_TestDrive HelpFile A PSDrive for ...
Here are the missing ones:
PS C:\WINDOWS\system32\WindowsPowerShell\v1.0> dir $env:windir\system32\WindowsPowerShell -Recurse -filter *about*
Directory: C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\PSWorkflow\en-US
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 9/30/2016 3:24 PM 25897 about_ActivityCommonParameters.txt
-a---- 9/30/2016 3:24 PM 3128 about_Checkpoint-Workflow.txt
-a---- 9/30/2016 3:24 PM 3112 about_Foreach-Parallel.txt
-a---- 9/30/2016 3:24 PM 4123 about_InlineScript.txt
-a---- 9/30/2016 3:24 PM 1691 about_Parallel.txt
-a---- 9/30/2016 3:24 PM 2833 about_Sequence.txt
-a---- 9/30/2016 3:24 PM 4031 about_Suspend-Workflow.txt
-a---- 9/30/2016 3:24 PM 15250 about_WorkflowCommonParameters.txt
-a---- 9/30/2016 3:24 PM 10889 about_Workflows.txt
... and about 100 more in ...\v1.0\**
I tried using update-help -source directly on these files but that doesn't work either.

Path setting for Compiling a Native C/C++ Program from the Command Line

Using VC++ Command Line for the first time. Facing problem in setting proper paths for cl.exe and other header files:
///simple.cpp, saved at **D:\Program Files\VC**
#include <iostream>
int main()
{
std::cout << "This is a native C++ program." << std::endl;
return 0;
}
When typing on command:
cl /EHsc simple.cpp
returning error
D:\Program Files\VC> cl /EHsc simple.cpp
'cl' is not recognized as an internal or external command,
operable program or batch file.
Kindly note my Visual Studio is installed in D-drive.
As a work around I moved to bin folder where cl.exe is present:
D:\Program Files\VC\bin>cl /EHsc simple.cpp
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.
simple.cpp
simple.cpp(1) : fatal error C1083: Cannot open include file: 'iostream': No such
file or directory
As you can see now it is unable to include "iostream", which is present in include folder under D:\Program Files\VC\include
Please help me in setting the default paths properly.
Update:
Here are the content of the directory:
Directory of D:\Program Files\VC
06/15/2012 02:23 PM <DIR> .
06/15/2012 02:23 PM <DIR> ..
04/20/2012 12:24 PM <DIR> atlmfc
06/15/2012 02:35 PM <DIR> bin
04/20/2012 12:22 PM <DIR> crt
04/20/2012 12:24 PM <DIR> include
04/20/2012 12:24 PM <DIR> lib
02/23/2012 05:16 PM 1,525 Notepad.lnk
04/20/2012 12:23 PM <DIR> redist
06/15/2012 02:31 PM 146 simple.cpp
04/20/2012 12:22 PM <DIR> VCAddClass
04/20/2012 12:21 PM <DIR> VCContextItems
08/31/2009 02:46 AM 160 vcEmptyTestProject.vsz
04/20/2012 12:21 PM <DIR> VCNewItems
04/20/2012 12:22 PM <DIR> vcpackages
04/20/2012 12:21 PM <DIR> VCProjectDefaults
04/20/2012 12:25 PM <DIR> vcprojectitems
04/20/2012 12:25 PM <DIR> vcprojects
04/20/2012 12:22 PM <DIR> VCResourceTemplates
09/30/2009 08:23 PM 1,237 vcvarsall.bat
04/20/2012 12:25 PM <DIR> VCWizards
4 File(s) 3,068 bytes
17 Dir(s) 8,465,346,560 bytes free
For visual studio 2008 there is an environment variable: VS90COMNTOOLS that you can use. Probably something similar for VS2010.
so:
from the command line directly, or from a batch file:
"%VS90COMNTOOLS%vsvars32.bat"
(include the quotes!)
This should set up stuff appropriately.
You'll need to replace %VS90COMNTOOLS% with the appropriate environment variable for 2010.
Open the Visual Studio Command Prompt, it's a command prompt that comes ready with the appropriate directories in the path.
"d:\program files\bin\vcvars32.bat"
This file is created for you when you install the compiler, so it has values customized for your installation.
See MSDN for details.

Resources