Raised This Month: $32 Target: $400
 8% 

Compiling CSTRIKE


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
PartialCloning
Senior Member
Join Date: Dec 2015
Old 04-10-2016 , 21:21   Compiling CSTRIKE
Reply With Quote #1

I'm trying to compile the cstrike module using the GNU GCC compiler on windows but I'm getting several errors:

PHP Code:
hlsdk-master\public/steam/steamtypes.h:35:9error'__int16' does not name a type
 typedef __int16 int16
;
         ^
hlsdk-master\public/steam/steamtypes.h:36:26errorexpected initializer before 'uint16'
 
typedef unsigned __int16 uint16;
                          ^
hlsdk-master\public/steam/steamtypes.h:37:9error'__int32' does not name a type
 typedef __int32 int32
;
         ^
hlsdk-master\public/steam/steamtypes.h:38:26errorexpected initializer before 'uint32' 
Am I missing a file?
PartialCloning is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-11-2016 , 06:08   Re: Compiling CSTRIKE
Reply With Quote #2

How do you compile? What GCC version? Are you talking about cstrike module?
__________________
Arkshine is offline
PartialCloning
Senior Member
Join Date: Dec 2015
Old 04-11-2016 , 12:48   Re: Compiling CSTRIKE
Reply With Quote #3

I use codeblocks, which bundles MinGW's gcc/g++, currently running version gcc (tdm-1) 4.9.2

I am trying to compile the cstrike module.
Using the following:

https://github.com/alliedmodders/hlsdk
https://github.com/alliedmodders/metamod-hl1
https://github.com/alliedmodders/amtl
https://github.com/alliedmodders/amxmodx
PartialCloning is offline
JusTGo
Veteran Member
Join Date: Mar 2013
Old 03-21-2017 , 10:18   Re: Compiling CSTRIKE
Reply With Quote #4

i don't know if this have drawbacks but it worked for me:
1- Add #include <windows.h> in every .cpp file going to be compiled.

this should fix that error when compiling, if the module fails to load when you install it try this :

2-go build options>Linker settings>other linker options and add this line: -Wl,--kill-at
__________________

Last edited by JusTGo; 03-21-2017 at 16:30.
JusTGo is offline
Old 03-21-2017, 10:39
JusTGo
This message has been deleted by JusTGo. Reason: not needed just add #include <windows.h>
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 03-21-2017 , 14:22   Re: Compiling CSTRIKE
Reply With Quote #5

For windows, generally Visual Studio is used (msvc)
__________________
WildCard65 is offline
JusTGo
Veteran Member
Join Date: Mar 2013
Old 03-21-2017 , 16:29   Re: Compiling CSTRIKE
Reply With Quote #6

Quote:
Originally Posted by WildCard65 View Post
For windows, generally Visual Studio is used (msvc)
codeblocks is open source and like you said it support mac and linux.


also forgot about the #include "main.h" just add this #include <windows.h> instead.
__________________
JusTGo is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-21-2017 , 17:22   Re: Compiling CSTRIKE
Reply With Quote #7

Or you can use the official way to build AMXX, with AMBuild in the same way under windows/linux/osx. https://wiki.alliedmods.net/Building_AMX_Mod_X.
__________________
Arkshine is offline
JusTGo
Veteran Member
Join Date: Mar 2013
Old 03-21-2017 , 17:59   Re: Compiling CSTRIKE
Reply With Quote #8

can it get used with gcc compiler on windows instead of the Visual Studio compiler ?
__________________

Last edited by JusTGo; 03-21-2017 at 17:59.
JusTGo is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 03-21-2017 , 18:24   Re: Compiling CSTRIKE
Reply With Quote #9

You can't run gcc on Windows. What you can do is, if you have Windows 10, turn on Linux Subsystem for Windows and compile it there using gcc.
klippy is offline
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 19:39.


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