Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot include Sparkle framework when compiling

Tags:

c++

gcc

g++

qt

sparkle

I am currently building a project based on the Qt C++ framework that utilizes the Sparkle framework for updates. The issue I am experiencing is that my entire application builds just fine except for when I include the Sparkle framework.

The Sparkle.framework directory is located in the /Library/Frameworks directory.

In my .pro file I have:

QMAKE_LFLAGS += -F /Library/Frameworks
LIBS += -framework Sparkle

In my SparkleUpdater class I have the following header:

#include <Sparkle/Sparkle.h>
#include "SparkleUpdater.h"

Which when I hover over the include in Qt Creator I get a notification of the path to the sparkle framework which contains: /Library/Frameworks/Sparkle.framework/Headers/Sparkle.h which is the correct location and is in fact where the Sparkle.framework lives on my machine.

When I build my project however, I get the following from the compiler:

SparkleUpdater.mm:2:29: error: Sparkle/Sparkle.h: No such file or directory
SparkleUpdater.mm:10: error: ISO C++ forbids declaration of 'SUUpdater' with no type
SparkleUpdater.mm:10: error: expected ';' before '*' token
SparkleUpdater.mm: In constructor 'SparkleUpdaterPrivate::SparkleUpdaterPrivate()':
SparkleUpdater.mm:9: error: class 'SparkleUpdaterPrivate' does not have any field named      'updater'
SparkleUpdater.mm: In constructor 'SparkleUpdater::SparkleUpdater(const QString&, bool)':
SparkleUpdater.mm:17: error: 'class SparkleUpdaterPrivate' has no member named 'updater'
SparkleUpdater.mm:17: error: 'SUUpdater' was not declared in this scope
SparkleUpdater.mm:18: error: 'class SparkleUpdaterPrivate' has no member named 'updater'
SparkleUpdater.mm:22: error: 'class SparkleUpdaterPrivate' has no member named 'updater'
SparkleUpdater.mm:24: error: 'class SparkleUpdaterPrivate' has no member named 'updater'
SparkleUpdater.mm: In destructor 'virtual SparkleUpdater::~SparkleUpdater()':
SparkleUpdater.mm:30: error: 'class SparkleUpdaterPrivate' has no member named 'updater'
SparkleUpdater.mm: In member function 'virtual void        SparkleUpdater::checkForUpdates(bool)':
SparkleUpdater.mm:40: error: 'class SparkleUpdaterPrivate' has no member named 'updater'
SparkleUpdater.mm:41: error: 'class SparkleUpdaterPrivate' has no member named 'updater'
SparkleUpdater.mm:45: error: 'class SparkleUpdaterPrivate' has no member named 'updater'
make[1]: *** [SparkleUpdater.o] Error 1

I have tried removing and replacing the Sparkle framework on my machine. I have tried including the Headers folder explicitly with this:

INCLUDEPATH += -F /Library/Frameworks

and

INCLUDEPATH += -F /Library/Frameworks/Sparkle.framework/Versions/A

And to no avail. I still get the same message from the compiler.

Can anyone help me?

like image 554
calaway21 Avatar asked Nov 03 '22 19:11

calaway21


1 Answers

I recently had issues with Sparkle integration in Qt. After following some posts that didn't help, I was able to figure out what I needed to do to get things working.

So after this I decided to write a quick walk-through for getting the client side of the framework up and running. You can find my post at: http://www.discoversdk.com/knowledge-base/using-sparkle-in-qt

like image 84
Yaron V. Avatar answered Nov 12 '22 10:11

Yaron V.