Jump to content

View more

Image of the Day

Boxes as reward for our ranking mode. ヾ(☆▽☆)
#indiedev #gamedev #gameart #screenshotsaturday https://t.co/ALF1InmM7K
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Does DirectX work with Dev-C++ 4.0?

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
4 replies to this topic

#1 wcmike   Members   

122
Like
Likes
Like

Posted 30 June 2001 - 08:26 PM

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.

#2 deadlinegrunt   Members   

123
Like
Likes
Like

Posted 30 June 2001 - 09:41 PM

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


#3 draqza   Members   

122
Like
Likes
Like

Posted 01 July 2001 - 07:12 AM

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.

#4 Beer Hunter   Members   

712
Like
Likes
Like

Posted 01 July 2001 - 11:42 AM

DirectX 8 libraries for gcc.

To add the -fvtable-thunks, just open the project options, and there''s an "extra compiler options" box.

#5 wcmike   Members   

122
Like
Likes
Like

Posted 01 July 2001 - 02:52 PM

Yes! It works now. Thank you very much. All I had to do was pass the fvtable-thunks argument to the compiler.




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.