View Single Post
ghost95v
Senior Member
Join Date: Apr 2014
Location: somewhere in universe
Old 08-31-2017 , 09:02   Re: Linux/ Centos 7 compiling module
Reply With Quote #3

So what command should i use to make a cpp file executable .so
For example this code


PHP Code:
#include "amxxmodule.h" 

#include <stdio.h> 
#include <string.h> 
#include <ctype.h> 

#if !defined __linux__ 
static signed int pread(signed int Numbervoid pBuffersize_t Countlong Offset

return (
lseek(NumberOffsetSEEK_SET) != Offset) ? ((signed int) (-1)) : ((signed int) (read(NumberpBufferCount))); 

#endif 

char replace(char const * const originalchar const * const patternchar const * const replacement

size_t const replen strlen(replacement); 
size_t const patlen strlen(pattern); 
size_t const orilen strlen(original); 

size_t patcnt 0
const 
char oriptr
const 
char patloc

for (
oriptr originalpatloc strstr(oriptrpattern); oriptr patloc patlen

patcnt++; 



size_t const retlen orilen patcnt * (replen patlen); 
char * const returned = (char *) mallocsizeof(char) * (retlen 1) ); 

if (
returned != NULL

char retptr returned
for (
oriptr originalpatloc strstr(oriptrpattern); oriptr patloc patlen

size_t const skplen patloc oriptr
strncpy(retptroriptrskplen); 
retptr += skplen
strncpy(retptrreplacementreplen); 
retptr += replen

strcpy(retptroriptr); 

return 
returned



send_intermissionAMX *, cell * ) 

MESSAGE_BEGINMSG_ALLSVC_INTERMISSION ); 
MESSAGE_END( ); 

return 
1

__________________
ghost95v is offline
Send a message via Skype™ to ghost95v