Jump to content
  • Advertisement

Archived

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

OoMMMoO

Directx problem

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

I have set up mvc++ like the docs that come with directx tell you to. but every time I try and compile my program even if it is just void main() {} it gives me this error c:\program files\microsoft visual studio\myprojects\test\main.cpp(52) : fatal error C1010: unexpected end of file while looking for precompiled header directive I have tried going to the projects->settings->c/c++ tab and went to the precompiled headers section and clicked on not using precompiled headers like someone had suggested but when I did that I got errors saying it did not recomend the directx commands Can someone please help

Share this post


Link to post
Share on other sites
Advertisement
Can you tell us which headers you include ? Show us the whole code.

Without < windows.h > i'm not sure dx stuff can compile.



Prosper / LOADED corporation

Edited by - Prosper/LOADED on May 18, 2000 10:07:38 AM

Share this post


Link to post
Share on other sites
If you created the project with AppWizard generated source code. The program expects to find #include "stdafx.h" at the beginning of each cpp file. You can remove this behavior by going into the project settings and removing the compiler switch /Yu"stdafx.h" (under the C/C++ tab).



- WitchLord

Share this post


Link to post
Share on other sites
Off the top of my head, I had similair messages about precompiled headers when I started to use MFC.

If you are writing a ''main()'' procedure, are you sure you selected ''Console Application'' for your project type?

If you are writing a windows application, use either the MFC AppWizard (only if you want to utilise Microsoft Foundation Classes) to write window style applications such as installation programs, or the Win32 Application for writing your game!!!

If you are new to VC++ and Windows Programming (even if you are a C++ veteran), the MFC AppWizard can be luring because it''s the only project option that has ''exe'' in brackets next to it - MFC AppWizard (exe)

Also, the entry point for a windowed C++ program is WinMain(), not main().

Hope this helps.

Marty.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!