Jump to content
  • Advertisement

Archived

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

Woody FX

Direct X Error messages with VC++

This topic is 5980 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

Trying to recompile some code that was written for DirectX 7 but i''ve got DirectX 8 SDK installed and i''m gettin some errors I put the ole #define DIRECTDRAW_VERSION 0x0700 before #include ddraw.h But i''m still getting these some errors These are the defines and includes from the file that the errors appear to be from //include guard #ifndef DDFUNCS_H #define DDFUNCS_H #include <windows.h> #define DIRECTDRAW_VERSION 0x0700 #include "ddraw.h" #include "GDICanvas.h" This is the code the the error messages seems to point to /////////////////////////////////////////////////////////////////////////////// //Direct Draw Initialization/Cleanup functions /////////////////////////////////////////////////////////////////////////////// //create direct draw interface LPDIRECTDRAW7 LPDD_Create(HWND hWnd,DWORD dwCoopLevel); And here are the actual error messages!!! Deleting intermediate files and output files for project ''Littlerunningman - Win32 Debug''. --------------------Configuration: Littlerunningman - Win32 Debug-------------------- Compiling... DDFuncs.cpp c:\windows\desktop\gamedev\sourceiso\source\chapter10\isohex10_2\ddfuncs.h(65) : error C2146: syntax error : missing '';'' before identifier ''LPDD_Create'' c:\windows\desktop\gamedev\sourceiso\source\chapter10\isohex10_2\ddfuncs.h(65) : error C2501: ''LPDIRECTDRAW7'' : missing storage-class or type specifiers c:\windows\desktop\gamedev\sourceiso\source\chapter10\isohex10_2\ddfuncs.h(65) : fatal error C1004: unexpected end of file found GDICanvas.cpp IsoHex10_2.cpp c:\windows\desktop\gamedev\sourceiso\source\chapter10\isohex10_2\ddfuncs.h(65) : error C2146: syntax error : missing '';'' before identifier ''LPDD_Create'' c:\windows\desktop\gamedev\sourceiso\source\chapter10\isohex10_2\ddfuncs.h(65) : error C2501: ''LPDIRECTDRAW7'' : missing storage-class or type specifiers c:\windows\desktop\gamedev\sourceiso\source\chapter10\isohex10_2\ddfuncs.h(65) : fatal error C1004: unexpected end of file found TileSet.cpp c:\windows\desktop\gamedev\sourceiso\source\chapter10\isohex10_2\ddfuncs.h(65) : error C2146: syntax error : missing '';'' before identifier ''LPDD_Create'' c:\windows\desktop\gamedev\sourceiso\source\chapter10\isohex10_2\ddfuncs.h(65) : error C2501: ''LPDIRECTDRAW7'' : missing storage-class or type specifiers c:\windows\desktop\gamedev\sourceiso\source\chapter10\isohex10_2\ddfuncs.h(65) : fatal error C1004: unexpected end of file found Error executing cl.exe. Littlerunningman.exe - 9 error(s), 0 warning(s) Thanks Brain

Share this post


Link to post
Share on other sites
Advertisement
If you''d like a copy of the code i can send it to you!!

B_Doyle1@yahoo.com_NO_Spam or leave me your address!!

Thanking You

Share this post


Link to post
Share on other sites
Have you checked that the path of the DX7 SDK is before the VC include path? (Options/Directories/Include Files). If not you should change the order for your libs, too.
By the way, the DirectX forum would have been a better place for this post.

Edited by - VolkerG on February 7, 2002 10:00:30 AM

Share this post


Link to post
Share on other sites
Are you including dxguid.lib? Not sure if your code NEEDS it, but its sometimes needed for certain directx calls.

- Kevin "BaShildy" King
Game Programmer: DigiPen
www.mpogd.com

Share this post


Link to post
Share on other sites
quote:
Original post by Woody FX
Using DirectX SDK 8!! So i''m not sure what you mean by include the DD 7 stuff!!

VolkerG meant that the DX8 include directory must occur before the preconfigured MSVC include directories in the list of directories to search for include files. The reason for this is that MSVC comes with an old version of DX (3 or 5 I think), and the compiler will use whatever ddraw.h file it finds first.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Yeah i''ve done all of that.... Using Tanstaafl''s Isometric Book so i''ve done everything he said... but his code was writen for SDK 7.. and i cannot figure out how to get it workin with SDK 8 and no modifications.... except for putting in the #define direct_draw version 7


#ifndef DDFUNCS_H
#define DDFUNCS_H

Do i need to put something brfore the pieces of code(above) to tell it to reference DX7

Share this post


Link to post
Share on other sites
Yeah i''ve done all of that.... Using Tanstaafl''s Isometric Book so i''ve done everything he said... but his code was writen for SDK 7.. and i cannot figure out how to get it workin with SDK 8 and no modifications.... except for putting in the #define direct_draw version 7


#ifndef DDFUNCS_H
#define DDFUNCS_H

Do i need to put something brfore the pieces of code(above) to tell it to reference DX7

Share this post


Link to post
Share on other sites

That #define should do the trick for you.

Shouldn''t your #include "ddraw.h" be #include <ddraw.h> ?
And double check your syntax as well. A missing ; for example.

Guy

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!