How to compile C++ files (.cpp, .hpp) at file libcod.so??
Printable View
How to compile C++ files (.cpp, .hpp) at file libcod.so??
As written in README.md in https://github.com/kungfooman/libcod
Working with the source / Compiling:
If you have CoD2 1.3 e.g. you do:Code:./doit.sh tar
./doit.sh base # compiles object files needed by every .so
./doit.sh cod1_1_5 # compiles object files for CoD 1 1.5 and linking them against base to the actual bin/libcod1_1_5.so
./doit.sh cod2_1_2
./doit.sh cod2_1_3
./doit.sh cod4_1_7
./doit.sh wrapper
Then the .so file is build as bin/libcod2_1_3.soCode:./doit.sh base
./doit.sh cod2_1_3
Start server error:
"Segmentation fault"
Compile error:
"/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../crti.o: could not read symbols: File in wrong format
collect2: ld returned 1 exit status"
No clue which part of the compiling toolchain is failing, maybe just go the easiest way and use e.g. Ubuntu 14.04.
If you really want to compile it on RedHat, debug the doit.sh step by step to figure out which command fails and fit it.
Let me step by step instructions please
Maybe my paramentry VDS are not what you need :)
Tell me how to find out the exact details of my VDS
sry, very,very,very... bad english :(
CentOS is based on Red Hat. So try the instructions from this post: http://killtube.org/showthread.php?2...ll=1#post10702
Start server:
Use ./doit.sh wrapper:Code:================================
> [INFO] Compiled for: CoD2 1.3
Compiled: Aug 11 2015 21:17:17
> [INFO] value of closer=081141ba
> [INFO] value of download=0808f940
Segmentation fault
=================================
Help me guys ;(Code:=================================
##### WRAPPER: COMPILE wrapper_libcod2.cpp #####
cp: cannot stat `wrapper_libcod2.cpp': No such file or directory
gcc: a.cpp: No such file or directory
gcc: no input files
##### WRAPPER: LINK wrapper_libcod2.so #####
gcc: wrapper_libcod2.opp: No such file or directory
gcc: no input files
cp: cannot stat `wrapper_libcod2.so': No such file or directory
=================================
Can you post the errors from 'dmesg' regarding the segmentation fault?
It might be because of SELinux which is enabled by default in Red Hat.
Can you also post the output of the following command for libcod2_1..so and your cod2 binary.
https://access.redhat.com/documentat...Processes.htmlPHP Code:
ls -Z filename
https://access.redhat.com/documentat...SELinux_Status
Info
Code:-rwxr-xr-x root root ? libcod2_1_3.so
SELinux status: disabled
Install Ubuntu 14.04
Everything worked out!)