AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Module Coding (https://forums.alliedmods.net/forumdisplay.php?f=9)
-   -   some errors recompiling amxx (https://forums.alliedmods.net/showthread.php?t=204844)

Neeeeeeeeeel.- 01-04-2013 02:15

some errors recompiling amxx
 
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.

jim_yang 01-04-2013 03:58

Re: some errors recompiling amxx
 
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)

claudiuhks 01-04-2013 04:03

Re: some errors recompiling amxx
 
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.

Neeeeeeeeeel.- 01-04-2013 17:49

Re: some errors recompiling amxx
 
Thanks to both :3
Now I get this:
Code:

1>..\version.rc(8): fatal error RC1015: cannot open include file 'winres.h'.
:/

claudiuhks 01-04-2013 18:41

Re: some errors recompiling amxx
 
Quote:

Originally Posted by Neeeeeeeeeel.- (Post 1867162)
Thanks to both :3
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.

Neeeeeeeeeel.- 01-04-2013 20:59

Re: some errors recompiling amxx
 
Quote:

Originally Posted by claudiuhks (Post 1867186)
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

Shadows In Rain 01-05-2013 01:35

Re: some errors recompiling amxx
 
Quote:

Originally Posted by Neeeeeeeeeel.- (Post 1867238)
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

TheDS1337 01-05-2013 03:39

Re: some errors recompiling amxx
 
try compile it with release configuration :D

Mofforg 01-05-2013 04:22

Re: some errors recompiling amxx
 
To not create new topic...will ask here)

Quote:

-DNDEBUG
Is it enables or disables debug??

Neeeeeeeeeel.- 01-05-2013 08:14

Re: some errors recompiling amxx
 
Quote:

Originally Posted by Shadows In Rain (Post 1867365)
Probably because you compiling "Debug" configuration.
http://stackoverflow.com/questions/9...-visual-studio

Quote:

Originally Posted by DeagLe.Studio (Post 1867389)
try compile it with release configuration :D

Thanks to both, you were right! Now has a normal size.


All times are GMT -4. The time now is 05:15.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.