.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   Half-Life 2 SDK (http://forums.bots-united.com/forumdisplay.php?f=62)
-   -   VC++ or VC .net? (http://forums.bots-united.com/showthread.php?t=3312)

gerbopel 01-01-2005 15:27

VC++ or VC .net?
 
To develop AI code for a HL2 MOD do I need .NET or can I get by with VC++ 6.0? Is it designed for .NET or VC++ 6.0?

Cheers,
Gerb

Cpl. Shrike 01-01-2005 16:04

Re: VC++ or VC .net?
 
Both can be used. Read this almost at bottom of page.

http://www.valve-erc.com/srcsdk/faq.html#faqCompiler2

koraX 01-01-2005 19:14

Re: VC++ or VC .net?
 
don't use MSVC 6.0. It has many ugly bugs, mainly in STL and C++ core.

@$3.1415rin 01-01-2005 19:35

Re: VC++ or VC .net?
 
there was something like 6.x after 6.0. ( you can't look up when you're not at home, that making me crazy ;) ) that 6.x had a lot better browse functionality, in .net it's just luck if it works, and some functions were even removed.

and for slower computers .net isnt the best choice, the compiler is significantly slower, although some stuff like asm intrinsics etc are now working by default, no update needed there.

stefanhendriks 01-01-2005 19:44

Re: VC++ or VC .net?
 
MSVC rocks. Its fast, it works, and i tried .Net , its slow as hell and it did not work as i wanted it to work.

Btw, the .net framework, sucks as well , imo. I don't need it, i don't even *want* to need it

sfx1999 01-01-2005 20:04

Re: VC++ or VC .net?
 
I use MinGW. How would I use that with HL2?

Whistler 02-01-2005 07:28

Re: VC++ or VC .net?
 
well unfortunately I don't think MinGW can be used with HL2 because it don't know what "__asm" is.
But for HL1 it's perfect :) and unlike MSVC6, it also complies with ANSI C/C++ Standards

M$ also has a "command-line compiler" which you can get for zero price, not sure if that works with HL2

(I don't want to touch a certain sensitive topic this time)

Quote:

Originally Posted by @$3.1415rin
there was something like 6.x after 6.0. ( you can't look up when you're not at home, that making me crazy ) that 6.x had a lot better browse functionality, in .net it's just luck if it works, and some functions were even removed.

I don't think there is a MSVC 6.x - http://msdn.microsoft.com/visualc/
but there are several hhhhhhuuuuuuuuuuuggggggeeeeeee service packs (really huge!!!) for MSVC6

sfx1999 02-01-2005 09:56

Re: VC++ or VC .net?
 
Well, not all of it is ANSI compliant. A long long (64-bit int) is a POSIX thing I believe.

Anyway, it is possible to write alternative code. I bet it is already in there due to the Linux version.

koraX 02-01-2005 11:58

Re: VC++ or VC .net?
 
DO NOT USE MSVC6.0.
Newset service pack for MSVC6.0 is version 6 and there is also a processor pack for MSVC6.0, but is is still buggy. If you insist on using MSVC6.0, download newest Platform SDK from Microsoft and patches for C++ from dinkumwares site.

If .NET is too slow for you, use MinGW.

About __asm, MinGW uses gcc style of asm.
Example between Microsofts style and MinGW :
Code:

#if defined __unix__ || ( defined _WIN32 && defined __GNUG__ )
        // this is for gcc and MinGW
        __asm__ __volatile__ (
                "rdtsc\n\t"
        : "=A" (cycles)
        : );
#endif

#if defined _WIN32 && !defined __GNUG__
        // this is for MSVC
        __asm {
                push eax
                push edx
                rdtsc
                mov dword ptr [cycles],eax
                mov dword ptr [cycles+4],edx
                pop edx
                pop eax
        }
#endif

long long is not defined in ISO C++ standard, but it is supported both by gcc/MinGW and MSVC.NET. However I recommned not using long, because it is represented differently in 64bit systems (ling is 64b in unix64 and 32b in WIN64)

And for those whiners who don't use MinGW because it does not have IDE, well look here http://www.bloodshed.net/dev/devcpp.html

Whistler 02-01-2005 14:16

Re: VC++ or VC .net?
 
can't seem to open the bloodshed.net site but here is also the official download for Dev-Cpp:
http://sourceforge.net/projects/dev-cpp

There is also KDevelop for GNU/Linux (which is part of KDE) which can be used for editing the source code. You can also use GNU Emacs (with syntax highlighting, auto formatting the code and so on, for both GNU/Linux and Windows) but it's just an editor and not an IDE.

another thing is: do *NOT* use the MinGW version shipped with Dev-Cpp. it has bugs which can't compile HL bots. Download the MinGW which works for HL here:
http://prdownloads.sourceforge.net/m...1.exe?download

P.S., actually the MinGW compiles kinda slowly... but the original GCC under GNU/Linux isn't slow, dunno if this is M$'s fault or MinGW hacker's fault. But I don't care about it due to the reasons some of you may already know :)


All times are GMT +2. The time now is 22:30.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.