Author Topic: Visual C++ 2005  (Read 6023 times)

y00tz

  • Autococker
  • Posts: 2742
Visual C++ 2005
« on: April 02, 2007, 11:57:43 PM »
I checked 10 pages back for this topic and didn't see it, sorry if I'm bumping a dead discussion topic, but tonight I downloaded the source for DP as well as Visual C++ 2k5 Express Edition.  I'm a .net (c#) web developer and I only own visual c# of the 2005 .net line.. That's why I have the express of c++.  I'm curious if anyone has had any luck porting and compiling to 2005?

My specific error is:
Code: [Select]
1>gl_image.obj : error LNK2019: unresolved external symbol _jpeg_CreateDecompress referenced in function _LoadJPG
..repeated 65 times

Which is an OpenGL problem?

Here's what I've done so far:

Installed Visual C++ 2005
Installed DirectX SDK 9.0c feb 2k7 (for dinput.h.. ahh quake2 source  :-\)
Installed Platform SDK Windows Server 2k3, R2 (for winsock.h)

I imported ref_gl, and paintball2.. I skipped on gamex86 because if memory serves I can just pull that from one of Jitspoe's builds. 
I then set ref_gl as a dependency for paintball2, swapped the build order and compiled.

No dice.

If anyone can provide any feedback.. if I'm doing it right, if they got vs2005 to work w/ pb, etc. please reply.

Cheers,
y00tz

Zorchenhimer

  • Autococker
  • Posts: 2614
Re: Visual C++ 2005
« Reply #1 on: April 03, 2007, 08:25:14 AM »
Pball isn't written in C++, its written in C. Are you sure that Visual C++ 2005 can compile C?

y00tz

  • Autococker
  • Posts: 2742
Re: Visual C++ 2005
« Reply #2 on: April 03, 2007, 10:49:25 AM »
I appreciate the response  :)

And yea, I know it's C, which may be what's wrong, perhaps VC++ is trying to debug for C++, I don't know, but I'm under the impression that Visual C++ is a C/C++ compiler.

Thanks though Z  :)

I know Jitspoe uses (or did use a year ago) VS7 so I assumed VS8 would work... I may need to buy the standard or professional version of VC++, but I'd like to know for sure I can't do it with the Express Edition.

Zorchenhimer

  • Autococker
  • Posts: 2614
Re: Visual C++ 2005
« Reply #3 on: April 03, 2007, 11:53:45 AM »
Bloodshed's Dev-C++ is a nice C/C++ compiler. And its free. I havan't gotten a chance to actually mess around with it yet though.

y00tz

  • Autococker
  • Posts: 2742
Re: Visual C++ 2005
« Reply #4 on: April 03, 2007, 01:09:58 PM »
Yeah I've used Dev-C++, actually I'm still using it for some OpenGL stuff, but adding all the libraries from the PSDK and DirectX are going to be a pain, thanks for the help though.

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: Visual C++ 2005
« Reply #5 on: April 03, 2007, 04:47:36 PM »
You need to add the jpeg .lib file.  It should be included with the source.

y00tz

  • Autococker
  • Posts: 2742
Re: Visual C++ 2005
« Reply #6 on: April 03, 2007, 05:10:00 PM »

Aha! I suspected it had something to do with libjpeg.lib (in ref_gl), now umm, how do I go about adding that?

Thanks Jitspoe

Cheers,
y00tz


jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: Visual C++ 2005
« Reply #7 on: April 04, 2007, 01:10:31 PM »
It's somewhere in the linker options.  It should have been in there by default.  By the way, what are you trying to do with the code?  In the future we're going to start strictly enforcing standard versions to keep people from coding cheats into the game.  If you want a particular feature, you'd probably be best voting for it in the 2007 feature vote thread.  From another thread, it sounds like you wanted to change the console background.  This can be done without modifying the code.

y00tz

  • Autococker
  • Posts: 2742
Re: Visual C++ 2005
« Reply #8 on: April 04, 2007, 02:32:47 PM »
Quote
In the future we're going to start strictly enforcing standard versions to keep people from coding cheats into the game.

Cheat? I can't even compile much less cheat.  ;)

The problem with running an active game AND an open-source project is that the cheaters are usually fantastic with their own shards, if you will.
I don't know if it's possible in C, but what used in ASP for years is just to have a variable in only YOUR (the official) build, i.e. a checksum or hash of some type, that would have to be referenced against an official server's checksum/hash.
i.e.
client sends 13j12klj412j4312j3
server checks to see if 13j12klj412j4312j3 == 13j12klj412j4312j3
if true,
boolean pureclient == true;
else, false.

I'm sure you have a better idea or system integrated or you're working on, we just preferred this so that people could run their own builds of the client on servers that allowed, but our servers only supported the official build.

Quote
From another thread, it sounds like you wanted to change the console background.  This can be done without modifying the code.

Oh no, I was just wanting to define a new widget type that supported a JPEG background, etc.

Anyway, it's seeming to me that to build it in newer versions of VC++ isn't going to work, but I'll keep on trying.




jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: Visual C++ 2005
« Reply #9 on: April 04, 2007, 04:18:26 PM »
You should be able to use any image type that the game supports (jpg, pcx, or tga).

Arkismad

  • PGP
  • Posts: 7
Re: Visual C++ 2005
« Reply #10 on: September 02, 2007, 03:31:25 PM »
can someone please pos a link to the
Quote
Installed Platform SDK Windows Server 2k3, R2 (for winsock.h)

Zorchenhimer

  • Autococker
  • Posts: 2614

Arkismad

  • PGP
  • Posts: 7
Re: Visual C++ 2005
« Reply #12 on: September 02, 2007, 04:23:56 PM »
Ty bud ;)

Cobo

  • Autococker
  • Posts: 1362
Re: Visual C++ 2005
« Reply #13 on: September 02, 2007, 04:58:24 PM »
To install the platform sdk you'll want to do this since its not as easy as a download and instal:
http://msdn2.microsoft.com/en-us/express/aa700755.aspx

S8NSSON

  • Autococker
  • Posts: 709
Re: Visual C++ 2005
« Reply #14 on: September 02, 2007, 06:17:29 PM »
By the way, what are you trying to do with the code?  In the future we're going to start strictly enforcing standard versions to keep people from coding cheats into the game.  If you want a particular feature, you'd probably be best voting for it in the 2007 feature vote thread.

Open source, but don't mess with it, Jitspoe?

ViciouZ

  • Map Committee
  • Autococker
  • Posts: 2227
Re: Visual C++ 2005
« Reply #15 on: September 03, 2007, 10:21:58 AM »
maybe have pure/non-pure servers

Cobo

  • Autococker
  • Posts: 1362
Re: Visual C++ 2005
« Reply #16 on: September 03, 2007, 03:23:33 PM »
maybe have pure/non-pure servers
Problem with that is that it still requires Jitspoe to release the game source, which kind of defeats the purpose of it.

Deranged

  • 68 Carbine
  • Posts: 409
Re: Visual C++ 2005
« Reply #17 on: September 04, 2007, 10:05:36 PM »
To reply to all comments here

VC will compile .c files with cl and .cpp files with cl++
Bloodshed dev-c++ is old and uses a deprecated, broken version(3.2.x I believe.. terrible) of the mingw port of gcc, don't use that trash >.>
You need to link jpeglib.. somthing like jpeg.lib or libjpeg.lib..
the psdk is a female dog to install at times, pm me if you need help

XtremeBain

  • Developer
  • Autococker
  • Posts: 1470
Re: Visual C++ 2005
« Reply #18 on: September 05, 2007, 06:46:12 AM »
Problem with that is that it still requires Jitspoe to release the game source, which kind of defeats the purpose of it.
Why would he be obligated to release the source to the game binary under this scenario?  If he's not releasing it right now (I think there is/was some gray area with regards to releasing GPL content in the same archive as non-GPL'd or closed source binaries), then why would he have to release the source if he made a sv_pure option available?

y00tz

  • Autococker
  • Posts: 2742
Re: Visual C++ 2005
« Reply #19 on: September 05, 2007, 12:42:49 PM »
Why is my old topic being revived? 

Anyway, I did however get it working, if it anyone else needs help, PM Cobo.