MS VC++ 2005 Express with SDK


(Xterm1n8or) #1

Hi all :slight_smile:

Where to begin…
Ok, I’ve been playing around with this game for about 3 years now. I started by just replacing files for my own, but soon found out i was graphically challenged :frowning: Tried modelling and skinning, tried being the operative word! So i spent about a year mapping and have really enjoyed it. ( And still do. So much to learn! :shock: )

I have previously learnt a bit of C++ using BloodshedDev ( VC++ 2005 wasn’t available as a free download then ) and i seem to remember having some compiling problems that i coudn’t find the answers to. So i gave up and went back to mapping.

The thing is i really want to be able to add things to my mod, but find myself being a complete noob again :oops:
I have installed VC++ 2005 and the SDK. I carefully followed all instructions and all seems well. I installed the ET SDK and read the README file which tells me to double click “wolf.dsw” :? I don’t seem to have this file. I do however have “wolf.sln” so i doubled clicked this for the hell of it. It eventually compiled, without errors, to “cgame_mp_x86.dll”

I say eventually because of a couple of things. Firstly, when double clicking the “wolf.sln” it needs to be converted. It does this and tells me that; “The associated control provider cannot be found. Projects will be treated as not under source control. Do you want to remove control bindings from the project?”
I’ve been unable to find anything relating to this and was wondering if anyone here knows. Removing them or not seems to make no difference, it still compiles without error.

Secondly, when compiling it asks me to “specify the name of the executable file to be used for the debug session”. I cancel this and it finishes compiling.

I’ve replaced the original cgame dll that i use in my mod with this new one and everything seems ok. I’m just wondering if i’m doing this right. Compared to mapping, there seems to be a real lack of help ( in the form of tutorials etc. ) with this aspect of modding.

Hope someone can shed some light.

Many thanks in advance and sorry for the long winded post :roll:


(Elite) #2

Change the active build configuration to the release versions. Once that is done you will get a much better compilation, and fastter without all the debugging junk in them.

Make sure you remember to build cgame, qagame, and ui all the release configuration.


(Xterm1n8or) #3

Thanks Elite for speedy reply :smiley:

I had done all that because it says it in the README with the SDK. What i was doing was, setting it for release, win32, then pressing the arrow. Only the arrow doesn’t build it, it debugs it :oops:

I now have my 3 dlls which compile without error. Thankyou :slight_smile:


(Elite) #4

Instead of pressing the arrow, up in the menu there should be a Build menu, make sure you Clean the build before building each time and that it does say Build * for release or w/e, and make sure you actually open the working directory up manually after the compile and double check that the release version was not in fact compiled… I think under Windows you get both a debug and release version. I usually use linux for compiling, so I can’t be too much help on exactly what to do, other than to switch to VisualStudio 6 instead for compatibility if it gives you too much problems (limewire, bittorrent, etc, it’s nto illegal if you don’t make money :slight_smile: )


(dutchmeat) #5

Like Elite said, you should try ‘Microsoft Visual C++ 6.0’, I’ve often had problems with newer versions. I think that’s because the project files are outdated.


(Xterm1n8or) #6

Thanks for the info ppl :smiley:

I was however pressing the wrong button :oops: and i don’t appear to have any problems now.

I think you’re right that the project files are outdated as this is MVC++ 8, but it updates the files and compiles without error.

I’m reluctant to pay for MVC++ 6 for now as i’m only just want to play around with this game. Perhaps if i get reasonably good at it, or start programming other things, i might consider it but not just now.

I’m also reluctant to use p2p programs as i’ve had bad experiences in the past with Kazaa :x

Ayway thanks for the input :slight_smile:


(Elite) #7

You can also use other compilers. I would never pay for Visual Studio either, except for one of my courses it was a requirement, and I decided to purchase a legit copy (it’s not a bad price for VS6 on student dicount). The .NET is just insane.

Besides, who do you think makes a better compiler, Intel, the guys that want to show off the speed and powe rof their cpu’s and who made the chip, or Microsoft, who wants their extremely buggy programs to run regardless :slight_smile:

You can get any free compiler though and it will work just the same.

Good luck!


(jaybird) #8

Bah, VC2005 is way nicer and more user friendly than VC6. Especially since he got VC2005 to work without a hitch, it’s wise to keep using it.

And yes, that’s all correct. Just dump those .dll files in a pk3 file and you’re good to start testing.


(Elite) #9

Bah, VC2005 is way nicer and more user friendly than VC6. Especially since he got VC2005 to work without a hitch, it’s wise to keep using it.

I do agree.

Just listing other possibilities :slight_smile:


(Xterm1n8or) #10

As a novice, i think VC2005 is easier to use but, as a novice, what do i know? The links have been posted before but, if anyone needs to know how, i can post exactly how i did it, although if you carefully read all the instructions it should be ok. It was for me, i use XP home. ( don’t know if that makes a difference ) :smiley:


(Xterm1n8or) #11

Hello everybody :smiley:

Bringing this thread up again because it’s to do with this compiler, so not 100% sure if anyone can help unless they’re using this.
It compiles without error but there are quite a few warnings, 2 main ones. I find it not so much hard, but certainly tedious, to to wade through all these warnings to try and pick out my own errors. I thought about posting on Microsoft site but figured that you guys and girls would be more familiar with the code:

warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.

Theres a whole bunch of these along with strncpy, strcat, sprintf, sscanf, vsprintf, possibly 1 or 2 more.
It suggests that i can dsiable this warning, but looking through the online help, i couldn’t find exactly HOW and WHERE to use _CRT_SECURE_NO_WARNINGS. In hindsight i don’t think i want to disable it as it may affect future projects, so my question is:

:?: Is it ok for me to add ‘_s’ to all of the above as it suggests?

The other main warning i get is:

warning C4706: assignment within conditional expression

These are examples of what it’s talking about:

while( ( token = COM_Parse( &pScript ) ) && ( token[0] != '}') ) {

if( !( self = other->tankLink ) ) {

if ((pPathCorner = BG_Find_PathCorner( token ))) {

if(!(pSpline = BG_Find_Spline( token ))) {

And heap of others. Could it be that they all use double (( ? It seems that this is what they all have in common.

:?: Could removing a set of () remove this warning or are they supposed to be there?

Hope someone can help. These 2 things make up about 95% of warnings and getting rid of then will make it easier for me to find my compile errors.

Many Thanks :smiley:


(jaybird) #12

Having the double parens is fine, and good practice. You could disable that warning if you want.

To add the define to the project, you need to go to the project’s properties. There is space to add it to each project. I can’t remember under what section offhand, if you can’t find it I’ll have to look.


(Xterm1n8or) #13

Hi Jaybird :smiley:

I understand that the double (( )) is fine, and although i don’t know how to disable this, i’m not sure whether i should. Will it then start to overlook mistakes that i have made or doesn’t it matter if i use double (( )) ?
Not that i doubt you or anything but i was wondering, if it is good practice to do this, why would it come up as a warning?

I have searched through the project options and properties but i’m not sure what to look for, infact i’m not entirely sure i know what you mean here, sorry. Any chance you could elaborate, please?

Many thanks :smiley:


(kamikazee) #14

AFAIK, that’s just Microsoft’s compiler whining. Q3 (and W:ET) use their own versions of strncpy.

In fact, if you would change all calls to “strncpy” with “strncpy_s”, you might not be able to compile the mod code on Linux.

The compiler moans about

if( !( self = other->tankLink ) ) {

because it sees an assignment where you would normally use a condition expression. (Returning a real true or false value.) Statements like this are sometimes due to programming errors and the compiler warns you about it. (Eg. “==” which means “equals” was accidentally changed to “=”. Those are two different things.)

If you didn’t code it, it should work as expected. In this case, it’s just some regular, “ugly” C-coding.

These warnings don’t mean your mod won’t function. It just moans because C-code can be a mess compared to C++ code.


(Xterm1n8or) #15

Hi Kamikazee :smiley:

So basically, everything is ok and i shouldn’t alter them in case it won’t compile with linux. So i’m guessing that the only way to get rid of these warnings is to disable them? I don’t suppose you would know how to do this? If not, next stop Microsoft i suppose?

Thanks for help :smiley:


(jaybird) #16

Project Menu -> {game|cgame|ui} properties
Configuration Properties -> C/C++ -> Preprocessor -> Preprocessor Definitions

Simply add it to the list in the same way the others have. Note you will need to do this for each project (game, cgame, and ui), and for each build type (debug and release). That will kill most of the warnings you have.


(Xterm1n8or) #17

Hi jaybird :smiley:

Ok, I found the bit you are talking about. Is this where i put:

_CRT_SECURE_NO_WARNINGS

If so, this would get rid of almost half of the warnings. Would you know about the Double (( )) and how to disable this warning?

Many thanks :smiley:


(jaybird) #18

You can ignore the warnings about the assignment.


(Xterm1n8or) #19

hi :smiley:

You didn’t actually tell me if i was correct, so i went ahead and did it anyway. It works! Thankyou very much. That has cleared almost half :slight_smile:

Do you know if i can do anything about: assignment within conditional expression warnings? I know i can ignore them, i’m just trying to clean up the output so that i can better locate any errors that i make.

Cheers :smiley:


(Elite) #20

Just in your source files add this:

#pragma warning(disable : 4706)

Probably q_shared.h would be a good place for this, along with the others.