Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

newbie

MSVC++6.0 Help Needed (WARNING:Very Long).

This topic is 6887 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Guest Anonymous Poster
Try changing the place of your c:\mssdk\lib & c:\mssdk\include to the first line. That should do it!

if things don't get right, try copy over everything
from c:\mssdk\include\*.* to ...\VC\include
AND c:\mssdk\lib\*.* to ...\VC\lib\

Share this post


Link to post
Share on other sites
Advertisement
MSVC++6.0 Standard Ed Help Needed (WARNING: Very Long).

Hello,

I am attempting to compile the introductory program (pong) that comes with Trick's of the Windows Game Programming Gurus. by Andre LaMothe.


/*******************************************/
I am getting the following error compiler error when I select Build..., freakout.exe

--------------------Configuration: freakout - Win32 Debug--------------------
Compiling...
blackbox.cpp
c:\program files\microsoft visual studio\myprojects\freakout\blackbox.h(34) : error C2146: syntax error : missing ';' before identifier 'lpdd'
c:\program files\microsoft visual studio\myprojects\freakout\blackbox.h(34) : fatal error C1004: unexpected end of file found
freakout.cpp
c:\program files\microsoft visual studio\myprojects\freakout\blackbox.h(34) : error C2146: syntax error : missing ';' before identifier 'lpdd'
c:\program files\microsoft visual studio\myprojects\freakout\blackbox.h(34) : fatal error C1004: unexpected end of file found
Error executing cl.exe.

freakout.exe - 4 error(s), 0 warning(s)


The compiler points me to the offending line

extern LPDIRECTDRAW4 lpdd; // dd object

/*******************************************/
The book that I purchased came with a DirectX SDK. I installed the SDK to the default directory that is called

C:\mssdk


/*******************************************/
I have gone to Tools..., Options..., Directories..., At the Directories tab the compiler allows me to set pathing options for
1. Executable files
2. Include files
3. Library files
4. Source files

I have added C:\mssdk\lib to options 2(Include files) and 3(library files)


/*******************************************/
I have also gone to the C:\mssdk\lib folder and taken note of the DirectX *.lib files that were installed. They are as follows,

ddraw.lib d3dim.lib d3drm.lib d3dxof.lib dinput.lib dplayx.lib dsetup.lib dsound.lib dxguid.lib

I have gone to Project..., Settings..., Object/library modules: and added the above .lib components, to the standard .lib components already there.

Note: I have also added winmm.lib as suggested in the text.


/*******************************************/Project structure. There was a new workspace created, called freakout.

In the file view of the VC++ compiler the project freakout files is a node of Workspace freakout. There is only one project on this entire workspace.

The Source Files directory holds the blackbox.cpp and freakout.cpp source code. An actual hard copy not just a pointer.

The Header Files directory holds the blackbox.h source code. As above this is a hard copy not just a pointer.

The Resource Files directory is empty.


/*******************************************/
If anyone has any ideas or suggestions on what I could try to eliminate the above error I would be most thankful.

Kind Regards
Mark


Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Thank you

The program now works! (WooHoo Pong) I had my original search paths for c:\mssdk\lib at the top of the tree structure in Tools..., Options..., Directories..., The change that I made was that I ADDED the path c:\mssdk\include to the search path.

This is just a question for curiosities sake. I have looked at the files in the directory c:\mssdk\include, inside are a panoply of examples and only THREE files that are NOT such examples, they are d3devec.inl, dxsdk.inc, rmxftmpl.x What I don’t understand is the importance of these three files in making my program work.

I hope to work some of these mysteries out as I move into more involved programming with the SDK. I’m starting to ramble now and, thanks again for giving me something to work with.

Cheers
Mark.K

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!