VGOEmulator.net

A Development Project for the Vanguard:Saga of Heroes MMO

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • Portal
  • Project Manager
  • Bug Tracker
  • Server List
  • Wiki
  • Donate
  • Login
  • Register
  • Board index Support Linux
  • Search

Compilation issues with rev709-710

Help with the Linux x86/x64 versions of the VGOEmulator Server

Moderator: Community Managers

Post Reply
  • Print view
Advanced search
6 posts • Page 1 of 1
User avatar
Blackstorm
Retired
Posts: 354
Joined: Thu Sep 04, 2014 11:11 am
Location: Paris, FRANCE
Contact:
Contact Blackstorm
Website
Compilation issues with rev709-710
  • Quote

Post by Blackstorm » Tue Oct 14, 2014 9:34 am

Hi,

Follow this trick to compile the rev710 under Linux (Debian).

I only have updated the Gcc 4.7.2 to the new one on unstable sources (4.9.1) in case of the problem was with the c++11 directives but it should work with gcc 4.7+

- First, like John said, add in the "Makefile", at the end after "Combat.o" this :

Code: Select all

Combat.o \
PatchServer.o \
MasterSpawnList.o
- 2nd : You need to edit the MasterSpawnList.cpp and find this code :

Line 110 :

Code: Select all

npc_list.AddNpc(make_shared<Npc>(npc_spawns[spawn_id], itr.second));
replace by :

Code: Select all

auto myNpc = make_shared<Npc>(npc_spawns[spawn_id], itr.second);
npc_list.AddNpc(myNpc);
Line 134 :

Code: Select all

ppo_list.AddPPO(make_shared<PlayerPlacedObject>(ppo_spawns[itr2.spawn_id], itr.second));
replace by :

Code: Select all

auto myPPO = make_shared<PlayerPlacedObject>(ppo_spawns[itr2.spawn_id], itr.second);
ppo_list.AddPPO(myPPO);
Line 170 :

Code: Select all

mover_list.AddMover(make_shared<Mover>(itr));
replace by :

Code: Select all

auto myMover = make_shared<Mover>(itr);
mover_list.AddMover(myMover);
- 3rd, edit MasterSpawnList.h

Line 157-158 should be only :

Code: Select all

MasterSpawnList();
~MasterSpawnList();

Do "make" ^^

You could have a warning/notice about Lua :

Code: Select all

../Lua/liblua5-2-3.a(loslib.o): dans la fonction « os_tmpname »:
loslib.c:(.text+0x29c): AVERTISSEMENT: the use of `tmpnam' is dangerous, better use `mkstemp'
but not sure, maybe it's only on my server ^^

Enjoy!!
Twuce ^^
Last edited by Blackstorm on Tue Oct 14, 2014 1:07 pm, edited 4 times in total.
Top

Lokked
Principle Developer
Principle Developer
Posts: 600
Joined: Wed Aug 06, 2014 3:15 pm
Re: Compilation issues with rev709-710
  • Quote

Post by Lokked » Tue Oct 14, 2014 9:57 am

You can also declare (in the AddNpc/PPO/Mover functions in their respective classes) the const qualifier before the shared_ptr<Npc/PlayerPlacedObject/etc> and it will compile. Thanks to Ratief for finding this particular solution.

Thanks for sleuthing this out, Blackstorm!
Top

User avatar
John Adams
Retired
Posts: 4581
Joined: Wed Aug 28, 2013 9:40 am
Location: Phoenix, AZ.
Contact:
Contact John Adams
Website
Re: Compilation issues with rev709-710
  • Quote

Post by John Adams » Tue Oct 14, 2014 10:32 am

Ratief has made an official fix for this, and my linux world is once again compiling. After I've had some time to test a few recent code commits, and possible fix to recent crashes, I will update Public SVN with fixed Linux, code and new vgo_world.sql schema.
Top

User avatar
Blackstorm
Retired
Posts: 354
Joined: Thu Sep 04, 2014 11:11 am
Location: Paris, FRANCE
Contact:
Contact Blackstorm
Website
Re: Compilation issues with rev709-710
  • Quote

Post by Blackstorm » Tue Oct 14, 2014 10:36 am


Can i have a concret example for the fix please ? i would like to understand the solution ^^ (i understand the looked's post but i am not a c++ dev so i don't see how the code fully works^^)
Top

User avatar
John Adams
Retired
Posts: 4581
Joined: Wed Aug 28, 2013 9:40 am
Location: Phoenix, AZ.
Contact:
Contact John Adams
Website
Re: Compilation issues with rev709-710
  • Quote

Post by John Adams » Tue Oct 14, 2014 10:40 am

Example, very simple fix which is exactly what StackOverflow responses suggested:

Change:

Code: Select all

void NpcList::AddNpc(shared_ptr<Npc>& npc)
To

Code: Select all

void NpcList::AddNpc(const shared_ptr<Npc>& npc)
Top

User avatar
Blackstorm
Retired
Posts: 354
Joined: Thu Sep 04, 2014 11:11 am
Location: Paris, FRANCE
Contact:
Contact Blackstorm
Website
Re: Compilation issues with rev709-710
  • Quote

Post by Blackstorm » Tue Oct 14, 2014 10:41 am

ahh ^^ ok, thanks a lot for the example ^^
Top


Post Reply
  • Print view

6 posts • Page 1 of 1

Return to “Linux”

Jump to
  • Information
  • ↳   Announcements
  • ↳   Dev Chats
  • ↳   Events
  • Community
  • ↳   General Discussions
  • ↳   VGO Team Help Requests
  • ↳   Introductions
  • ↳   Game Features
  • ↳   Wish List
  • ↳   Off-Topic
  • Support
  • ↳   How-To's
  • ↳   General Support
  • ↳   Windows
  • ↳   Linux
  • Bugs
  • ↳   Server Bugs
  • ↳   Server Bugs (Closed)
  • ↳   Content Bugs
  • ↳   Content Bugs (Closed)
  • ↳   Database Bugs
  • ↳   Tools Bugs
  • Board index
  • All times are UTC-07:00
  • Delete cookies
  • Contact us
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD