AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Module Coding (https://forums.alliedmods.net/forumdisplay.php?f=9)
-   -   [TUT NEEDED] Setting up Visual Studio 17 for module coding (https://forums.alliedmods.net/showthread.php?t=299717)

Abhinash 07-23-2017 16:38

[TUT NEEDED] Setting up Visual Studio 17 for module coding
 
Hello everybody.
As I want to start module coding.
I want to know the process how to set up everything.
Please dont link me to wiki.
Because I tried the steps from wiki and always end up getting MACRO REDEFINITION error in compiling any module.
Please tell me the steps to how to do module coding in Visual Studio 2017 with MACRO REDEFINION error .

Thank you.

Arkshine 07-23-2017 17:32

Re: [TUT NEEDED] Setting up Visual Studio 17 for module coding
 
There is nothing to do apart cloning the projects (amxmodx, metamod, hlsdk) from github in the same folder. If you put metamod and hldsk in another directory, then you will need to modify the includes paths yourself in the amxmodx project.

Abhinash 07-24-2017 05:59

Re: [TUT NEEDED] Setting up Visual Studio 17 for module coding
 
I already cloned the folders.
But I am getting a lot of Compilation errors.
How to fix them --

These are the errors --
Code:
1>------ Build started: Project: fun, Configuration: Debug Win32 ------ 1>fun.cpp 1>C:\sdk_files\hlsdk-2.3-p4\engine\eiface.h(382): warning C4005: 'ARRAYSIZE': macro redefinition 1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\um\winnt.h(1305): note: see previous definition of 'ARRAYSIZE' 1>C:\sdk_files\hlsdk-2.3-p4\dlls\util.h(248): warning C4091: 'typedef ': ignored on left of '' when no variable is declared 1>c:\sdk_files\metamod-1.19\metamod\types_meta.h(153): error C2059: syntax error: 'do' 1>c:\sdk_files\metamod-1.19\metamod\types_meta.h(153): error C2143: syntax error: missing ';' before '{' 1>c:\sdk_files\metamod-1.19\metamod\types_meta.h(153): error C2447: '{': missing function header (old-style formal list?) 1>c:\sdk_files\metamod-1.19\metamod\types_meta.h(153): error C2059: syntax error: 'while' 1>c:\sdk_files\metamod-1.19\metamod\types_meta.h(159): error C2143: syntax error: missing ';' before '{' 1>c:\sdk_files\metamod-1.19\metamod\types_meta.h(159): error C2447: '{': missing function header (old-style formal list?) 1>c:\sdk_files\metamod-1.19\metamod\types_meta.h(159): error C2059: syntax error: 'while' 1>c:\sdk_files\metamod-1.19\metamod\mreg.h(119): error C2143: syntax error: missing ';' before '{' 1>c:\sdk_files\metamod-1.19\metamod\mreg.h(119): error C2447: '{': missing function header (old-style formal list?) 1>c:\sdk_files\metamod-1.19\metamod\mreg.h(125): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\sdk_files\metamod-1.19\metamod\mreg.h(157): error C3646: 'status': unknown override specifier 1>c:\sdk_files\metamod-1.19\metamod\mreg.h(157): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\sdk_files\metamod-1.19\metamod\mreg.h(241): error C3646: 'status': unknown override specifier 1>c:\sdk_files\metamod-1.19\metamod\mreg.h(241): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\sdk_files\metamod-1.19\metamod\log_meta.h(151): error C2059: syntax error: 'do' 1>c:\sdk_files\metamod-1.19\metamod\log_meta.h(151): error C2143: syntax error: missing ';' before '{' 1>c:\sdk_files\metamod-1.19\metamod\log_meta.h(151): error C2447: '{': missing function header (old-style formal list?) 1>c:\sdk_files\metamod-1.19\metamod\log_meta.h(151): error C2059: syntax error: 'while' 1>c:\sdk_files\metamod-1.19\metamod\engine_api.h(535): error C2143: syntax error: missing ';' before '*' 1>c:\sdk_files\metamod-1.19\metamod\engine_api.h(535): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\sdk_files\metamod-1.19\metamod\engine_api.h(537): error C2143: syntax error: missing ';' before '*' 1>c:\sdk_files\metamod-1.19\metamod\engine_api.h(537): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\sdk_files\metamod-1.19\metamod\engine_api.h(895): error C2143: syntax error: missing ';' before '*' 1>c:\sdk_files\metamod-1.19\metamod\engine_api.h(895): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\sdk_files\metamod-1.19\metamod\engine_api.h(895): error C2378: 'sequenceEntry_s': redefinition; symbol cannot be overloaded with a typedef 1>c:\sdk_files\metamod-1.19\metamod\engine_api.h(535): note: see declaration of 'sequenceEntry_s' 1>c:\sdk_files\metamod-1.19\metamod\engine_api.h(897): error C2143: syntax error: missing ';' before '*' 1>c:\sdk_files\metamod-1.19\metamod\engine_api.h(897): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\sdk_files\metamod-1.19\metamod\engine_api.h(897): error C2378: 'sentenceEntry_s': redefinition; symbol cannot be overloaded with a typedef 1>c:\sdk_files\metamod-1.19\metamod\engine_api.h(537): note: see declaration of 'sentenceEntry_s' 1>C:\sdk_files\metamod-1.19\metamod\meta_api.h(187): error C2059: syntax error: 'do' 1>C:\sdk_files\metamod-1.19\metamod\meta_api.h(187): error C2143: syntax error: missing ';' before '{' 1>C:\sdk_files\metamod-1.19\metamod\meta_api.h(187): error C2447: '{': missing function header (old-style formal list?) 1>C:\sdk_files\metamod-1.19\metamod\meta_api.h(187): error C2059: syntax error: 'while' 1>C:\sdk_files\metamod-1.19\metamod\meta_api.h(191): error C2143: syntax error: missing ';' before '{' 1>C:\sdk_files\metamod-1.19\metamod\meta_api.h(191): error C2447: '{': missing function header (old-style formal list?) 1>C:\sdk_files\metamod-1.19\metamod\meta_api.h(191): error C2059: syntax error: 'while' 1>C:\sdk_files\metamod-1.19\metamod\meta_api.h(205): error C2143: syntax error: missing ';' before '{' 1>C:\sdk_files\metamod-1.19\metamod\meta_api.h(205): error C2447: '{': missing function header (old-style formal list?) 1>C:\sdk_files\metamod-1.19\metamod\meta_api.h(223): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>C:\sdk_files\metamod-1.19\metamod\meta_api.h(287): error C2061: syntax error: identifier 'META_FUNCTIONS' 1>C:\sdk_files\metamod-1.19\metamod\meta_api.h(295): error C2061: syntax error: identifier 'META_FUNCTIONS' 1>amxxmodule.cpp 1>C:\sdk_files\hlsdk-2.3-p4\engine\eiface.h(382): warning C4005: 'ARRAYSIZE': macro redefinition 1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\um\winnt.h(1305): note: see previous definition of 'ARRAYSIZE' 1>C:\sdk_files\hlsdk-2.3-p4\dlls\util.h(248): warning C4091: 'typedef ': ignored on left of '' when no variable is declared 1>c:\sdk_files\metamod-1.19\metamod\types_meta.h(153): error C2059: syntax error: 'do' 1>c:\sdk_files\metamod-1.19\metamod\types_meta.h(153): error C2143: syntax error: missing ';' before '{' 1>c:\sdk_files\metamod-1.19\metamod\types_meta.h(153): error C2447: '{': missing function header (old-style formal list?) 1>c:\sdk_files\metamod-1.19\metamod\types_meta.h(153): error C2059: syntax error: 'while' 1>c:\sdk_files\metamod-1.19\metamod\types_meta.h(159): error C2143: syntax error: missing ';' before '{' 1>c:\sdk_files\metamod-1.19\metamod\types_meta.h(159): error C2447: '{': missing function header (old-style formal list?) 1>c:\sdk_files\metamod-1.19\metamod\types_meta.h(159): error C2059: syntax error: 'while' 1>c:\sdk_files\metamod-1.19\metamod\mreg.h(119): error C2143: syntax error: missing ';' before '{' 1>c:\sdk_files\metamod-1.19\metamod\mreg.h(119): error C2447: '{': missing function header (old-style formal list?) 1>c:\sdk_files\metamod-1.19\metamod\mreg.h(125): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\sdk_files\metamod-1.19\metamod\mreg.h(157): error C3646: 'status': unknown override specifier 1>c:\sdk_files\metamod-1.19\metamod\mreg.h(157): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\sdk_files\metamod-1.19\metamod\mreg.h(241): error C3646: 'status': unknown override specifier 1>c:\sdk_files\metamod-1.19\metamod\mreg.h(241): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\sdk_files\metamod-1.19\metamod\log_meta.h(151): error C2059: syntax error: 'do' 1>c:\sdk_files\metamod-1.19\metamod\log_meta.h(151): error C2143: syntax error: missing ';' before '{' 1>c:\sdk_files\metamod-1.19\metamod\log_meta.h(151): error C2447: '{': missing function header (old-style formal list?) 1>c:\sdk_files\metamod-1.19\metamod\log_meta.h(151): error C2059: syntax error: 'while' 1>c:\sdk_files\metamod-1.19\metamod\engine_api.h(535): error C2143: syntax error: missing ';' before '*' 1>c:\sdk_files\metamod-1.19\metamod\engine_api.h(535): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\sdk_files\metamod-1.19\metamod\engine_api.h(537): error C2143: syntax error: missing ';' before '*' 1>c:\sdk_files\metamod-1.19\metamod\engine_api.h(537): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\sdk_files\metamod-1.19\metamod\engine_api.h(895): error C2143: syntax error: missing ';' before '*' 1>c:\sdk_files\metamod-1.19\metamod\engine_api.h(895): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\sdk_files\metamod-1.19\metamod\engine_api.h(895): error C2378: 'sequenceEntry_s': redefinition; symbol cannot be overloaded with a typedef 1>c:\sdk_files\metamod-1.19\metamod\engine_api.h(535): note: see declaration of 'sequenceEntry_s' 1>c:\sdk_files\metamod-1.19\metamod\engine_api.h(897): error C2143: syntax error: missing ';' before '*' 1>c:\sdk_files\metamod-1.19\metamod\engine_api.h(897): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\sdk_files\metamod-1.19\metamod\engine_api.h(897): error C2378: 'sentenceEntry_s': redefinition; symbol cannot be overloaded with a typedef 1>c:\sdk_files\metamod-1.19\metamod\engine_api.h(537): note: see declaration of 'sentenceEntry_s' 1>C:\sdk_files\metamod-1.19\metamod\meta_api.h(187): error C2059: syntax error: 'do' 1>C:\sdk_files\metamod-1.19\metamod\meta_api.h(187): error C2143: syntax error: missing ';' before '{' 1>C:\sdk_files\metamod-1.19\metamod\meta_api.h(187): error C2447: '{': missing function header (old-style formal list?) 1>C:\sdk_files\metamod-1.19\metamod\meta_api.h(187): error C2059: syntax error: 'while' 1>C:\sdk_files\metamod-1.19\metamod\meta_api.h(191): error C2143: syntax error: missing ';' before '{' 1>C:\sdk_files\metamod-1.19\metamod\meta_api.h(191): error C2447: '{': missing function header (old-style formal list?) 1>C:\sdk_files\metamod-1.19\metamod\meta_api.h(191): error C2059: syntax error: 'while' 1>C:\sdk_files\metamod-1.19\metamod\meta_api.h(205): error C2143: syntax error: missing ';' before '{' 1>C:\sdk_files\metamod-1.19\metamod\meta_api.h(205): error C2447: '{': missing function header (old-style formal list?) 1>C:\sdk_files\metamod-1.19\metamod\meta_api.h(223): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>C:\sdk_files\metamod-1.19\metamod\meta_api.h(287): error C2061: syntax error: identifier 'META_FUNCTIONS' 1>C:\sdk_files\metamod-1.19\metamod\meta_api.h(295): error C2061: syntax error: identifier 'META_FUNCTIONS' 1>..\sdk\amxxmodule.cpp(2231): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>..\sdk\amxxmodule.cpp(2231): error C2370: 'META_FUNCTIONS': redefinition; different storage class 1>C:\sdk_files\metamod-1.19\metamod\meta_api.h(223): note: see declaration of 'META_FUNCTIONS' 1>..\sdk\amxxmodule.cpp(2231): error C2146: syntax error: missing ';' before identifier 'g_MetaFunctions_Table' 1>..\sdk\amxxmodule.cpp(2232): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>..\sdk\amxxmodule.cpp(2241): error C2440: 'initializing': cannot convert from 'initializer list' to 'int' 1>..\sdk\amxxmodule.cpp(2241): note: The initializer contains too many elements 1>..\sdk\amxxmodule.cpp(2243): error C2733: 'Meta_Query': second C linkage of overloaded function not allowed 1>C:\sdk_files\metamod-1.19\metamod\meta_api.h(267): note: see declaration of 'Meta_Query' 1>..\sdk\amxxmodule.cpp(2294): error C2061: syntax error: identifier 'META_FUNCTIONS' 1>..\sdk\amxxmodule.cpp(2300): error C2065: 'pMGlobals': undeclared identifier 1>..\sdk\amxxmodule.cpp(2304): error C2065: 'pMGlobals': undeclared identifier 1>..\sdk\amxxmodule.cpp(2305): error C2065: 'pFunctionTable': undeclared identifier 1>..\sdk\amxxmodule.cpp(2310): error C2065: 'pFunctionTable': undeclared identifier 1>..\sdk\amxxmodule.cpp(2311): error C2065: 'pGamedllFuncs': undeclared identifier 1>Generating Code... 1>Done building project "fun.vcxproj" -- FAILED.

Arkshine 07-24-2017 07:10

Re: [TUT NEEDED] Setting up Visual Studio 17 for module coding
 
You did not clone the hldsk and/or metamod from alliedmods github.

Abhinash 07-24-2017 13:03

Re: [TUT NEEDED] Setting up Visual Studio 17 for module coding
 
I followed the steps provided in wiki and thats the result.
Please give me link to Alliedmodders HUB

Arkshine 07-24-2017 13:23

Re: [TUT NEEDED] Setting up Visual Studio 17 for module coding
 
Well, you followed an old tutorial before AMXX moved to github (there is an announcement about it).

https://github.com/alliedmodders/

git clone https://github.com/alliedmodders/metamod-hl1
git clone https://github.com/alliedmodders/hlsdk
git clone --recursive https://github.com/alliedmodders/amxmodx

PRoSToTeM@ 07-24-2017 16:24

Re: [TUT NEEDED] Setting up Visual Studio 17 for module coding
 
@Arkshine hm, metamod and hlsdk can be done as submodules, like amtl.

Abhinash 07-24-2017 22:57

Re: [TUT NEEDED] Setting up Visual Studio 17 for module coding
 
All 3 folders will be in a single Folder like SDK.
Am I right ?

Abhinash 07-26-2017 19:30

Re: [TUT NEEDED] Setting up Visual Studio 17 for module coding
 
Please reply

Bugsy 03-27-2021 11:42

Re: [TUT NEEDED] Setting up Visual Studio 17 for module coding
 
Can anyone help me get up and running in Visual Studio 2019? I am getting the same errors as Abhinash. A chat might be ideal since I'm a noob with C++ for the most part. I don't need help coding, just getting the application to compile.

I downloaded amxmodx, hlsdk, and metamod and have them listed in the Include directories. No experience with github.


All times are GMT -4. The time now is 07:32.

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