Pages: [1]
  Print  
Author Topic: Source code form linux tarballs won't compile on Windows XP visual studio 2003  (Read 21718 times)
AceLondon
Nub


Cakes 0
Posts: 3


« on: February 22, 2007, 11:21:41 AM »

Hi,
  I just downloaded the latest tarballs and tried to compile:
ioq3-svn982/code/win32/msvc/quake3.sln;
Using Visual Studio 2003 .NET which has the C++ compiler version 7.1;

The first error I got seemed to be from q_shared.h defining intptr_t as a typedef.  I tried to change that to just include stddef.h and io.h:
So on line 114 of q_shared.h I now have:
#ifdef Q3_VM
   //typedef int intptr_t;
#include <stddef.h>
#include <io.h>
#else

I got the above solution by searching the web.  I don't know if it is correct to use it.

Even with the above fix (which may be questionable to start with) I still have tons of compile errors for qcommon.h, here are the first few:
open_arena\source\ioq3-svn982\code\qcommon\qcommon.h(320): error C2059: syntax error : ')'
open_arena\source\ioq3-svn982\code\qcommon\qcommon.h(320): error C2059: syntax error : ')'
open_arena\source\ioq3-svn982\code\qcommon\qcommon.h(321): error C2059: syntax error : ')'
open_arena\source\ioq3-svn982\code\qcommon\qcommon.h(332): error C2059: syntax error : ')'
open_arena\source\ioq3-svn982\code\qcommon\qcommon.h(333): error C2059: syntax error : ')'
open_arena\source\ioq3-svn982\code\qcommon\qcommon.h(337): error C2059: syntax error : ')'
open_arena\source\ioq3-svn982\code\qcommon\qcommon.h(974): error C2059: syntax error : ')'
open_arena\source\ioq3-svn982\code\qcommon\qcommon.h(975): error C2059: syntax error : ')'
open_arena\source\ioq3-svn982\code\qcommon\qcommon.h(975): error C2059: syntax error : ')'
open_arena\source\ioq3-svn982\code\qcommon\qcommon.h(320): error C2059: syntax error : ','
open_arena\source\ioq3-svn982\code\qcommon\qcommon.h(332): error C2059: syntax error : ';'
open_arena\source\ioq3-svn982\code\qcommon\qcommon.h(333): error C2059: syntax error : ';'
open_arena\source\ioq3-svn982\code\qcommon\qcommon.h(337): error C2059: syntax error : ';'
open_arena\source\ioq3-svn982\code\qcommon\qcommon.h(345): error C2059: syntax error : '}'
open_arena\source\ioq3-svn982\code\qcommon\qcommon.h(332): error C2061: syntax error : identifier 'intValue'
open_arena\source\ioq3-svn982\code\qcommon\qcommon.h(333): error C2061: syntax error : identifier 'intValue'
open_arena\source\ioq3-svn982\code\qcommon\qcommon.h(337): error C2061: syntax error : identifier 'x'
open_arena\source\ioq3-svn982\code\qcommon\qcommon.h(320): error C2081: 'intptr_t' : name in formal parameter list illegal
open_arena\source\ioq3-svn982\code\qcommon\qcommon.h(333): error C2081: 'intptr_t' : name in formal parameter list illegal
open_arena\source\ioq3-svn982\code\qcommon\qcommon.h(974): error C2081: 'intptr_t' : name in formal parameter list illegal
open_arena\source\ioq3-svn982\code\qcommon\qcommon.h(320): error C2091: function returns function
open_arena\source\ioq3-svn982\code\qcommon\qcommon.h(974): error C2091: function returns function
open_arena\source\ioq3-svn982\code\qcommon\qcommon.h(320): error C2143: syntax error : missing ')' before '('
open_arena\source\ioq3-svn982\code\qcommon\qcommon.h(974): error C2143: syntax error : missing ')' before '('
open_arena\source\ioq3-svn982\code\qcommon\qcommon.h(320): error C2143: syntax error : missing ')' before '*'
open_arena\source\ioq3-svn982\code\qcommon\qcommon.h(320): error C2143: syntax error : missing ')' before '*'
open_arena\source\ioq3-svn982\code\qcommon\qcommon.h(974): error C2143: syntax error : missing ')' before '__cdecl'
open_arena\source\ioq3-svn982\code\qcommon\qcommon.h(975): error C2143: syntax error : missing ')' before '__cdecl'
open_arena\source\ioq3-svn982\code\qcommon\qcommon.h(332): error C2143: syntax error : missing ')' before 'identifier'
open_arena\source\ioq3-svn982\code\qcommon\qcommon.h(333): error C2143: syntax error : missing ')' before 'identifier'
open_arena\source\ioq3-svn982\code\qcommon\qcommon.h(337): error C2143: syntax error : missing ')' before 'identifier'
open_arena\source\ioq3-svn982\code\qcommon\qcommon.h(975): error C2143: syntax error : missing ';' before '__cdecl'
open_arena\source\ioq3-svn982\code\qcommon\qcommon.h(320): error C2143: syntax error : missing '{' before '*'
open_arena\source\ioq3-svn982\code\qcommon\qcommon.h(320): error C2143: syntax error : missing '{' before '*'
open_arena\source\ioq3-svn982\code\qcommon\qcommon.h(328): error C2143: syntax error : missing '{' before '__cdecl'
open_arena\source\ioq3-svn982\code\qcommon\qcommon.h(974): error C2143: syntax error : missing '{' before '__cdecl'
open_arena\source\ioq3-svn982\code\qcommon\qcommon.h(332): error C2144: syntax error : '<Unknown>' should be preceded by '<Unknown>'


Any help?  I really wanted to compile and play the game on Windows.  Thank you for any help/suggestions.  It would be a great help if someone ran into this same problem and has a solution.

Logged
Redshirt
Darwin Award: Posting warez on Free Software forums while also running a certain very license-and-copyright infringing "GPL" game.
Nub


Cakes 0
Posts: 29



WWW
« Reply #1 on: February 22, 2007, 01:19:19 PM »

Try compiling with MinGW.. it's a real pain to get it to compile under visual studio
Logged

dmn_clown
Posts a lot
*

Cakes 1
Posts: 1324


« Reply #2 on: February 22, 2007, 02:39:28 PM »

What's wrong with downloading the Windows .exe?
Logged

AceLondon
Nub


Cakes 0
Posts: 3


« Reply #3 on: February 22, 2007, 03:21:14 PM »

The whole point of having a GPL game is to be able to download it, modify it, and compile/run it yourself!  I haven't tried using Mingwin yet.  I'm a heavy Visual Studio 2003 user and I don't want to have to learn a new IDE just to compile this one project.  Please, anyone who has compiled the source code on Visual Studio let me know how to get around these compliation issues.  If I figure it out I'll post the solution to this thread.

Are the Linux tarballs different from the svn/cvs source?  I tried downloading the SVN source code but the trunk is empty and has no files in it???  Also, would it be possible to compile the Quake3 engine source code from ID and just use the artwork from the Open Arena .pak files with that executable?
Logged
dmn_clown
Posts a lot
*

Cakes 1
Posts: 1324


« Reply #4 on: February 22, 2007, 04:06:35 PM »

The whole point of having a GPL game is to be able to download it, modify it, and compile/run it yourself!  I haven't tried using Mingwin yet.  I'm a heavy Visual Studio 2003 user and I don't want to have to learn a new IDE just to compile this one project.  Please, anyone who has compiled the source code on Visual Studio let me know how to get around these compliation issues.  If I figure it out I'll post the solution to this thread.

Not really, the GPL was written to share knowledge of how something was done and to allow changes when it didn't work as expected.  As ioq3 is mainly coded by GNU/Linux coders, it would stand to reason that MinGW would be the libs that they use.  It is the easiest way to get a cross platform compile from within a GNU/Linux environment.  If you don't want to learn another IDE then simply install Cygwin and run make from within that, no learning necessary, though it is far easier to just download the windows .exe.  No one is going to take your geek points away from you for doing so (-;

Quote
Are the Linux tarballs different from the svn/cvs source?  I tried downloading the SVN source code but the trunk is empty and has no files in it???  Also, would it be possible to compile the Quake3 engine source code from ID and just use the artwork from the Open Arena .pak files with that executable?

0.6 was released several months ago, much has changed since.  Try the svn without the added /trunk (-:
Logged

AceLondon
Nub


Cakes 0
Posts: 3


« Reply #5 on: February 23, 2007, 10:21:21 AM »

ok, I downloaded mingwin and msys and tried to compile the latest source from SVN.  I get this error now from running a straight out make:

code/win32/win_wndproc.c: In function `WIN_DisableAltTab':
code/win32/win_wndproc.c:58: error: `SPI_SCREENSAVERRUNNING' undeclared (first u                                                                             se in this function)
code/win32/win_wndproc.c:58: error: (Each undeclared identifier is reported only                                                                              once
code/win32/win_wndproc.c:58: error: for each function it appears in.)
code/win32/win_wndproc.c: In function `WIN_EnableAltTab':
code/win32/win_wndproc.c:75: error: `SPI_SCREENSAVERRUNNING' undeclared (first u                                                                             se in this function)
make[1]: *** [build/release-mingw32-x86/client/win_wndproc.o] Error 1
make[1]: Leaving directory `source/ioq3-svn982'
make: *** [build_release] Error 2

Any ieads on how to fix this???
Logged
DieparBaby
Nub


Cakes 0
Posts: 6


« Reply #6 on: February 23, 2007, 11:04:09 AM »

Yep.  Change SPI_SCREENSAVERRUNNING to SPI_SETSCREENSAVERRUNNING.  You'll have to do it twice, once in WIN_DisableAltTab and once in WIN_EnableAltTab.

On a related note, I've been cross-compiling on Linux for Windows but I've never been able to successfully see the changes on Windows.  What files do I need to run the mod on windows if I've cross compiled on Linux?  Just the .exe or also some of the dlls?

Sincere thanks,
DieparBaby
Logged
dmn_clown
Posts a lot
*

Cakes 1
Posts: 1324


« Reply #7 on: February 23, 2007, 11:13:04 AM »

Before you do that, though, you should download the latest ioq3 sources and patch it with the diff from your tarball.  There is a buffer overflow in our current engine )-:

I think to run it on windows you need the dlls installed.
Logged

DieparBaby
Nub


Cakes 0
Posts: 6


« Reply #8 on: February 23, 2007, 11:20:22 AM »

Please excuse my ignorance, but where would I put the dlls?  I tried putting them in openarena/source and then running "ioquake +set fs_game source" but that didn't work.  It didn't load any of the dlls.
Logged
Blaenk
more like blank dumb
Lesser Nub


Cakes 0
Posts: 135



« Reply #9 on: February 23, 2007, 06:25:55 PM »

Wow, er, uh...

You can still use Visual Studio. I use visual studio on windows because I have a paid version, otherwise I would use Visual Studio Express, I like Visual Studio, it does help to know gcc (mingw) though, as it helps when compiling on other platforms. Anyways, I haven't tried to compile this particular source. But I figure you simply have to svn, extract the ioquake3 source archive, and apply the patch with something like WinMerge or something.

As for running on windows (And anywhere where wine can run), simply create a tree like this:

/somefolder/binary.exe
/somefolder/baseoa/all three dll's and all of the pk3's

Then you're set. You can run this easily using wine or natively on windows. And yeah I think you should be able to compile id's release source and use oa pk3's, though I don't recommend it. Instead do what I mentioned above.
Logged
hc
Nub


Cakes 0
Posts: 10


« Reply #10 on: September 24, 2007, 05:58:48 AM »

Hi!

Maybe this is a solution to use Visual Studio:
http://www.anupshinde.com/articles/quaked/others/vcpp6inst.htm

I've found it here: http://www.codeproject.com/directx/QuakeD.asp

I don't know if it works because I've never tried it. I've used MinGW.

Steeve
Logged
next_ghost
Half-Nub


Cakes 0
Posts: 76


« Reply #11 on: September 24, 2007, 06:05:49 AM »

The first error I got seemed to be from q_shared.h defining intptr_t as a typedef.  I tried to change that to just include stddef.h and io.h:
So on line 114 of q_shared.h I now have:
#ifdef Q3_VM
   //typedef int intptr_t;
#include <stddef.h>
#include <io.h>
#else

Stupid idea. QVMs run in a virtual machine that doesn't care about the real operating system. That's why they don't include system headers. Revert the changes and post here the original error message.

Please excuse my ignorance, but where would I put the dlls?  I tried putting them in openarena/source and then running "ioquake +set fs_game source" but that didn't work.  It didn't load any of the dlls.

It's openarena/source/vm/
« Last Edit: September 24, 2007, 06:08:42 AM by next_ghost » Logged
iLeft.bye
Member


Cakes 1
Posts: 187



« Reply #12 on: September 24, 2007, 06:25:11 AM »

nice necro
my advice: learn to use mingw and try to live without an ide
Logged
Pages: [1]
  Print  
 
Jump to: