Skip to main content
gamedev.net
🔒 Locked

ddutil.cpp

Started by FrigidHelix 5 replies 650+ views
Original Post
FrigidHelix
FrigidHelix
I want to use the functions in ddutil.cpp, but whenever I try to compile with it in my project, i get the error "unexpected end of file while looking for precompiled header directive Error executing cl.exe." Any ideas how to fix this?
Semaphore
Semaphore
quote:
Original post by FrigidHelix

I want to use the functions in ddutil.cpp, but whenever I try to compile with it in my project, i get the error "unexpected end of file while looking for precompiled header directive
Error executing cl.exe."

Any ideas how to fix this?


It sounds like you are using MFC(?). If so, #include "stdafx.h" (or whatever your PCH file is) at the top of the file.

Cheers,

Jeremy
ChMar
ChMar
Hi,

You have created your project with the wizard. So your project has been linked with StdAfx.h and StdAfx.cpp. You should copy the code from the ddutil.cpp in to the StdAfx.cpp. It''s work but I don''t know how to do else.

Hope this help, ChMar
ChMar
TheLabRat
TheLabRat
I used to keep running into this problem as well and it really pissed me off, just go to the project->settings-> and then I think it''s the link tab and there is a line something like /Yu stdafx.h? remove this.

Hope it helps
Chris
Cyberdrek
Cyberdrek
Are you also including ddutils.h in your .cpp file? if not, you need to call it as all the definitions of the functions and classes for ddutils.cpp are in that file.

Cyberdrek
Headhunter Soft
DLC Multimedia
[Cyberdrek | ]
Houdini
Houdini
The problem is you created your project using Precompiled Headers. When you create your project this way, you must include "stdafx.h" in all your .cpp files.

If you want to disable the Precompiled Headers, then goto Project->Settings, click on the C/C++ tab, choose Precompiled Headers in the Category section, then click on the Not Using Precompiled Headers radio button. Feel free to take out the #include "stdafx.h" from the rest of your .cpp files now.
Houdini

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.