vladest / googlemaps

QtLocation plugin for Google maps tile API
MIT License
137 stars 61 forks source link

fatal error: QtLocation/private/qgeotiledmappingmanagerengine_p.h: No such file or directory #39

Open Paras-97 opened 2 years ago

Paras-97 commented 2 years ago

Hi, When i am trying to build this library I am receiving the following error. Can you please explain what possibly could the reason be?

g++ -c -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -O2 -fno-exceptions -Wall -W -D_REENTRANT -fPIC -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_PLUGIN -DQT_LOCATION_LIB -DQT_POSITIONINGQUICK_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_POSITIONING_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I/home/paras/Libraries/googlemaps -I. -I/home/paras/Libraries -I/home/paras/Libraries/googlemaps -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtLocation -isystem /usr/include/x86_64-linux-gnu/qt5/QtPositioningQuick -isystem /usr/include/x86_64-linux-gnu/qt5/QtQuick -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtPositioning -isystem /usr/include/x86_64-linux-gnu/qt5/QtQml -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I.moc -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o .obj/qgeoserviceproviderplugingooglemaps.o /home/paras/Libraries/googlemaps/qgeoserviceproviderplugingooglemaps.cpp In file included from /home/paras/Libraries/googlemaps/qgeoserviceproviderplugingooglemaps.cpp:5: /home/paras/Libraries/googlemaps/qgeotiledmappingmanagerenginegooglemaps.h:4:10: fatal error: QtLocation/private/qgeotiledmappingmanagerengine_p.h: No such file or directory 4 | #include "QtLocation/private/qgeotiledmappingmanagerengine_p.h" | ^~~~~~~~~~~~~~ compilation terminated. make: *** [Makefile:497: .obj/qgeoserviceproviderplugingooglemaps.o] Error 1

Thanks

nghiapd17012003 commented 5 months ago

Hi @Paras-97,

I got the same error when trying to build this library, solve it by changing the Qt version for qmake.

  1. You might want to check out your QtLocation folder, to see if it has a folder name "private". In my case it doesn't exist, and I think it's the reason for this error. The folder should be located at /usr/include/x86_64-linux-gnu/qt5/QtLocation
  2. If the private folder doesn't exist like my case, then what I did is: sudo rm /usr/bin/qmake sudo ln -s /path/to/your/qt/bin/qmake /usr/bin/qmake Make sure in this version of Qt, there is a private folder in QtLocation folder (for my case it's /home/Qt/6.5.1/gcc_64/include/QtLocation/6.5.1/QtLocation/private)
  3. if it still can't find the file, then in googlemap.pro file, you might want to add: INCLUDEPATH += path/to/QtLocation/private (I'm not too sure about step 3 but you can try after done step 2 and it's still not working)