beggining, and I need help

A

apache

Guest
First off, I actually do know a bit about C++, so once I get the whole compiling stage working, I think I can go from there.

I have MSVC 6 and MSVC express beta

I don't know where to begin compiling in MSVC 6, because it dosent seem to be able to open 'soloution files' (or if it can sry I didn't see how) so the 'My First Mod' instructions I have been using so much are rendered useless. MSVC express beta can open the soloution file, but when I follow their instructions exactly (even if I dont touch the code at all) I get several errors when compiling. Any insight on how to get started in either of these programs would be greatly appreciated.

Thanks in advanced,
Apache
 
Hmmm...I'm not sure exactly what you're asking but I'll give some info:

1. You have to create a workspace to be able to compile and execute a C++ file. File => New => Project Tab => Windows 32 Console Application and name it whatever you want. Then, File => New => Files Tab => C++ Source File again naming whatever you want.

2. To compile the program go to Build => Compile MyCPP File.cpp or press Crtl + F7. Any error messages should pop up in the debug window at the bottom, or it will say "MyCPP File.obj - 0 error(s), 0 warning(s)" if you don't have any errors or warnings (obviously). Unfortunately, if you do have errors, the error messages are usually pretty vague.

3. To execute the program, if you have the correct toolbar open, you can click the large red exclamation point (!) or Ctrl + F5. If you don't have any errors, this will run the program in a command prompt window.

I hope that helps.
 
does a bit, thxs

what I'm still a bit confused about, though, is what files and whatnot I need to add to the workspace, or add somewhere, so that I can compile a working mod


All I really want to do for the time being, is be able to change some cpp files to slightly alter the game, just for fun. Im know what to do to the cpp file, but I dont understand what I need to do to compile it. the 'soloution' files that came with the sdk seem like the simplest way, but when I open it up, and try to compile it , it comes up with several errors. (that is with msvc express beta) and with msvc 6 it dosent seem to be able to open them at all. How would I go about manually adding all the files it needs, if I cant get the soloution files to work.




Or to word that differently, what is the simplest way, to access the cpp files, change them, and recompile them, and play.



details of what goes wrong in msvc express:

I open the soloution, and go to compile (havent changed any code yet, to make sure its not the code that is screwed up)
when I open the soloution it aparently has to convert it, (from msvc 7 to msvc express I assume) then when I compile it returns the following errors

Code:
------ Build started: Project: client, Configuration: Release HL2 Win32 ------
Compiling...
cl : Command line warning D9035 : option 'Og' has been deprecated and will be removed in a future release
stdafx.cpp
..\public\tier0\dbg.h(482) : warning C4996: '_vsnprintf' was declared deprecated
        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdio.h(304) : see declaration of '_vsnprintf'
..\public\vstdlib\strtools.h(90) : error C2440: 'return' : cannot convert from 'const char *' to 'char *'
        Conversion loses qualifiers
..\public\vstdlib\strtools.h(93) : error C2440: 'return' : cannot convert from 'const char *' to 'char *'
        Conversion loses qualifiers
Creating browse information file...
Microsoft Browse Information Maintenance Utility Version 8.00.40607
Copyright (C) Microsoft Corporation. All rights reserved.
BSCMAKE: error BK1506 : cannot open file '.\cl_dll___Win32_HL2_Release\activitylist.sbr': No such file or directory
Build log was saved at "file://c:\MyMod\src\cl_dll\cl_dll___Win32_HL2_Release\BuildLog.htm"
client - 3 error(s), 2 warning(s)
------ Build started: Project: hl, Configuration: Release HL2 Win32 ------
Compiling...
cl : Command line warning D9035 : option 'Og' has been deprecated and will be removed in a future release
stdafx.cpp
../public\tier0\dbg.h(482) : warning C4996: '_vsnprintf' was declared deprecated
        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdio.h(304) : see declaration of '_vsnprintf'
../public\vstdlib\strtools.h(90) : error C2440: 'return' : cannot convert from 'const char *' to 'char *'
        Conversion loses qualifiers
../public\vstdlib\strtools.h(93) : error C2440: 'return' : cannot convert from 'const char *' to 'char *'
        Conversion loses qualifiers
Creating browse information file...
Microsoft Browse Information Maintenance Utility Version 8.00.40607
Copyright (C) Microsoft Corporation. All rights reserved.
BSCMAKE: error BK1506 : cannot open file '.\Release_hl2\activitylist.sbr': No such file or directory
Build log was saved at "file://c:\MyMod\src\dlls\Release_hl2\BuildLog.htm"
hl - 3 error(s), 2 warning(s)
========== Build: 0 succeeded, 2 failed, 0 up-to-date, 0 skipped ==========



thxs again for any help!
 
It looks like most of the errors that you posted have to do with the strtools.h header file....i'm pretty sure that's not a standard MSVC++ 6 header file. To compile the cpp file, you would probably have to find that header file (probably a custom header file that Valve created). Maybe try a search for "strtools.h" and then put it in your Include folder for VC++ 6 (the standard directory is Program Files => Microsoft Visual Studio => VC98 => Include)

That might work.
 
actually the error I posted is for my try in MSVC Express beta

I dont now where to begin using msvc 6, because it dosent seem to be able to open soloution files, such as those that come with the SDK to automaticly add al the neccesary files to your project (I think that is what it does anyway)
 
I was having the same problems that you are experiencing, apache. I solved them by purchasing MSVC 2003 .Net under an Academic license from my school. 100 bucks for all the functionality of the professional version, plus some student tools, and the implied ability to compile and run all of the HL2 source code, since it was built with MSVC 2003 .Net.
 
seems to be the best bet, even though im pretty much broke :p

Ill see what I can do, in the meantime however, what would be the easiest way to get all the files I need into msvc 6 so that I can compile. either that or a way to solve my woes in msvc express.



thxs for the input everyone :)
 
Sandman said:
I solved them by purchasing MSVC 2003 .Net under an Academic license from my school. 100 bucks for all the functionality of the professional version, plus some student tools, and the implied ability to compile and run all of the HL2 source code, since it was built with MSVC 2003 .Net.

Uhh, 100 Dollar for an Academic license of MSVC 2003?

I got an Academic license of MS Visual Studio .net 2003 professional including the msdn library for nine (!!!) Euros at the University Of Applied Sciences I'm studying at!
 
Huh...I got an Academic license of MS Visual Studio .NET 2003 for free from the university that I'm going to.
 
yea, but Im studying at a highschool that dosent have enough desks for the students, that might close and merge with the only other highschool in town, that has even less space and money : (
 
Back
Top