.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Developer's Farm > General Programming
General Programming Help others and get yourself helped here!

Reply
 
Thread Tools
Re: command line compile
Old
  (#11)
botman
Super Moderator
 
Status: Offline
Posts: 280
Join Date: Jan 2004
Location: Plano, TX
Default Re: command line compile - 12-04-2004

No, that's saying if you are *NOT* using a Microsoft compiler you need to define __cdecl.

__cdecl should already be defined in MSVC.

If you've modified ANY of the metamod source code, you should probably change it back to what it originally was (or just delete what you have now and re-install the metamod source). Compile the unmodified metamod source and post any errors you get here.

botman
  
Reply With Quote
Re: command line compile
Old
  (#12)
dead bwoy
Member
 
dead bwoy's Avatar
 
Status: Offline
Posts: 512
Join Date: Feb 2004
Location: STL MO USA
Default Re: command line compile - 12-04-2004

do i need a service pack for msvc?

heres the new error with the default (metamod 1.17 from metamod.org) .dsw

D:\Program Files\Microsoft Visual Studio\VC98\MFC\INCLUDE\afxv_w32.h(14) : fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h>
conf_meta.cpp
  
Reply With Quote
Re: command line compile
Old
  (#13)
Lazy
Member
 
Lazy's Avatar
 
Status: Offline
Posts: 236
Join Date: Jan 2004
Location: Toronto, Ontario, Canada
Default Re: command line compile - 12-04-2004

It's been a long time but you must move all of the half-life include directories in your listing to either the top or the bottom of the list and keep them together.

I cannot remember which since I do not use VS 6 anymore.
  
Reply With Quote
Re: command line compile
Old
  (#14)
dead bwoy
Member
 
dead bwoy's Avatar
 
Status: Offline
Posts: 512
Join Date: Feb 2004
Location: STL MO USA
Default Re: command line compile - 12-04-2004

under project options i have:
/nologo /MT /W3 /GX /O2 /I "d:\program files\microsoft visual studio\vc98\include\sdk\multiplayer\common" /I "d:\program files\microsoft visual studio\vc98\include\sdk\multiplayer\engine" /I "d:\program files\microsoft visual studio\vc98\include\sdk\multiplayer\dlls" /I "d:\program files\microsoft visual studio\vc98\include\sdk\multiplayer\pm_shared" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "METAMOD_EXPORTS" /Fp"release/metamod.pch" /YX /Fo"release/" /Fd"release/" /FD /c

does the "/I" mean include?
what is the difference between [project/settings/c++ tab/Project Options] and [tools/options/directories]?
  
Reply With Quote
Re: command line compile
Old
  (#15)
botman
Super Moderator
 
Status: Offline
Posts: 280
Join Date: Jan 2004
Location: Plano, TX
Default Re: command line compile - 13-04-2004

Yes, "/I" means "use this directory when searching for include files".

The Half-Life SDK includes a .h file called "util.h". There is also a "util.h" in the MSVC standard includes. What's probably happening is that the MSVC version of util.h is being included instead of the Half-Life SDK one.

Why did you install the Half-Life SDK in "program files\microsoft visual studio\vc98\include" anyway?

I would recommend you remove it from there and install it someplace separate (perhaps in "D:\Half-Life SDK"), then change your /I include list to look something like this...
Code:
/I "D:\Half-Life SDK\sdk\multiplayer\common"
/I "D:\Half-Life SDK\sdk\multiplayer\engine"
/I "D:\Half-Life SDK\sdk\multiplayer\dlls"
/I "D:\Half-Life SDK\sdk\multiplayer\pm_shared"
/I "D:\program files\microsoft visual studio\vc98\include"
/D "WIN32" /D "NDEBUG" /D "_WINDOWS"...
botman
  
Reply With Quote
Re: command line compile
Old
  (#16)
dead bwoy
Member
 
dead bwoy's Avatar
 
Status: Offline
Posts: 512
Join Date: Feb 2004
Location: STL MO USA
Default Re: command line compile - 13-04-2004

Code:
void *mm_PvAllocEntPrivateData(edict_t *pEdict, int cb) {
META_ENGINE_HANDLE(void *, NULL, FN_PVALLOCENTPRIVATEDATA, pfnPvAllocEntPrivateData, (pEdict, cb));
RETURN_API()
}

line of error:
Code:
META_ENGINE_HANDLE(void *, NULL, FN_PVALLOCENTPRIVATEDATA, pfnPvAllocEntPrivateData, (pEdict, cb));
D:\Projects\metamod-1.17\metamod\engine_api.cpp(391) : error C2440: '=' : cannot convert from 'void *(__cdecl *)(struct edict_s *,__int32)' to 'void *(__cdecl *)(struct edict_s *,int)'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast

after downloading the sdk and metamod source from the new filebase.

Last edited by dead bwoy; 13-04-2004 at 09:03..
  
Reply With Quote
Re: command line compile
Old
  (#17)
botman
Super Moderator
 
Status: Offline
Posts: 280
Join Date: Jan 2004
Location: Plano, TX
Default Re: command line compile - 13-04-2004

It appears that the metamod .h files have __int32 defined as the 'int' type. Perhaps this was for Linux compatibility. Try searching the metamod .h files for '__int32' and replacing it with 'int'.

botman
  
Reply With Quote
Re: command line compile
Old
  (#18)
dead bwoy
Member
 
dead bwoy's Avatar
 
Status: Offline
Posts: 512
Join Date: Feb 2004
Location: STL MO USA
Default Re: command line compile - 14-04-2004

i have searched the .h files and have not found __int32 yet. i have found plenty of "int"s. do you know which files i should check? I'll check again...
  
Reply With Quote
Re: command line compile
Old
  (#19)
botman
Super Moderator
 
Status: Offline
Posts: 280
Join Date: Jan 2004
Location: Plano, TX
Default Re: command line compile - 14-04-2004

I saw this over on hlpd about error C2440...

http://dynamic5.gamespy.com/~hlpd/index.pl/Eiface.H

(scroll to the bottom of that page)

Value used 'long' in places where 'uint32' should have been used. The metamod code may have the same problems. See the changes that SavannahLion recommended as an example.

botman
  
Reply With Quote
Re: command line compile
Old
  (#20)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: command line compile - 14-04-2004

Else if you want to get yourself started with a SDK + metamod + bot kit that compiles straight out of the box, go to the filebase and download the "POD-bot SDK". I've packaged the Bots United SDK with the updated metamod source code that we use, and there's the pod-bot source code as well. ALL of them compile fine, straight out of the box, directly in Windows (MSVC 6) and Linux (GCC 2.95.3). You don't even need to adapt the include paths if you keep the directory structure.



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com