nurupo / ProjectTox-Qt-GUI

A cross-platform front end for ProjectTox Core library, written in C++11 with use of Qt5
GNU General Public License v3.0
342 stars 116 forks source link

got an error in m_callback_userstatus #30

Closed cidious closed 11 years ago

cidious commented 11 years ago

after the git pull I got the following error: (2 days ago it was compiled OK)

../src/core.cpp: In member function ‘void Core::setStatusMessage(const QString&)’:
../src/core.cpp:134:58: error: cannot convert ‘uint8_t* {aka unsigned char*}’ to ‘USERSTATUS’ for argument ‘1’ to ‘int m_set_userstatus(USERSTATUS)’
     if (m_set_userstatus(cMessage.data(), cMessage.size()) == -1) {
                                                          ^
../src/core.cpp: In member function ‘void Core::start()’:
../src/core.cpp:189:46: error: invalid conversion from ‘void (*)(int, uint8_t*, uint16_t) {aka void (*)(int, unsigned char*, short unsigned int)}’ to ‘void (*)(int, USERSTATUS)’ [-fpermissive]
     m_callback_userstatus(onUserStatusChanged);
                                              ^
In file included from ../src/core.cpp:20:0:
../submodules/ProjectTox-Core/core/Messenger.h:193:6: error:   initializing argument 1 of ‘void m_callback_userstatus(void (*)(int, USERSTATUS))’ [-fpermissive]
 void m_callback_userstatus(void (*function)(int, USERSTATUS));
      ^
make: *** [core.o] Error 1
nurupo commented 11 years ago

Looks like you called git pull on a submodule. Don't do that. Newer version of the submodule (the ToxProject-Core) may introduce API changes, thus causing such errors. In order to adapt to API changes qt-gui's code should be modified, that's why you should call git pull only in qt-gui's repo.