Qhimm.com Forums

Miscellaneous Forums => Archive => Topic started by: FaustWolf on 2007-11-06 15:16:23

Title: Compiling FF9 Viewer from source code - FF9Viewer.pch missing?
Post by: FaustWolf on 2007-11-06 15:16:23
Hey all. I'd like to use Qhimm's FF9Viewer to pull some model data from the game if possible. Qhimm stated in a previous post that he used Microsoft Visual C++ to develop the utility and he posted source code back in 2002 I believe.

I'm attempting to compile in Microsoft Visual C++ 2005 Express Edition, and it's telling me that I need a precompiled header called FF9Viewer.pch, which appears to be missing. Qhimm or anyone else who's successfully compiled the program, any tips for a noob?

The source code Qhimm posted is below. Thanks to Vehek for pointing it out to me.
http://www.qhimm.com/ff9viewer_src.zip
Title: Re: Compiling FF9 Viewer from source code - FF9Viewer.pch missing?
Post by: Synergy Blades on 2007-11-06 16:46:46
I use Visual Studio .net as an IDE, so you'll have to look for a similar setting if it's not exactly the same in 2005. Load the project, then go to Project > Properties (the window with all the compile and link options). Choose C/C++ (the compile properties), and under the category "Precompiled Headers", there should be an option similar to "Create/Use Precompiled Headers". Set this to "Not Using Precompiled Headers". Now build the project.
Title: Re: Compiling FF9 Viewer from source code - FF9Viewer.pch missing?
Post by: FaustWolf on 2007-11-06 17:54:45
Many thanks Synergy! I'm past the pch problem. Now my Visual C++ stops compiling because it detects hundreds of errors in the header (.h) files that come with Microsoft's own SDK platform. Silly Microsoft. :roll:

The main offenders in the "include" header directory are afxext.h, afxdlgs.h, and afxdisp.h. The versions I have were apparently coded on March 3, 2006 and are part of the "Microsoft Platform SDK for Windows Server 2003 R2." Anyone know of a source for these files that might contain less-buggy versions?
Title: Re: Compiling FF9 Viewer from source code - FF9Viewer.pch missing?
Post by: mirex on 2007-11-09 08:21:23
Hi.

there should be no errors in those files (well at least no errors that should you stop from compiling). You are probably missing some includes. Try to add #include "stdafx.h" to your main cpp file, and see if "stdafx.h" in your project contains #include <windows.h>

If you have any more problems, then get the project into single archive, place it somewhere on internet, and I'll get it for you into compilable state. I have VS2005 right here.
Title: Re: Compiling FF9 Viewer from source code - FF9Viewer.pch missing?
Post by: FaustWolf on 2007-11-10 15:53:02
Thanks for your attention to this matter, Mirex!

The CPP file I'm trying to compile (FF9Viewer.cpp) already has #include "stdafx.h", and I added #include <windows.h> to the various includes in stdafx.h

However, I'm still getting a huge number of errors, and my compiler refuses to go any further once the error count gets to 100.

Qhimm's original FF9Viewer source code is linked in my first post. It's in a single zip file, just as Qhimm originally posted it; is that okay?

Below is the error log I get (in .txt format) when I attempt to compile FF9Viewer.cpp, if you'd be interested in taking a look:

http://www.chronocompendium.com/Forums/index.php?action=dlattach;topic=4739.0;attach=1954

It's quite possible that I'm just cursed when it comes to compiling CPP source code. If you could investigate, I will be eternally greatful.