Solarus-Games English Forum

Solarus => Development => Topic started by: icedfrogz on February 18, 2016, 01:11:36 AM

Title: Need help setting up Solarus Quest Editor in Ubuntu
Post by: icedfrogz on February 18, 2016, 01:11:36 AM
Hey,

I have been having some issues trying to get the quest editor up and running. I set up Solarus v1.4 with no issues using cmake, but during the build for the quest editor I keep receiving this error:

/home/kris/solarus-quest-editor-1.4/src/entities/entity_model.cpp: In static member function 'static EntityModelPtr EntityModel::create(MapModel&, const QString&)':
/home/kris/solarus-quest-editor-1.4/src/entities/entity_model.cpp:115:69: error: no matching function for call to 'Solarus::EntityData::import_from_buffer(std::string, const char [7])'
   if (!data.import_from_buffer(entity_string.toStdString(), "entity")) {
                                                                     ^
/home/kris/solarus-quest-editor-1.4/src/entities/entity_model.cpp:115:69: note: candidate is:
In file included from /usr/local/include/solarus/EntityData.h:24:0,
                 from /usr/local/include/solarus/MapData.h:22,
                 from /home/kris/solarus-quest-editor-1.4/include/entities/entity_traits.h:22,
                 from /home/kris/solarus-quest-editor-1.4/include/entities/entity_model.h:20,
                 from /home/kris/solarus-quest-editor-1.4/include/entities/block.h:20,
                 from /home/kris/solarus-quest-editor-1.4/src/entities/entity_model.cpp:17:
/usr/local/include/solarus/lua/LuaData.h:41:10: note: bool Solarus::LuaData::import_from_buffer(const string&)
     bool import_from_buffer(const std::string& buffer);
          ^
/usr/local/include/solarus/lua/LuaData.h:41:10: note:   candidate expects 1 argument, 2 provided

The commands I used were:

$ cd solarus-quest-editor-1.4
$mkdir build
$cd build
$cmake -DSOLARUS_INCLUDE_DIR=~/solarus-1.4/build/include -DSOLARUS_LIBRARY=~/solarus-1.4/build/libsolarus.so ..
$make -j4 //This is where it throws the error

Any help would be much appreciated. Thanks
Title: Re: Need help setting up Solarus Quest Editor in Ubuntu
Post by: Christopho on February 18, 2016, 09:02:04 AM
You have an older version of Solarus 1.4. You have probably compiling Solarus Quest Editor 1.4.5 with Solarus 1.4.0 or something like that. Make sure that you compile the most recent release of both (1.4.5).
Title: Re: Need help setting up Solarus Quest Editor in Ubuntu
Post by: icedfrogz on February 18, 2016, 09:53:55 PM
I grabbed both of the 1.4 versions from your github account. Shouldn't they both be the same versions?
Title: Re: Need help setting up Solarus Quest Editor in Ubuntu
Post by: Christopho on February 19, 2016, 09:03:23 AM
If you download from github, you should download a specific release as well: https://github.com/christopho/solarus/releases/tag/v1.4.5 and https://github.com/christopho/solarus-quest-editor/releases/tag/v1.4.5.

Or if you want the development version (unstable), use the current dev branch or both.
Title: Re: Need help setting up Solarus Quest Editor in Ubuntu
Post by: Christopho on February 19, 2016, 09:05:01 AM
According to the error message, the LuaData.h file you have is not the same as in the 1.4 branch: https://github.com/christopho/solarus/blob/v1.4/include/solarus/lua/LuaData.h
Title: Re: Need help setting up Solarus Quest Editor in Ubuntu
Post by: icedfrogz on February 20, 2016, 07:00:10 AM
Thanks for all of the help, but I figured it out. I feel really dumb. I was referencing the include file for the Solarus build instead of the library (I think that's what its called). So it should be:

cmake -DSOLARUS_INCLUDE_DIR=~/solarus-1.4/include -DSOLARUS_LIBRARY=~/solarus-1.4/build/libsolarus.so ..