JACoders / OpenJK

Community effort to maintain and improve Jedi Academy (SP & MP) + Jedi Outcast (SP only) released by Raven Software
GNU General Public License v2.0
2.01k stars 612 forks source link

Can't compile: snd_dma.cpp, "Cannot open include file: inttypes.h" #571

Closed dusty22 closed 10 years ago

dusty22 commented 10 years ago

I keep getting that error whenever I try to build my dlls.

I'm only trying to compile the SP parts of the game, namely, the jagamex86.dll and jasp.exe, and obviously as you can tell the file is a C++ one (hence it is for SP). The .exe is the file that won't build so it's part of the jasp.exe.

Eezstreet said he was getting a similar error but didn't elaborate. Are there files I need from other parts of the game besides SP? I tried to compile using VS 2012 unaware that I needed 2013, but I'm assuming Eez is using 2013 and he still got that error...

xycaleth commented 10 years ago

This would probably be more suited to the OpenJK forum on JKHub, but I'll answer here anyway.

The problem is that versions of Visual Studio below the 2013 edition do not have the inttypes.h header. So there's two solutions to this.

  1. Download and install Visual Studio 2013 (you'll want Visual Studio Express 2013 for Windows Desktop), and use that instead to compile the code. OR
  2. Download the inttypes.h headers and copy them into code/qcommon and compile again.

Both solutions work fine, but arguably if there's a newer version of Visual Studio available, then there's not much reason not to upgrade. The benefits of having a newer, faster and probably more stable IDE and compiler are good things to have.

ensiform commented 10 years ago

Direct link to the header that is always up to date: https://msinttypes.googlecode.com/svn/trunk/inttypes.h

You don't need the stdint.h, already included in 2010+

Preferably better to place inttypes.h in your compiler folder:

C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include <- this is 2010

C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include <- this is 2012

The WIKI page already describes this as being the case here: https://github.com/JACoders/OpenJK/wiki/Compilation-guide#windows

And this was changed all the way back in March (only May 10th for SP though), not sure why you're just noticing it now ._.

ensiform commented 10 years ago

Please acknowledge when you've taken the steps to fix it on your end so we can close this.