I’m attempting to compile and build Pencil2D from the GitHub Source code and I’ve hit some error messages that I can’t seem to find a solution for. I’m still quite new to c++, and git, and Qt, so I may be missing something obvious, but I just don’t know what to make of some of these errors:
gerg@gerg-MS-7693 ~/Pencil2D_Sources/pencil $ make
...
...
In file included from interface/editor.cpp:54:0:
managers/preferencemanager.h: In member function ‘void Editor::makeConnections()’:
managers/preferencemanager.h:76:10: error: ‘void PreferenceManager::optionChanged(SETTING)’ is protected
void optionChanged( SETTING e );
^
interface/editor.cpp:128:54: error: within this context
connect( mPreferenceManager, &PreferenceManager::optionChanged, this, &Editor::settingUpdated );
interface/editor.cpp:128:99: error: no matching function for call to ‘Editor::connect(PreferenceManager*&, void (PreferenceManager::*)(SETTING), Editor* const, void (Editor::*)(SETTING))’
connect( mPreferenceManager, &PreferenceManager::optionChanged, this, &Editor::settingUpdated );
...
...
How come the compiler is claiming that void optionChanged( SETTING e ); is a protected class? It’s not directly marked as such in the code. Is it a function of the Q_SIGNALS: macro?
Also, what is the e doing in void optionChanged( SETTING e );? Is it the same as the option term in the other member functions in Preferencemanager.h, or does it serve a different objective?
Finally, in the line error: no matching function for call to ‘Editor::connect(PreferenceManager*&, void (PreferenceManager::)(SETTING), Editor const, void (Editor::*)(SETTING))’ what part of the code is the error message referring to? All the associated member functions exist I think… Is the optionChanged(SETTING e) function implemented by the Q_SIGNALS: macro?
I’m sorry if this comes off as a question dump. I’ve got a lot of learning to do still, and I appreciate any advice.
Hello again. I’ve been studying up on QT and the Pencil2D source code since I posted this, and I wanted to follow up with some of the (very slow) progress that I’ve made so far. Some of this progress has also lead to new questions which I am choosing to post in this thread since it still fits under the scope of the subject line.
So the first error I posted seems to be caused by a syntax error found in
pencil/core_lib/interface/editor.cpp Line 126 regarding the connect() QT function. These are the changes that I made:
g++ accepted these changes and the same changes followed for
pencil/core_lib/interface/scribblearea.cpp Line 63
I will note that I am still debugging compiler errors, so I can’t say whether these changes will make Pencil2D function properly on Linux. I can only say that they make it compile. The errors that I am currently trying to debug are related to the version of QT that I am compiling with: inside pencil/core_lib/interface/scribblearea.cpp is the member functions pixelDelta() and angleDelta() which are member functions of the QWheelEvent class and are only avaliable starting from QT version 5. Up to now I’ve been compiling the code using QT v4 because it solved an earilier compiling error I had. Specifically this one:
With this conflict, my question is which version of QT should I be building the source code for? Is there anywhere I can go to check details like this if I face a conflict in the future?
@gregorysonofcarl No, thanks to you! It’s hard to come by people that actually want to help with the project. It’s ok to take your time, we all have a busy agenda. If I knew C++ I’d be helping you guys in a heartbeat, but C++ with Qt in general seems too cryptic for me. I’ve coded in python and Javascript (strict) but only menial things.
The lead devs are kind of “away”, one of them said he’d be coming back next month to work on Pencil again, but he already has a very definite task in progress which is to continue to merge the MyPaintLib with Pencil2D, so far what he’s reported is positive, but that alone it’s still a lot of work. So you’re possibly the only person that is debugging the current source code.
If there’s anything you want to report befitting the code, please do it in the Github as well because that’s the place where other future devs can see it and possibly comment and / or help you with.
Thanks for the reply @Jose_Moreno. I certainly agree that C++ and QT are cryptic af and getting to a point where I feel like I understand it is going to be a long time coming. It’s pretty sad, but I actually wasn’t aware of the Github issue tracker before. After checking it though, I’ve learned that I should be using QT v5, so I guess I’ll be seeing to those errant modules for now. I’ll submit an issue ticket for this on Github after I’ve tinkered with it a little more.
Thanks again, and I look forward to the day when I’m able to contribute to the world of Open Source.
@gregorysonofcarl Heym I don’t know if you’re still trying to do this, but if you are there’s a guide to compile and build from linux sources here:
Also, there’s been advances on creating true nightly builds using “Travis”. As far as I’ve understood everytime there’s a new commit you’ll be able to review the builds on the Google Drive folder here: