1

I am trying to implement the automatic updater for my application written in C++/Qt. It should work on Mac OS X. I've searched over the web and found out that Sparkle framework should be suitable for my needs. I added Sparkle framework 1.5 b6 to my xcode project, also added the header file:

#include <Sparkle/Sparkle.h> 

Now, when I try to build the project, the compiler gives me a lot of errors in SUVersionComparisonProtocol.h and SUUpdater.h:

Expected unqualified-id: @protocol SUVersionComparison
Expected unqualified-id: @end
Expected unqualified-id: @interface SUUpdater: NSObject {

etc etc

I see those headers are written in Objective-C, so it seems like C++ compiler simply can't handle them. However, I know C++ applications that use Sparkle. So could somebody tell me how should it be used in C++ applications?

Jake Petroules
  • 23,472
  • 35
  • 144
  • 225
mentalmushroom
  • 2,261
  • 1
  • 26
  • 34

1 Answers1

3

Indeed, you need to mix C++ and Objective-C.

Here is an excellent explanation, along with an implementation example: http://el-tramo.be/blog/mixing-cocoa-and-qt/

and here is a C++/Qt project that builds a Qt-usable dylib wrapper for Sparkle: https://github.com/Roxee/qt-roxeemegaup/

Mangled Deutz
  • 11,384
  • 6
  • 39
  • 35