Does DirectX work with Dev-C++ 4.0?
Hello,
I purchased the book "Windows Game Programming for Dummies" and it came with a CD that includes the DirectX 5 SDK. Even though its a little old, I figured I''d use that. I am using Dev-C++ 4.0 on Windows 98 and I simply cannot get any DirectX programs to work! First I made my own simple program, and I get 31 errors. So I try compiling example programs that came on the CD, and I still get 31 errors.
I get tons of errors that look like this:
C:\DEV-C_~1\INCLUDE\objidl.h:367: `com_interface'' only supported with -fvtable-thunks
C:\DEV-C_~1\INCLUDE\objidl.h:367: warning: `com_interface'' attribute directive ignored
Like I said, there are tons of these. I''ve heard that DirectX only works with MSVC++. Is that true?
Thank you for any help you may be able to offer.
I''ve never used Dev-C++ but I''ll try to help out here:
For starters when you compile your project you are going to have to pass the argument -fvtable-thunks when calling the compiler. The error message "`com_interface'' only supported with -fvtable-thunks" is telling you that. The warning following it in your post will go away with that as well.
Now some things that you haven''t mentioned that may also be a problem are going to be things like:
You get everything to compile but now have linker errors. The most common problem is that you aren''t including the libraries you need to link with, namely the libdxguid.a, but possibly others ( like libd3d.a for example )
That''s about all I can think of at the moment. Hope it helps instead of make things worse.
YAP-YFIO
-deadlinegrunt
For starters when you compile your project you are going to have to pass the argument -fvtable-thunks when calling the compiler. The error message "`com_interface'' only supported with -fvtable-thunks" is telling you that. The warning following it in your post will go away with that as well.
Now some things that you haven''t mentioned that may also be a problem are going to be things like:
You get everything to compile but now have linker errors. The most common problem is that you aren''t including the libraries you need to link with, namely the libdxguid.a, but possibly others ( like libd3d.a for example )
That''s about all I can think of at the moment. Hope it helps instead of make things worse.
YAP-YFIO
-deadlinegrunt
~deadlinegrunt
We had a discussion about this once before, on one of the old boards, but I don''t remember which one it was or where it might be now. Dev-C++ uses a GCC compiler (mingw32 or something like that), so you can''t compile DirectX natively like you can in MSVC++. But never fear...there''s still a way. There was an article somewhere on flipcode about compiling DX with GCC--it involves getting a separate set of libraries or something. I''ll try to find a link back to the article if you can''t find it yourself; the article explains setting up everything to compile dx with GCC.
WNDCLASSEX Reality;......Reality.lpfnWndProc=ComputerGames;......RegisterClassEx(&Reality);Unable to register Reality...what's wrong?---------Dan Uptonhttp://0to1.orghttp://www20.brinkster.com/draqza
DirectX 8 libraries for gcc.
To add the -fvtable-thunks, just open the project options, and there''s an "extra compiler options" box.
To add the -fvtable-thunks, just open the project options, and there''s an "extra compiler options" box.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement