Raised This Month: $165 Target: $400
 41% 

some errors recompiling amxx


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Neeeeeeeeeel.-
Some Guy Yellin'
Join Date: Jul 2010
Location: Argentina
Old 01-04-2013 , 03:15   some errors recompiling amxx
Reply With Quote #1

I'm recompiling amxx for windows (using vc++ 2010) and I get many errors... (I didn't change something on amxx/metamod source code yet).

Code:
1>c:\hlsdk-2.3-p3\multiplayer\engine\eiface.h(416): warning C4005: 'ARRAYSIZE' : redefinición de macro
1>          c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winnt.h(1140) : vea la definición anterior de 'ARRAYSIZE'
eiface.h line 416:
PHP Code:
#define ARRAYSIZE(p)        (sizeof(p)/sizeof(p[0])) 
winnt.h line 1140:
PHP Code:
#define ARRAYSIZE(A)    RTL_NUMBER_OF_V2(A) 
Code:
1>c:\metamod-1.19\metamod\enginecallbacks.h : error C4335: Formato de archivo Mac detectado: convierta el archivo de código fuente en formato DOS o UNIX
Code:
1>c:\metamod-1.19\metamod\meta_api.h(187): error C2059: error de sintaxis : 'do'
1>c:\metamod-1.19\metamod\meta_api.h(187): error C2143: error de sintaxis : falta ';' delante de '{'
1>c:\metamod-1.19\metamod\meta_api.h(187): error C2447: '{' : falta el encabezado de función (¿lista formal de estilo anterior?)
1>c:\metamod-1.19\metamod\meta_api.h(187): error C2059: error de sintaxis : 'while'
meta_api.h line 187:
PHP Code:
    do { gpMetaGlobals->mres=result; return; } while(0
Code:
1>c:\metamod-1.19\metamod\meta_api.h(191): error C2143: error de sintaxis : falta ';' delante de '{'
1>c:\metamod-1.19\metamod\meta_api.h(191): error C2447: '{' : falta el encabezado de función (¿lista formal de estilo anterior?)
1>c:\metamod-1.19\metamod\meta_api.h(191): error C2059: error de sintaxis : 'while'
meta_api.h line 191:
PHP Code:
    do { gpMetaGlobals->mres=result; return(value); } while(0
Code:
1>c:\metamod-1.19\metamod\meta_api.h(205): error C2143: error de sintaxis : falta ';' delante de '{'
1>c:\metamod-1.19\metamod\meta_api.h(205): error C2447: '{' : falta el encabezado de función (¿lista formal de estilo anterior?)
1>c:\metamod-1.19\metamod\meta_api.h(223): error C4430: falta  el especificador de tipo; se presupone int. Nota: C++ no admite  default-int
meta_api.h:
PHP Code:
typedef struct // line 205

    
GETENTITYAPI_FN         pfnGetEntityAPI;

    
GETENTITYAPI_FN         pfnGetEntityAPI_Post;

    
GETENTITYAPI2_FN        pfnGetEntityAPI2;

    
GETENTITYAPI2_FN        pfnGetEntityAPI2_Post;

    
GETNEWDLLFUNCTIONS_FN   pfnGetNewDLLFunctions;

    
GETNEWDLLFUNCTIONS_FN   pfnGetNewDLLFunctions_Post;

    
GET_ENGINE_FUNCTIONS_FN pfnGetEngineFunctions;

    
GET_ENGINE_FUNCTIONS_FN pfnGetEngineFunctions_Post;

META_FUNCTIONS//line 223 
Code:
1>c:\metamod-1.19\metamod\meta_api.h(287): error C2061: error de sintaxis : identificador 'META_FUNCTIONS'
1>c:\metamod-1.19\metamod\meta_api.h(295): error C2061: error de sintaxis : identificador 'META_FUNCTIONS'
PHP Code:
C_DLLEXPORT int Meta_Attach(PLUG_LOADTIME now

        
META_FUNCTIONS *pFunctionTable// line 287

        
meta_globals_t *pMGlobals

        
gamedll_funcs_t *pGamedllFuncs);

typedef int (*META_ATTACH_FN) (PLUG_LOADTIME now

        
META_FUNCTIONS *pFunctionTable// line 295

        
meta_globals_t *pMGlobals

        
gamedll_funcs_t *pGamedllFuncs); 
I downloaded metamod sdk v1.19 from here and hlsdk v2.3-p3 from here.
__________________

Last edited by Neeeeeeeeeel.-; 01-04-2013 at 03:18.
Neeeeeeeeeel.- is offline
Send a message via Skype™ to Neeeeeeeeeel.-
jim_yang
Veteran Member
Join Date: Aug 2006
Old 01-04-2013 , 04:58   Re: some errors recompiling amxx
Reply With Quote #2

put this in eiface.h above #define ARRAYSIZE(p) (sizeof(p)/sizeof(p[0]))
Code:
#ifdef ARRAYSIZE
#undef ARRAYSIZE
#endif
and convert your metamod file format to windows carriage mode(using some software)
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>
jim_yang is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 01-04-2013 , 05:03   Re: some errors recompiling amxx
Reply With Quote #3

Replace duplicate \n or duplicate \r with just one. Make sure the phrases are written properly inside the file. Use Notepad Plus Plus (Free Software) for that.

Either undefine ARRAYSIZE then define it again or just entirely change ARRAYSIZE macro definition in all HLSDK files.
__________________

Last edited by claudiuhks; 01-04-2013 at 05:04.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
Neeeeeeeeeel.-
Some Guy Yellin'
Join Date: Jul 2010
Location: Argentina
Old 01-04-2013 , 18:49   Re: some errors recompiling amxx
Reply With Quote #4

Thanks to both
Now I get this:
Code:
1>..\version.rc(8): fatal error RC1015: cannot open include file 'winres.h'.
:/
__________________
Neeeeeeeeeel.- is offline
Send a message via Skype™ to Neeeeeeeeeel.-
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 01-04-2013 , 19:41   Re: some errors recompiling amxx
Reply With Quote #5

Quote:
Originally Posted by Neeeeeeeeeel.- View Post
Thanks to both
Now I get this:
Code:
1>..\version.rc(8): fatal error RC1015: cannot open include file 'winres.h'.
:/
You currently speak English and at the same time you don't understand what the software is telling you.

Open "version.rc" file and try to change the line:

PHP Code:
#include <winres.h> 
To

PHP Code:
#include "winres.h" 
Maybe one of the types listed above should work.
If not, make sure you include "winres.h" file in your project.
__________________
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
Neeeeeeeeeel.-
Some Guy Yellin'
Join Date: Jul 2010
Location: Argentina
Old 01-04-2013 , 21:59   Re: some errors recompiling amxx
Reply With Quote #6

Quote:
Originally Posted by claudiuhks View Post
You currently speak English and at the same time you don't understand what the software is telling you.

Open "version.rc" file and try to change the line:

PHP Code:
#include <winres.h> 
To

PHP Code:
#include "winres.h" 
Maybe one of the types listed above should work.
If not, make sure you include "winres.h" file in your project.
But line 8 from version.rc already contain #include "winres.h" ...

Edit: Solved I replaced "winres.h" with "WinResrc.h"

It compiles but...
Spoiler
__________________

Last edited by Neeeeeeeeeel.-; 01-05-2013 at 02:15.
Neeeeeeeeeel.- is offline
Send a message via Skype™ to Neeeeeeeeeel.-
Shadows In Rain
Senior Member
Join Date: Apr 2010
Location: Russia::Siberia
Old 01-05-2013 , 02:35   Re: some errors recompiling amxx
Reply With Quote #7

Quote:
Originally Posted by Neeeeeeeeeel.- View Post
Why file size changes? I didn't modify nothing on the source.
Probably because you compiling "Debug" configuration.
http://stackoverflow.com/questions/9...-visual-studio
__________________
I'm using Google translator, yarrr. |.◕‿‿◕.|
Shadows In Rain is offline
Send a message via ICQ to Shadows In Rain
TheDS1337
Veteran Member
Join Date: Jun 2012
Old 01-05-2013 , 04:39   Re: some errors recompiling amxx
Reply With Quote #8

try compile it with release configuration
__________________
TheDS1337 is offline
Mofforg
Senior Member
Join Date: Aug 2010
Location: Moscow, Russia
Old 01-05-2013 , 05:22   Re: some errors recompiling amxx
Reply With Quote #9

To not create new topic...will ask here)

Quote:
-DNDEBUG
Is it enables or disables debug??
Mofforg is offline
Send a message via ICQ to Mofforg Send a message via Skype™ to Mofforg
Neeeeeeeeeel.-
Some Guy Yellin'
Join Date: Jul 2010
Location: Argentina
Old 01-05-2013 , 09:14   Re: some errors recompiling amxx
Reply With Quote #10

Quote:
Originally Posted by Shadows In Rain View Post
Probably because you compiling "Debug" configuration.
http://stackoverflow.com/questions/9...-visual-studio
Quote:
Originally Posted by DeagLe.Studio View Post
try compile it with release configuration
Thanks to both, you were right! Now has a normal size.
__________________
Neeeeeeeeeel.- is offline
Send a message via Skype™ to Neeeeeeeeeel.-
Reply


Thread Tools
Display Modes

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


All times are GMT -4. The time now is 03:10.


Powered by vBulletin®
Copyright ©2000 - 2021, vBulletin Solutions, Inc.
Theme made by Freecode