how to start with Visual Studio C++ Express

Page 2 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.

Jaydip

Diamond Member
Mar 29, 2010
3,691
21
81
Is this normal? How many folders I must set yet? I must restart my computer every time. No your fault of sure, I just complain the installation.

I have never seen this before, also why are you using a command line compiler instead of IDE?
 

h4ever

Member
Aug 30, 2013
163
0
0
What did you mean? Did you mean to set the include directory to the system variable PATH or to move some directory (e.g. from my project? I have no include directory there). There is include directory in VS folder. I set the include folder into the PATH. No change. It still says I should set the include directory.
 

Jaydip

Diamond Member
Mar 29, 2010
3,691
21
81
What did you mean? Did you mean to set the include directory to the system variable PATH or to move some directory (e.g. from my project? I have no include directory there). There is include directory in VS folder. I set the include folder into the PATH. No change. It still says I should set the include directory.

I mean why are you trying to compile it from the command prompt ?
 

h4ever

Member
Aug 30, 2013
163
0
0
Seems like the batch file for VS console cannot read correctly path to instalation. I will solve that buggy script tomorrow.
 

Jaydip

Diamond Member
Mar 29, 2010
3,691
21
81
Seems like the batch file for VS console cannot read correctly path to instalation. I will solve that buggy script tomorrow.

Just create a win32 console application without selecting the check box "Precompiled Headers"

1.Now do this, go to Project -->Properties-->Configuration Properties-->General-->Common Language Runtime Support and set it to true

2.Change the "subsystem" in your linker settings from "Console" to "Windows" i.e Project -->Properties-->Linker-->System

It should compile without issues now.
 

h4ever

Member
Aug 30, 2013
163
0
0
that is what I try do do but I cannot to deselect the checkbox. It is possible to do it only in the Console application or in static library

5eftcl.jpg
 

h4ever

Member
Aug 30, 2013
163
0
0
Many thanks for assistance. I hope it could work now. I'm happy I can go on. I did not finished successfully because I am getting some syntax error (?) but I will try to ask the author of the source code, why there is some mistake, I think it has something to do that the file (line 25)
c:\\temp\\my24bit.bmp does not exist. I am working on solution right now :)
 

Jaydip

Diamond Member
Mar 29, 2010
3,691
21
81
Many thanks for assistance. I hope it could work now. I'm happy I can go on. I did not finished successfully because I am getting some syntax error (?) but I will try to ask the author of the source code, why there is some mistake, I think it has something to do that the file (line 25)
c:\\temp\\my24bit.bmp does not exist. I am working on solution right now :)

You don't need to bother, just drop a sample(or create one) bmp file on that location and rename it to "my24bit.bmp" .It will work.
 

h4ever

Member
Aug 30, 2013
163
0
0
Yeah, it works. I will test now some codes from tutorials and so on. Going to learn to work with Gdi+. Basicly, if I understand it right, to use gdi+ I need this line:
#using <System.Drawing.dll>
it loads the library of GDI+, right?
 

Jaydip

Diamond Member
Mar 29, 2010
3,691
21
81
Yeah, it works. I will test now some codes from tutorials and so on. Going to learn to work with Gdi+. Basicly, if I understand it right, to use gdi+ I need this line:
#using <System.Drawing.dll>
it loads the library of GDI+, right?

Yeah, but get the core concepts mastered before you move onto UI staff.
 

Jaydip

Diamond Member
Mar 29, 2010
3,691
21
81
I look for .exe file but I cannot find it. I see only .h or ccp

There should be a debug/release folder(depending on your configuration) in which there should be the exe file.Like this
C:\Documents and Settings\<User>\My Documents\visual studio 2010\Projects\<Project_Name>\Debug
 
Last edited:

h4ever

Member
Aug 30, 2013
163
0
0
where is the settings for folder path to project files. I mean the folder which takes so much space.
 

h4ever

Member
Aug 30, 2013
163
0
0
There is few things which I dont know how to call to find them in documention. There is sign ^ in the command, how is it called in C++? or what does it mean or where can I read about it?

Code:
 Bitmap^ pImage = gcnew Bitmap("r:\gdip_test.png", true);
Also what does the gcnew? I read on msdn about this command but the explanation is not clear to me? Does it allocate dynamic memory to object?

Also this command:
Code:
 array<Byte>^rgbValues = gcnew array<Byte>(bytes);
Similar. What does mean this <> here? Can you refer?
 
Last edited:

Jaydip

Diamond Member
Mar 29, 2010
3,691
21
81
There is few things which I dont know how to call to find them in documention. There is sign ^ in the command, how is it called in C++? or what does it mean or where can I read about it?

Code:
 Bitmap^ pImage = gcnew Bitmap("r:\gdip_test.png", true);
Also what does the gcnew? I read on msdn about this command but the explanation is not clear to me? Does it allocate dynamic memory to object?

Also this command:
Code:
 array<Byte>^rgbValues = gcnew array<Byte>(bytes);
Similar. What does mean this <> here? Can you refer?

That means pointer.gcnew is used because you are using clr, if it was pure C++ it would be new instead.