Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compilation on GCC 4.9.2 #14

Merged
1 commit merged into from
May 7, 2015
Merged

Fix compilation on GCC 4.9.2 #14

1 commit merged into from
May 7, 2015

Conversation

uint32
Copy link
Contributor

@uint32 uint32 commented May 7, 2015

Fixes this:

g++ -m32 -Ilib -DSAMPGDK_AMALGAMATION -nodefaultlibs -D YSF -c -O3 -fpack-struct=1 -fPIC -w -DLINUX ./src/*.cpp
./src/Hooks.cpp:372:6: error: prototype for ‘bool CHookRakServer::Send(void*, RakNet::BitStream*, int, int, unsigned int, PlayerID, bool)’ does not match any in class ‘CHookRakServer’
 bool CHookRakServer::Send(void* ppRakServer, RakNet::BitStream* parameters, int priority, int reliability, unsigned orderingChannel, PlayerID playerId, bool broadcast)
      ^
./src/Hooks.cpp:61:14: error: candidate is: static bool CHookRakServer::Send(void*, RakNet::BitStream*, PacketPriority, PacketReliability, unsigned int, PlayerID, bool)
  static bool Send(void* ppRakServer, RakNet::BitStream* parameters, PacketPriority priority, PacketReliability reliability, unsigned orderingChannel, PlayerID playerId, bool broadcast);
              ^
makefile:22: recipe for target 'YSF' failed
make: *** [YSF] Error 1
gcc -m32 -Ilib -DSAMPGDK_AMALGAMATION -nodefaultlibs -fshort-wchar -shared -o "./YSF.so" *.o
CCallbackManager.o: In function `CCallbackManager::OnPlayerEnterGangZone(unsigned short, unsigned short)':
CCallbackManager.cpp:(.text+0x202): undefined reference to `__stack_chk_fail_local'
CCallbackManager.o: In function `CCallbackManager::OnPlayerLeaveGangZone(unsigned short, unsigned short)':
CCallbackManager.cpp:(.text+0x2e2): undefined reference to `__stack_chk_fail_local'
CCallbackManager.o: In function `CCallbackManager::OnPlayerEnterPlayerGangZone(unsigned short, unsigned short)':
CCallbackManager.cpp:(.text+0x3c2): undefined reference to `__stack_chk_fail_local'
CCallbackManager.o: In function `CCallbackManager::OnPlayerLeavePlayerGangZone(unsigned short, unsigned short)':
CCallbackManager.cpp:(.text+0x4a2): undefined reference to `__stack_chk_fail_local'
CCallbackManager.o: In function `CCallbackManager::OnPlayerPauseStateChange(unsigned short, bool)':
CCallbackManager.cpp:(.text+0x582): undefined reference to `__stack_chk_fail_local'
CCallbackManager.o:CCallbackManager.cpp:(.text+0x679): more undefined references to `__stack_chk_fail_local' follow
collect2: error: ld returned 1 exit status
makefile:22: recipe for target 'YSF' failed
make: *** [YSF] Error 1

(GCC 4.9.2 @ Kubuntu Vivid 15.04)

I tested it and it builds and gets loaded by the server without issues.

ghost pushed a commit that referenced this pull request May 7, 2015
Fix compilation on GCC 4.9.2
@ghost ghost merged commit bb7b945 into IS4Code:YSF_ May 7, 2015
@djacicd djacicd mentioned this pull request Nov 21, 2017
@dnl-k dnl-k mentioned this pull request Apr 27, 2018
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant