Sign in to follow this  
IronGryphon

MSVC++ express (unmanaged) Win32 help

Recommended Posts

IronGryphon    324
Hello everyone. I was hoping to find a little help on something that is driving me out of my mind. I just started going over the book, Isometric Game Programming with DirectX 7.0 and need a little help. The base code the book uses to create the basic window is . . . let me change that. MSVC++ express is killing me. I've spent the last 2 hours searching the forums for like problems but no joy. Here is what I have tried to do. I keyed in the base code from the book and compiled. No errors, no warnings. The problem comes when I try to execute the program. Nothing happens. It compiles, and just stops. I have tried debug and release. With no errors I was baffled so to make sure I haven't lost my mind, I installed MSVC++ 2003 on my other computer and compiled and ran the file. It worked fine with all the same settings. So I went back and just created a default Win32 project and it compiled and executed fine. I am at a loss. So if there is anyone that could shed a little light on this I would be in your debt. Thanks.

Share this post


Link to post
Share on other sites
xEricx    572
Does the output window tell you anything interesting?

I've never tried MSVC Express, but it should behave pretty much like MSVC 2005.

Share this post


Link to post
Share on other sites
Xai    1848
take your empty base project that is working fine ...

then take your code, file by file from the 2003 project that is working fine, pasting it into the program.

see what happens.

the key here is having a project whose settings are a known quantity, and only adding source code. The second you have to make a different project or mess with library settings / linker settings etc, the problem grows exponentially.

If you do have to do one of those things, write what you do down on a little note pad in case that's where the problem lies.

Share this post


Link to post
Share on other sites
IronGryphon    324
The output from the build is

Linking. . .
Generating code
Finished generating code
Embedding manifest. . .
Build log saved at "blah blah blah"
Temp - 0 error(s), 0 warning(s)
============ Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

and debug output is says a "No symbols loaded" for ntdll.dll, kernel32.dll, user32.dll, gdi32.dll and exited with code 0 (0x0)

Share this post


Link to post
Share on other sites
yadango    567
if u post all your files, including the solution, perhaps one of us can try it and see if we get the same problem too or can fix it. though i am a little confused, so it compiles and builds the exe succesfully, but just refuses to run it from the IDE? what happens if you try to run the exe from explorer instead? then again , looking at your build log and the "exited with code 0 (0x0)" message, it sounds like your program is executing, but exiting early, which means a code problem. maybe it's one of those UNICODE gotchas when going from 2003 to 2005. i can only take wild guesses without seeing some code though.

[Edited by - yadango on May 17, 2006 5:01:42 AM]

Share this post


Link to post
Share on other sites
IronGryphon    324
Thanks for the reply. I have no idea what the problem could be at this point. Not using UNICODE so that isn't the issue. The code is the base code from the Isometric Game Programming with DirectX 7.0 book. I went ahead and keyed in the first d3d tutorial from the SDK and it did the same thing so it must be one of my compiler settings. I installed that tutorial and compiled and it worked fine so I am going to compare the projects and see what is different. If I find it, I'll post my solution.

Share this post


Link to post
Share on other sites
IronGryphon    324
Thanks for the reply but if you had read the posts above you would see that I don't have a problem with the default Win32 application. It will compile and execute as advertised. That isn't the problem. The problem is keying in from a blank project. Still checking my settings. Again, thanks for the reply.

Share this post


Link to post
Share on other sites
jpetrie    13162
So... have you actually tried debugging this program? Put a breakpoint on the first line of WinMain and start stepping through and see where things go awry?

I would caution against such haphazard solutions as copying files piecemeal; that can often cause more problems then it creates.

Share this post


Link to post
Share on other sites
jflanglois    1020
Quote:
I would caution against such haphazard solutions as copying files piecemeal; that can often cause more problems than it solves.

jfl.

Share this post


Link to post
Share on other sites
IronGryphon    324
[quote]Original post by jpetrie
So... have you actually tried debugging this program? Put a breakpoint on the first line of WinMain and start stepping through and see where things go awry? . . .
quote]

LMAO, I am an idiot but I guess you all have figured that out :) The code wasn't giving any errors because there was nothing wrong with it. I didn't put the ShowWindow() function in it so no window was displayed. Sorry for the trouble and thanks for the replies.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this