Unable to complie vegastrike-src-0.5.1.r1 in Ubuntu14.04

Trying to build your own version of Vega Strike and having problems? Unix users, paste your config.log here (stderr output alone is not helpful).
Post Reply
niubaty
Star Pilot
Star Pilot
Posts: 5
Joined: Wed Jan 27, 2016 2:14 pm

Unable to complie vegastrike-src-0.5.1.r1 in Ubuntu14.04

Post by niubaty »

It first failed in objconv/mesher/to_OgreMesh.cpp, and solved by the instruction of http://forums.vega-strike.org/viewtopic.php?f=5&t=20267

and then a new fail...

Code: Select all

Linking CXX executable mesh_tool
CMakeFiles/mesh_tool.dir/mesher/to_OgreMesh.o:在函数‘OgreMeshConverter::Init()’中:
to_OgreMesh.cpp:(.text+0x903):undefined references to 'vtable for Ogre::MeshPtr'
CMakeFiles/mesh_tool.dir/mesher/to_OgreMesh.o:在函数‘OgreMeshConverter::Init(char const*, char const*)’中:
to_OgreMesh.cpp:(.text+0xfa1):undefined references to 'vtable for Ogre::MeshPtr'
CMakeFiles/mesh_tool.dir/mesher/to_OgreMesh.o:在函数‘OgreMeshConverter::Optimize(void*)’中:
to_OgreMesh.cpp:(.text+0x1b06):undefined references to 'vtable for Ogre::MeshPtr'
to_OgreMesh.cpp:(.text+0x1b45):undefined references to 'vtable for Ogre::MeshPtr'
to_OgreMesh.cpp:(.text+0x1c00):undefined references to 'vtable for Ogre::MeshPtr'
CMakeFiles/mesh_tool.dir/mesher/to_OgreMesh.o:to_OgreMesh.cpp:(.text+0x1e16): more undefined references to `vtable for Ogre::MeshPtr' follow
CMakeFiles/mesh_tool.dir/mesher/to_OgreMesh.o:在函数‘OgreMeshConverter::AutoLOD(void*, bool, int, float, float)’中:
to_OgreMesh.cpp:(.text+0x1fca):对‘Ogre::ProgressiveMesh::generateLodLevels(Ogre::Mesh*, std::vector<float, Ogre::STLAllocator<float, Ogre::CategorisedAllocPolicy<(Ogre::MemoryCategory)0> > > const&, Ogre::ProgressiveMesh::VertexReductionQuota, float)' undefined reference
CMakeFiles/mesh_tool.dir/mesher/to_OgreMesh.o:在函数‘OgreMeshConverter::DoneMeshes(void*)’中:
to_OgreMesh.cpp:(.text+0x26c9):undefined references to 'vtable for Ogre::MeshPtr'
CMakeFiles/mesh_tool.dir/mesher/to_OgreMesh.o:在函数‘OgreMeshConverter::AddMesh(void*, XML const&, std::string const&, bool, bool) [clone .constprop.390]’中:
to_OgreMesh.cpp:(.text+0x2bb6):undefined references to 'vtable for Ogre::MeshPtr'
collect2: error: ld returned 1 exit status
make[2]: *** [objconv/mesh_tool] 错误 1
make[1]: *** [objconv/CMakeFiles/mesh_tool.dir/all] 错误 2
make: *** [all] 错误 2
how to solve this?
loki1950
The Shepherd
Posts: 5841
Joined: Fri May 13, 2005 8:37 pm
Location: Ottawa
Contact:

Re: Unable to complie vegastrike-src-0.5.1.r1 in Ubuntu14.04

Post by loki1950 »

The failed compile is for mesher which is a command line utility for creating ships with our custom mesh format it is not needed if you just want to play the game.

Enjoy the Choice :)
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 19.2/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo ideapad 320-15ARB Win 10/Mint 19.2
niubaty
Star Pilot
Star Pilot
Posts: 5
Joined: Wed Jan 27, 2016 2:14 pm

Re: Unable to complie vegastrike-src-0.5.1.r1 in Ubuntu14.04

Post by niubaty »

loki1950 wrote:The failed compile is for mesher which is a command line utility for creating ships with our custom mesh format it is not needed if you just want to play the game.
The utility for creating ships is cool, what should I do if I want to compile it?
:)

And I remove the follow content in CMakeLists.txt

Code: Select all

find_package(OGRE)
IF(OGRE_FOUND)
    SET(TST_INCLUDES ${TST_INCLUDES} ${OGRE_INCLUDE_DIR})
    SET(TST_LIBS ${TST_LIBS} ${OGRE_LIBRARY})
    add_definitions(${OGRE_DEFINITIONS})
    SET(HAVE_OGRE 1)
    message("++ Found Ogre: ${OGRE_VERSION}")
ELSE(OGRE_FOUND)
    message("-- Ogre Not Found: compiling without")
ENDIF(OGRE_FOUND)
remake it, but it stops at about 71% with the following error.

Code: Select all

/home/clicknight/vegastrike-src-0.5.1.r1/src/resizable.h:19:43: error: ‘memcpy’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
         memcpy( q, c.q, sizeof (ITEM)*num );
                                           ^
In file included from /usr/include/features.h:374:0,
                 from /usr/include/stdio.h:27,
                 from /home/clicknight/vegastrike-src-0.5.1.r1/src/gfx/quadsquare.cpp:12:
/usr/include/x86_64-linux-gnu/bits/string3.h:48:1: note: ‘void* memcpy(void*, const void*, size_t)’ declared here, later in the translation unit
 __NTH (memcpy (void *__restrict __dest, const void *__restrict __src,
 ^
make[2]: *** [CMakeFiles/vegastrike.dir/src/gfx/quadsquare.o] error 1
make[1]: *** [CMakeFiles/vegastrike.dir/all] error 2
make: *** [all] error 2
Now what should I do to go on?
Last edited by niubaty on Sat Jan 30, 2016 9:58 am, edited 1 time in total.
niubaty
Star Pilot
Star Pilot
Posts: 5
Joined: Wed Jan 27, 2016 2:14 pm

Re: Unable to complie vegastrike-src-0.5.1.r1 in Ubuntu14.04

Post by niubaty »

To the "memcpy" problem:
Adding "include <string.h>" to the head of the cpp file.
and I also remove the ffmpeg part of the CMakeLists.txt as follow.

Code: Select all

#find_package(FFMPEG)
#IF(FFMPEG_FOUND)
#	SET(TST_INCLUDES ${TST_INCLUDES} ${FFMPEG_INCLUDE_DIRS})
#	SET(TST_LIBS ${TST_LIBS} ${FFMPEG_LIBRARIES})
#	add_definitions(${FFMPEG_DEFINITIONS})
#	SET(HAVE_FFMPEG 1 )
#	IF(swscale1_FOUND)
#        message("++ FFmpeg's libswscale found.")
#	ELSE(swscale1_FOUND)
#        message("-- FFMpeg's libswscale not found... depending on your ffmpeg version, VS might not build.")
#	ENDIF(swscale1_FOUND)
#ELSE(FFMPEG_FOUND)
#	message("-- FFMPEG Not Found")
#ENDIF(FFMPEG_FOUND)
but a new fail occurs.

Code: Select all

/home/clicknight/vegastrike-src-0.5.1.r1/src/cmd/unit.cpp:726:16:   required from here
/home/clicknight/vegastrike-src-0.5.1.r1/src/cmd/unit_jump.h:111:153: error: ‘SetCurPosition’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
                             SetCurPosition( this->LocalPosition()+this->cumulative_transformation_matrix.getR()*( 4*( this->rSize()+tester->rSize() ) ) );
                                                                                                                                                         ^
/home/clicknight/vegastrike-src-0.5.1.r1/src/cmd/unit_jump.h:111:153: note: declarations in dependent base ‘Unit’ are not found by unqualified lookup
/home/clicknight/vegastrike-src-0.5.1.r1/src/cmd/unit_jump.h:111:153: note: use ‘this->SetCurPosition’ instead
How to go on
niubaty
Star Pilot
Star Pilot
Posts: 5
Joined: Wed Jan 27, 2016 2:14 pm

Re: Unable to complie vegastrike-src-0.5.1.r1 in Ubuntu14.04

Post by niubaty »

as it says:
use 'this->SetCurPosition' instead 'SetCurPosition'

and remake.
this problem will be solved
niubaty
Star Pilot
Star Pilot
Posts: 5
Joined: Wed Jan 27, 2016 2:14 pm

Re: Unable to complie vegastrike-src-0.5.1.r1 in Ubuntu14.04

Post by niubaty »

The game finally runs good, thanks.
Post Reply