Advertisement

Half-Life 2 Mod not compiling

Started by January 21, 2005 04:07 PM
8 comments, last by perfectly_dark 20 years, 1 month ago
Hello, This is my first attempt at a mod of any kind so I followed the instructions in http://www.valve-erc.com/srcsdk/MyFirstMod.htm (My First Mod), however, when I try to compile I get an error message: ai_trackpather.cpp(735) : fatal error C1010: unexpected end of file while looking for precompiled header directive I'm using Visual Studio .NET 2003. I don't make any changes to the code, the SDK created files fail to compile. Google didn't give me any answers, I was just wondering if anyone else has had this problem or knows how to fix it. Thanks
I remember having same kind of problems. Try http://collective.valve-erc.com/ and search the forum for possible solutions.
Ad: Ancamnia
Advertisement
I already had a look there...even posted the same question yeasterday but no replies (like 10 views...:() Good to know I'm not the only one, did you ever fix it tentoid?
Though I've never modded HL2 (only a game called Bridge Commander), it sounds like you are missing a #endif tag (presuming it's a C like language and you are using a inclusion guards). Mostlikly in a header file.

Or something else that is multi line and requires an opening and a closing keyword .
The strange thing is that I didn't touch the code at all...so it should compile, and it's not like I can fix it because the file ai_trackpather.cpp seems to be binary when I open it, I guess its already compiled (if that makes any sense).
Try setting 'not using pre-compiled headers' in the project settings. That usually eliminates this error.
Advertisement
Quote:
Try setting 'not using pre-compiled headers' in the project settings. That usually eliminates this error.


Yes, I've tried that too, however, I then get different errors as I think that the SDK creates a project with precompiled headers.
Have you tried including the precompiled headers, that is writing the line

#include "stdafx.h"

at the top of your *.cpp-file.


Lizard
I don't think it even uses stdafx.h as it's configured to use a file called cbase.h. In any case, it's valve's code, I don't think it's a coding bug, especiall since I seem to be mostly alone. The file that the error occurs in is ai_trackpather.cpp. I've now discovered that it is not binary but for some reason VS was opening it using the hex editor. So I opened as a normal text file and I believe that I'm missing the top part of the file :( That's probably what's causing it. Anyone know how I can get that one file?
ok, after a lengthy reinstall of the SDK, it appears to be working. Thanks for all the replies!

This topic is closed to new replies.

Advertisement