.:: 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
command line compile
Old
  (#1)
dead bwoy
Member
 
dead bwoy's Avatar
 
Status: Offline
Posts: 512
Join Date: Feb 2004
Location: STL MO USA
Default command line compile - 07-04-2004

help please:
http://forums.bots-united.com/showpo...1&postcount=60
  
Reply With Quote
Re: command line compile
Old
  (#2)
Cpl. Shrike
ShrikeBot Coder/Moderator
 
Cpl. Shrike's Avatar
 
Status: Offline
Posts: 550
Join Date: Mar 2004
Location: The Netherlands
Default Re: command line compile - 07-04-2004

You need to make a MAKE file.
And pass that to the command line compile.

MCVS can export its make file.
If you don';t have that then you'll need to make your own make file.
Im don't know how to do that yet. im using the msvc visual version so i get the make file which msvc makes it self .
I only know how to do my linux make file.
And i asume that's not compatible with msvc.
  
Reply With Quote
Re: command line compile
Old
  (#3)
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 - 07-04-2004

You're not forced to make a Makefile... you can compile from the command line if you know what you are doing.

For example, a command-line compile and linking can look like this:

Quote:
MKDIR Release

CD Release

CALL "C:\Program Files\Microsoft Visual Studio\VC98\Bin\VCVARS32.BAT"

CL.EXE /nologo /MT /W3 /GX /O2 /I "..\..\metamod" /I "..\..\..\devtools\sdk\Single-Player Source\dlls" /I "..\..\..\devtools\sdk\Single-Player Source\common" /I "..\..\..\devtools\sdk\Single-Player Source\engine" /I "C:\Some\Other\Include\Path" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "yourproject_EXPORTS" /YX /FD /c ..\yourproject_file1.cpp

REM add other CL.EXE lines for each .cpp file to compile

LINK.EXE kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /def:"..\yourproject.def" yourproject_file1.obj yourproject_file2.obj yourproject_fileN.obj

ECHO.build complete

CD ..



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

Last edited by Pierre-Marie Baty; 07-04-2004 at 23:30..
  
Reply With Quote
Re: command line compile
Old
  (#4)
dead bwoy
Member
 
dead bwoy's Avatar
 
Status: Offline
Posts: 512
Join Date: Feb 2004
Location: STL MO USA
Default Re: command line compile - 07-04-2004

so what do i do with this makefile?
ive setenv /2000 /RETAIL
from dos prompt in:
c:\program files\microsoft sdk>
makefile is here:
c:\program files\microsoft sdk\metamod-1.17>
sorry im a total n00b!!!
where can i find the commands to use? do i use them from c:\program files\microsoft sdk> or does the dir matter?

EDIT:
ok wow! quick one pmb!
this should help a bit. Is there a good online resource for command line compiler (.net framework)? msdn is very difficult to find compiler help. It says that the command line compiler is well documented, it probably is but i cannot find the dox!?!

Last edited by dead bwoy; 07-04-2004 at 23:45..
  
Reply With Quote
Re: command line compile
Old
  (#5)
dead bwoy
Member
 
dead bwoy's Avatar
 
Status: Offline
Posts: 512
Join Date: Feb 2004
Location: STL MO USA
Default Re: command line compile - 11-04-2004

so i just got msvc 6 se (off a friend of a friend who took a class in college). I get this error:
engine_api.cpp(386) : error C2440: '=' : cannot convert from 'void (__cdecl *)(void *,char *,...)' to 'void (__cdecl *)(struct _iobuf *,char *,...)'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast

what didnt i do right, im still getting used to this program.
  
Reply With Quote
Re: command line compile
Old
  (#6)
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 - 11-04-2004

well for starters it would help if you posted what was contained on line 386 of engine_api.cpp...



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
Re: command line compile
Old
  (#7)
dead bwoy
Member
 
dead bwoy's Avatar
 
Status: Offline
Posts: 512
Join Date: Feb 2004
Location: STL MO USA
Default Re: command line compile - 11-04-2004

i suppose you're right

META_ENGINE_HANDLE_void_varargs(FN_ENGINEFPRINTF, pfnEngineFprintf, pfile, szFmt);

from

void mm_EngineFprintf(FILE *pfile, char *szFmt, ...) {
META_ENGINE_HANDLE_void_varargs(FN_ENGINEFPRINTF, pfnEngineFprintf, pfile, szFmt);
RETURN_API_void()
}
  
Reply With Quote
Re: command line compile
Old
  (#8)
botman
Super Moderator
 
Status: Offline
Posts: 280
Join Date: Jan 2004
Location: Plano, TX
Default Re: command line compile - 11-04-2004

Change...
Code:
void mm_EngineFprintf(FILE *pfile, char *szFmt, ...)
...to this...
Code:
void mm_EngineFprintf((struct _iobuf *)pfile, char *szFmt, ...)
The question is, WHY is 'FILE' being interpreted as 'void' when it should be a 'struct _iobuf' type? I think you are missing some include files that would resolve 'FILE' to the proper type.

botman
  
Reply With Quote
Re: command line compile
Old
  (#9)
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 - 11-04-2004

That's what I think too. Metamod must be detecting what type of compiler it's being compiled on, and yours must not be caught in the list. You'd perhaps better have a look at where it's done.



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
Re: command line compile
Old
  (#10)
dead bwoy
Member
 
dead bwoy's Avatar
 
Status: Offline
Posts: 512
Join Date: Feb 2004
Location: STL MO USA
Default Re: command line compile - 11-04-2004

/* Define __cdecl for non-Microsoft compilers */

could this be it? (from: stdio.h) I am using a microsoft compiler though: msvc 6 se

Last edited by dead bwoy; 11-04-2004 at 22:13..
  
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