Emuforums.com

Go Back   Emuforums.com > General Discussion > Web development / Programming
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Login to remove all ads!
Reply
 
LinkBack Thread Tools Display Modes
Old March 27th, 2008   #1 (permalink)
Xtreme2damax
Suck My Crocodile
 
Xtreme2damax's Avatar
 
Join Date: Aug 2005
Location: In my bedroomz optimizing PCSX2 by kicking it in the nuts.
Posts: 1,426
I'm going to attempt to learn C++ (Again)

Well I decided I want to give it another go, but need a bit of help.

Last time I tried I could never get the Microsoft DirectX or Platform SDK set up properly to work with Visual Studio Express Editions.

Everytime I tried to compile something (DX Applications) I would get errors complaining it could not find an include file most likely from the DirectX SDK.

Since I could never get the SDK's set up properly no matter what tutorial I read to work with Visual C# and Visual C++ Express Editions I just finally gave up since I wasn't able to compile anything.

Does anyone have a link to any proper tutorials on how to get the DirectX SDK and Platform SDK to work properly with the Visual C# and Visual C++ Express Editions?

Also where can I find beginners tutorials for dummies for C#, C++ and DirectX programming.

Thank You.
__________________
Please visit my gaming and emulation forum and be part of a great community as well as partake in interesting discussions:



I'm looking for more staff & news posters for my forum, if you are interested PM me to see if you qualify for the position.

Also TheCloudOfSmoke is so cool, I think he is Jesus Christ Reborn.

Xtreme2damax is offline   Reply With Quote
Old March 27th, 2008   #2 (permalink)
refraction
PCSX2 Coder
 
refraction's Avatar
 
Join Date: Jan 2004
Location: Plymouth, UK
Posts: 9,215
With the DX SDK etc its a bit of a pain, cos it doesnt do it all for you, all it does is install the files. when its installed, open VS, go to Tools->Options (i think thats right) then down to Projects and Solutions -> C++ Directories. you then have to go to the includes dropdown and add the "include" directory under the directx sdk folder, then do the same thing for the libraries. It should all then work.

Some open source programs can be a bit of a pain (ala GSDX) and require a lot of fiddling due to peoples different setups, so you may need to be a little patient
__________________

http://www.generalemu.net/
Intel Core 2 Quad Q6600 @ 3.4Ghz (425x8), eVGA 8800GTX 768mb, 996Gb HDs, 2Gb Corsair DDR2-800 @ DDR2-1020 5-5-5-18 Dual Channel, 14605 3dMark 06 Points
CPU-Z Link
3dMark06 Score Link
Dont PM me for help, use the forums, thats what its for!



refraction is offline   Reply With Quote
Old March 27th, 2008   #3 (permalink)
Xtreme2damax
Suck My Crocodile
 
Xtreme2damax's Avatar
 
Join Date: Aug 2005
Location: In my bedroomz optimizing PCSX2 by kicking it in the nuts.
Posts: 1,426
Quote:
Originally Posted by refraction View Post
With the DX SDK etc its a bit of a pain, cos it doesnt do it all for you, all it does is install the files. when its installed, open VS, go to Tools->Options (i think thats right) then down to Projects and Solutions -> C++ Directories. you then have to go to the includes dropdown and add the "include" directory under the directx sdk folder, then do the same thing for the libraries. It should all then work.

Some open source programs can be a bit of a pain (ala GSDX) and require a lot of fiddling due to peoples different setups, so you may need to be a little patient
Yeah that's what I did last time I tried to set up the DX SDK, but Visual C++ Express still complained and spat errors out at me.

I'll give it a go again and see if I can get it to work, and you are right it is a pain since it's one of the main reasons that made me give up before.

I'll probably start out small with hello world type programs and move to more complicated stuff.
__________________
Please visit my gaming and emulation forum and be part of a great community as well as partake in interesting discussions:



I'm looking for more staff & news posters for my forum, if you are interested PM me to see if you qualify for the position.

Also TheCloudOfSmoke is so cool, I think he is Jesus Christ Reborn.

Xtreme2damax is offline   Reply With Quote
Old March 27th, 2008   #4 (permalink)
refraction
PCSX2 Coder
 
refraction's Avatar
 
Join Date: Jan 2004
Location: Plymouth, UK
Posts: 9,215
its possibly due to it being the express version, you are missing a lot of libs etc that might be required, which makes sense else you wouldnt need to buy the full version anymore
__________________

http://www.generalemu.net/
Intel Core 2 Quad Q6600 @ 3.4Ghz (425x8), eVGA 8800GTX 768mb, 996Gb HDs, 2Gb Corsair DDR2-800 @ DDR2-1020 5-5-5-18 Dual Channel, 14605 3dMark 06 Points
CPU-Z Link
3dMark06 Score Link
Dont PM me for help, use the forums, thats what its for!



refraction is offline   Reply With Quote
Old March 27th, 2008   #5 (permalink)
Xtreme2damax
Suck My Crocodile
 
Xtreme2damax's Avatar
 
Join Date: Aug 2005
Location: In my bedroomz optimizing PCSX2 by kicking it in the nuts.
Posts: 1,426
Quote:
Originally Posted by refraction View Post
its possibly due to it being the express version, you are missing a lot of libs etc that might be required, which makes sense else you wouldnt need to buy the full version anymore
Yeah that is understandable but people have gotten it to work with the Visual C# and C++ Express Edition before but it take a little work.

If I had the money to waste on a full copy of Visual Studio I would get that instead but Microsoft Software is insanely expensive.

I heard Visual Studio runs about as expensive as a copy of Vista if not more so it is not exactly a viable option right now since I'm no longer working my job.

I tried to compile the code for GSDX9 just to test it since the code already compiles error free. These are the output/errors I get when I attempt to compile:

Code:
1>------ Build started: Project: gsdx9, Configuration: Debug Win32 ------
1>Compiling...
1>gsdx9.cpp
1>c:\documents and settings\***\my documents\visual studio 2005\projects\gsdx9\gsdx9\gsdx9.cpp(22) : fatal error C1083: Cannot open include file: 'stdafx.h': No such file or directory
1>Build log was saved at "file://c:\Documents and Settings\***\My Documents\Visual Studio 2005\Projects\gsdx9\gsdx9\Debug\BuildLog.htm"
1>gsdx9 - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I get these or similar errors when I attempt to compile other DirectX applications as well.
__________________
Please visit my gaming and emulation forum and be part of a great community as well as partake in interesting discussions:



I'm looking for more staff & news posters for my forum, if you are interested PM me to see if you qualify for the position.

Also TheCloudOfSmoke is so cool, I think he is Jesus Christ Reborn.


Last edited by Xtreme2damax; March 27th, 2008 at 17:04.
Xtreme2damax is offline   Reply With Quote
Old March 27th, 2008   #6 (permalink)
refraction
PCSX2 Coder
 
refraction's Avatar
 
Join Date: Jan 2004
Location: Plymouth, UK
Posts: 9,215
hmm where did you get your gsdx9 from? the stdafx file is in the gsdx9 folder, ive got it here in my pcsx2 svn and gsdx svn folders..
__________________

http://www.generalemu.net/
Intel Core 2 Quad Q6600 @ 3.4Ghz (425x8), eVGA 8800GTX 768mb, 996Gb HDs, 2Gb Corsair DDR2-800 @ DDR2-1020 5-5-5-18 Dual Channel, 14605 3dMark 06 Points
CPU-Z Link
3dMark06 Score Link
Dont PM me for help, use the forums, thats what its for!



refraction is offline   Reply With Quote
Old March 27th, 2008   #7 (permalink)
Xtreme2damax
Suck My Crocodile
 
Xtreme2damax's Avatar
 
Join Date: Aug 2005
Location: In my bedroomz optimizing PCSX2 by kicking it in the nuts.
Posts: 1,426
Quote:
Originally Posted by refraction View Post
hmm where did you get your gsdx9 from? the stdafx file is in the gsdx9 folder, ive got it here in my pcsx2 svn and gsdx svn folders..
That is probably the reason then, I copied some code that was linked from here on the GSDX SVN website.

I must of only been previewing a sample of the GSDX source.

Bah I must go get the actual files now, I apologize for being a bit n00bish. I'm not exactly intelligent when it comes to anything programming related so please forgive me.

Well I got the proper Gsdx9 source to fool around with now, but upon attempting to compile to see if everything is working properly I get a new error in the output console:

Code:
1>------ Build started: Project: GSdx, Configuration: Debug SSE2 Win32 ------
1>Performing Custom Build Step
1>'ml' is not recognized as an internal or external command,
1>operable program or batch file.
1>Project : error PRJ0019: A tool returned an error code from "Performing Custom Build Step"
1>Build log was saved at "file://d:\My Documents\My Downloads\gsdx9\gsdx\Win32\Debug SSE2\BuildLog.htm"
1>GSdx - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Does Gsdx9 also rely on the Windows/Platform SDK?
__________________
Please visit my gaming and emulation forum and be part of a great community as well as partake in interesting discussions:



I'm looking for more staff & news posters for my forum, if you are interested PM me to see if you qualify for the position.

Also TheCloudOfSmoke is so cool, I think he is Jesus Christ Reborn.


Last edited by Xtreme2damax; March 27th, 2008 at 18:49. Reason: Had to update something.
Xtreme2damax is offline   Reply With Quote
Old March 27th, 2008   #8 (permalink)
cottonvibes
NGemu's Kawaii Neechan ;)
 
cottonvibes's Avatar
 
Join Date: Sep 2007
Location: USA
Posts: 1,582
i've found the hardest thing about C++ programming isn't the actual programming language, but setting up the IDE and Compilers to work correctly.
they're overly complicated and problem prone.

getting Direct X SDKs to be recognized should be as easy as installing the sdk.
especially in Microsoft Visual Studio, since its made by the same company, but of course they have to make it hard on us noobs :/
__________________
PC Specs: AMD X2 4400+ @ 2.921 Ghz, 1.47 vCore | G92 8800 GTS 512mb @ 740/1944| 4GB Dual Channel OCZ Memory @ 835 Mhz (5-4-4-15-2T) | 700 Watt PSU | DVD-RW Drive | 500 GB Hitachi SATA II Hard Drive, 30 GB & 40 GB Western Digital IDE Hard Drives | 1920x1080 40" LCD Flat Pannel HDTV monitor |
Consoles: 1 PS3 (60 GB), 2 PS2s, 1 PS, 3 GBAs, 1 GB, and 1 old school NES

Having troubles with PCSX2? Check out my guide to get it running correctly.
Running PCSX2 Guide for Noobs
cottonvibes is online now   Reply With Quote
Old March 27th, 2008   #9 (permalink)
refraction
PCSX2 Coder
 
refraction's Avatar
 
Join Date: Jan 2004
Location: Plymouth, UK
Posts: 9,215
the Custom build step thing is gabests fault with his dodgy paths if you look in the vc projects/debug folder, the dll will be in there.
__________________

http://www.generalemu.net/
Intel Core 2 Quad Q6600 @ 3.4Ghz (425x8), eVGA 8800GTX 768mb, 996Gb HDs, 2Gb Corsair DDR2-800 @ DDR2-1020 5-5-5-18 Dual Channel, 14605 3dMark 06 Points
CPU-Z Link
3dMark06 Score Link
Dont PM me for help, use the forums, thats what its for!



refraction is offline   Reply With Quote
Old March 27th, 2008   #10 (permalink)
Xtreme2damax
Suck My Crocodile
 
Xtreme2damax's Avatar
 
Join Date: Aug 2005
Location: In my bedroomz optimizing PCSX2 by kicking it in the nuts.
Posts: 1,426
Quote:
Originally Posted by refraction View Post
the Custom build step thing is gabests fault with his dodgy paths if you look in the vc projects/debug folder, the dll will be in there.
I just checked and it's not so something must be wrong here. Man getting everything set up properly is a major pain in the butt.

I must be missing something or done something wrong again.

What does this part in bold mean from the output?

Code:
1>Performing Custom Build Step
1>'ml' is not recognized as an internal or external command,
1>operable program or batch file.
1>Project : error PRJ0019: A tool returned an error code from "Performing Custom Build Step"
1>Build log was saved at "file://d:\My Documents\My Downloads\gsdx9\gsdx\Win32\Release\BuildLog.htm"
1>GSdx - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
__________________
Please visit my gaming and emulation forum and be part of a great community as well as partake in interesting discussions:



I'm looking for more staff & news posters for my forum, if you are interested PM me to see if you qualify for the position.

Also TheCloudOfSmoke is so cool, I think he is Jesus Christ Reborn.

Xtreme2damax is offline   Reply With Quote
Old March 27th, 2008   #11 (permalink)
refraction
PCSX2 Coder
 
refraction's Avatar
 
Join Date: Jan 2004
Location: Plymouth, UK
Posts: 9,215
ah crap, thats a problem.... ml is the microsoft asm compiler jobby, its related to the ASM files that are included in the project as far as im aware
__________________

http://www.generalemu.net/
Intel Core 2 Quad Q6600 @ 3.4Ghz (425x8), eVGA 8800GTX 768mb, 996Gb HDs, 2Gb Corsair DDR2-800 @ DDR2-1020 5-5-5-18 Dual Channel, 14605 3dMark 06 Points
CPU-Z Link
3dMark06 Score Link
Dont PM me for help, use the forums, thats what its for!



refraction is offline   Reply With Quote
Old March 27th, 2008   #12 (permalink)
Xtreme2damax
Suck My Crocodile
 
Xtreme2damax's Avatar
 
Join Date: Aug 2005
Location: In my bedroomz optimizing PCSX2 by kicking it in the nuts.
Posts: 1,426
Quote:
Originally Posted by refraction View Post
ah crap, thats a problem.... ml is the microsoft asm compiler jobby, its related to the ASM files that are included in the project as far as im aware
Is there a way to to compile it using VC++ Express or does that need the full Visual Studio version?

Is there any way I can find libraries and use it with Visual C++ Express that would be legal?

What should I do?

I am interested in compiling Gsdx because I'd like to fool around with it's source to see if I can work some magic or miracle.

I however don't have the money to purchase the full Visual Studio which is the main reason I'm using Visual Studio Express.

Would Visual Studio Express 2008 contain these features? Right now I'm only using Visual Studio Express 2005.
__________________
Please visit my gaming and emulation forum and be part of a great community as well as partake in interesting discussions:



I'm looking for more staff & news posters for my forum, if you are interested PM me to see if you qualify for the position.

Also TheCloudOfSmoke is so cool, I think he is Jesus Christ Reborn.

Xtreme2damax is offline   Reply With Quote
Old March 27th, 2008   #13 (permalink)
Bubbafat
The Reformed One
 
Bubbafat's Avatar
 
Join Date: Aug 2006
Location: Massachusetts
Posts: 884
Just "buy" a copy of it. joking obviously.
(dont ban me super moderaters)

Yeah, i may start AGAIN as i have a little more free time...
__________________
Bubbafat is offline   Reply With Quote
Old March 28th, 2008   #14 (permalink)
blueshogun96
Shogun3D Interactive (TM)
 
blueshogun96's Avatar
 
Join Date: Jun 2004
Location: Unidentified
Posts: 2,024
Just learning C++? And then jumping strait into DirectX? I think you're biting off more than you can chew if it's so hard for you. I recommend taking these steps first:

1. Learn C++ to the best of your ability. Don't be embarrased to work on win32 DOS style console apps either. Every beginner goes through that.
2. Learn the basics of Win32/64 programming. Get comfortable with the Win32 APIs and such. Try adding things to your window such as menus, text entry spaces, buttons, combo boxes, tabs, dialog boxes etc. It will make learning DirectX much easier (as far as the Win32 related things go).
3. Instead of learning DirectX, try using OpenGL and OpenAL instead if you feel DirectX is too hard to learn. Setting it up and programming with it is easier and doesn't expose much of the 3D vector math required to use it. With DirectX you need to know about multiplying matrixes and stuff like that. It's a good idea to learn that, but I'm just trying to make things easier for you.
__________________

[Sagat] Windows XP x64 Pro | AMD Athlon 3000+ (~2.0GHz) | NVIDIA GeForce 6600 PCI-E | Realtek AC97 Audio | 512MB Ram | NVIDIA NForce 4-4X chipset | Seagate HDD 160GB | LG 8614 DVD-ROM | HP DVD 1040d CD/DVD -/+ RW w/ LightScribe

GeneralEmu - December 27, 2005 and beyond!
My programming, emulation and Xbox blog! - Click or die! (Updated April 20, 2008)
Visit my YouTube page! http://www.youtube.com/blueshogun96
blueshogun96 is offline   Reply With Quote
Old March 28th, 2008   #15 (permalink)
cottonvibes
NGemu's Kawaii Neechan ;)
 
cottonvibes's Avatar
 
Join Date: Sep 2007
Location: USA
Posts: 1,582
well so far, it looks like hes just trying to compile GSdx

if he is trying to learn DX right away, i agree with you blueshogun96.
as a beginner myself, i'm still practicing some programs using the DOS console.
i havn't really found any good tutorials for DX yet though...
i want to start learning soon.

i mostly find source code for DX apps, but i can't find good tutorials that tell you what each line of code does.
i don't want to just type the code, and not know what it does :/
__________________
PC Specs: AMD X2 4400+ @ 2.921 Ghz, 1.47 vCore | G92 8800 GTS 512mb @ 740/1944| 4GB Dual Channel OCZ Memory @ 835 Mhz (5-4-4-15-2T) | 700 Watt PSU | DVD-RW Drive | 500 GB Hitachi SATA II Hard Drive, 30 GB & 40 GB Western Digital IDE Hard Drives | 1920x1080 40" LCD Flat Pannel HDTV monitor |
Consoles: 1 PS3 (60 GB), 2 PS2s, 1 PS, 3 GBAs, 1 GB, and 1 old school NES

Having troubles with PCSX2? Check out my guide to get it running correctly.
Running PCSX2 Guide for Noobs
cottonvibes is online now   Reply With Quote
Old March 28th, 2008   #16 (permalink)
SCHUMI-4-EVA
Devastating Force
 
SCHUMI-4-EVA's Avatar
 
Join Date: Jan 2007
Location: In the midst of an electricity crisis
Posts: 3,613
By the way seeing as ur a major beginner (not that I am any better) you may want to buy yourself some Sams teach yourself series programming books like "Teach yourself C++ in 21 days" .

I have one for VB6 (I never get past chapter 4 though before something distracts me...so I can still only do hello world stuff) and I think it's great....although I guess the more experienced guys here may not like them I guess....anyways just thought I would tell you about them...
__________________
AMD Athlon64 3700+ (2.2Ghz rated as 3.7Ghz Pentium), ASUS A8NE-FM (OEM), 4x512MB DDR400 RAM,
ATI Radeon X850XT (256MB GDDR3 PCIe), Seagate Barracuda 320GB SATA2 HDD, Windows XP SP2 Home,
Leadtek Winfast TV2000 XP Expert, Creative Sound Blaster Audigy Value
Get it right fools! The glass is HALF-EMPTY, not half-full!!!

!!! WARNING: Emulation requires a brain !!! WARNING: Emulation =/= Piracy !!!

The Champ has retired, but may his Legacy live on FOREVER !!!!
SCHUMI-4-EVA is offline   Reply With Quote
Old March 28th, 2008   #17 (permalink)
cottonvibes
NGemu's Kawaii Neechan ;)
 
cottonvibes's Avatar
 
Join Date: Sep 2007
Location: USA
Posts: 1,582
the problem with books for me, is that they're usually boring.

like my Java book i got for university, spends the 500 pages talking about class BankAccount, and how to modify its functions.

it was boring as hell, so i barely read it.

but theres probably books out there that are more entertaining.
i've seen some that are like "learn game programming in C++"
that might be more interesting.
__________________
PC Specs: AMD X2 4400+ @ 2.921 Ghz, 1.47 vCore | G92 8800 GTS 512mb @ 740/1944| 4GB Dual Channel OCZ Memory @ 835 Mhz (5-4-4-15-2T) | 700 Watt PSU | DVD-RW Drive | 500 GB Hitachi SATA II Hard Drive, 30 GB & 40 GB Western Digital IDE Hard Drives | 1920x1080 40" LCD Flat Pannel HDTV monitor |
Consoles: 1 PS3 (60 GB), 2 PS2s, 1 PS, 3 GBAs, 1 GB, and 1 old school NES

Having troubles with PCSX2? Check out my guide to get it running correctly.
Running PCSX2 Guide for Noobs
cottonvibes is online now   Reply With Quote
Old March 28th, 2008   #18 (permalink)
SCHUMI-4-EVA
Devastating Force
 
SCHUMI-4-EVA's Avatar
 
Join Date: Jan 2007
Location: In the midst of an electricity crisis
Posts: 3,613
Well that's what I like about Sams, they always have little projects and examples for you along the way, it's not just flatout theory.
__________________
AMD Athlon64 3700+ (2.2Ghz rated as 3.7Ghz Pentium), ASUS A8NE-FM (OEM), 4x512MB DDR400 RAM,
ATI Radeon X850XT (256MB GDDR3 PCIe), Seagate Barracuda 320GB SATA2 HDD, Windows XP SP2 Home,
Leadtek Winfast TV2000 XP Expert, Creative Sound Blaster Audigy Value
Get it right fools! The glass is HALF-EMPTY, not half-full!!!

!!! WARNING: Emulation requires a brain !!! WARNING: Emulation =/= Piracy !!!

The Champ has retired, but may his Legacy live on FOREVER !!!!
SCHUMI-4-EVA is offline   Reply With Quote
Old March 28th, 2008   #19 (permalink)
cottonvibes
NGemu's Kawaii Neechan ;)
 
cottonvibes's Avatar
 
Join Date: Sep 2007
Location: USA
Posts: 1,582
but you said so yourself that you never can get past ch.4 lol
so i'm assuming its pretty boring as well