Cohsty243 Posted February 16, 2009 Share Posted February 16, 2009 I found an article on the internet but i dont remember the URL. It helped with compiling on Visual C++ 2008. To compile the Vanilla Source code for JKA in Visual C++ 2008 follow these steps: 1. Open up JKA_mp(SDK).sln, it will ask you if you want to convert, click yes. 2. Open up the file named "q_shared.h". Look for this: float powf ( float x, int y ); 3. add #undef powf above it so it looks like this: #undef powf float powf ( float x, int y ); 4. Open up "q_math.c" and find this: float powf ( float x, int y ) { float r = x; for ( y--; y>0; y-- ) r = r * r; return r; } 5. Add #undef powf above this one too. #undef powf //VS2008 fix float powf ( float x, int y ) { float r = x; for ( y--; y>0; y-- ) r = r * r; return r; } we are doing this because Visual C++ 08 already has this function defined, so we can undefine this. Next we need to remove all the win32 folders from our solution. Like this: Remove the win32 folder from JK2cgame, JK2game, and ui. Don't forget to save the solution! lol. Now when you compile you will get a lot of warnings, those can be ignored, i don't know how to get rid of those lol. I hope this saves a lot of trouble for any new guys. this helped me a lot. I was very thankful when i found this info. Link to comment Share on other sites More sharing options...
DarthDie Posted February 17, 2009 Share Posted February 17, 2009 You can also download the 2005 version of the source (unless thats what your using...?) and it should fix all the errors, 2008 will upgrade the files to work in VC++ 2008. http://files.filefront.com/JA+codemp+2005zip/;7940604;/fileinfo.html Link to comment Share on other sites More sharing options...
nizwiz Posted February 17, 2009 Share Posted February 17, 2009 ... Now when you compile you will get a lot of warnings, those can be ignored, i don't know how to get rid of those lol... Try and add this at the top of q_shared.h: #pragma warning(disable : 4996) Link to comment Share on other sites More sharing options...
BobaFettUU Posted February 20, 2009 Share Posted February 20, 2009 Next we need to remove all the win32 folders from our solution. There isn't any need to remove the win32 folders, all they contain is the resource file which contains the version information of the dll's (which you'll see when you check the properties of the dll) Another fix for powf is this: Find: float powf ( float x, int y ) { float r = x; for ( y--; y>0; y-- ) r = r * r; return r; } and replace it with: float Q_powf ( float x, int y ) { float r = x; for ( y--; y>0; y-- ) r = r * r; return r; } Now a lil info about this powf thing: This is the power of function (ya know.. 2^4 = 2*2*2*2 = 16) Issue is that the powf that comes with JA's SDK is a simplified and broken version of it, only accepting integer exponents above 0. <math.h> which is part of the C standard library, has a properly functioning powf, which is where you get a name clash. Now powf is only used for the third person camera interpolation. Results of using the SDK's powf is a stiff and rough camera motion, using the real powf results in a smoothened and interpolated camera motion. So this is just a matter of what you prefer, or better yet, make a cvar to toggle between the real powf and the Q_powf. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.