Does Aspose.Tasks for C++ support Mac platform?

Dear Andrey,
Thank you very much for you reply. I sent a request to one of your colleques and I was directed to this thread, but in reality I was interested in your product Tasks for C++ (C++ Microsoft Project Documents Parsing Library - Aspose) to build and compile on the Mac platform. I use clang complier in combination with Qt/C++ SDK. In the trail version I have downloaded I see libraries for windows and linux but not for mac. Does that mean it’s not supported?
Kr Thomas

Hi, Thomas.
Aspose Tasks for С++ does not yet support MacOs, but we are planning to support Mac in general. According to preliminary estimates, the “optimistic” date for the first Mac release is March 2022.

@thomaskknudsen Hi. Could you please specify what features of Aspose.Tasks for C++ on Mac you are the most interested in? We need this information to prioritize our development properly.

Dmitry Panchenko
Aspose.Tasks team.

Hi Dmitry,
There’s a long list of feature that I would like but as I don’t know your .NET implementation I really can’t say which are new and which are already supported.
For deployment it’s important to have little footprint on Mac so native c++ sources that can be compiled and not some variation of .NET framework or virtual machine. This is very important.
If your library connects to a server or making checks on the host system, you should make clear what’s going on, since we need to know exactly how the library works in the apple app approval process. The library cannot make actions we are unaware about. It just leads to a lot of headache for us and Apple will end up dismissing the app.
Activities, predecessors, resources, calendars and assignments are the most important information we will retrieve from the file. We will support our own gantt chart and UI so that is not important. Print and PDF support is not a first priority either.
Is this helping?
Kr Thomas

Yes, thank you. We will update you once we achieve any success on Mac.

Hi, Thomas.
I’m glad to announce that Aspose.Tasks for С++ provides regular support for the MacOS platform since 22.1 release. The MacOS distribution package already available at Downloads ---New-Releases-aspose.tasks-for-c++-22.1-macos .

Feel free to contact, if you have any questions.

Aleksey Chevyrov

Hi Aleksey,
That sounds great, I’ll download it and try it out. Thank you for letting me know :slight_smile:
Kr Thomas

Hi Aleksey,
My first initial try hasn’t succeeded, I’m afraid. After adding some namespaces, I’m still getting linker errors so my small project won’t compile. I’m doing this:

#include <QCoreApplication>

//Aspose includes
#include "Project.h"
#include "Task.h"
#include "TaskCollection.h"

using namespace Aspose;
using namespace Tasks;
using namespace Saving;

int main(int argc, char *argv[])
    QCoreApplication a(argc, argv);

    // create project instance
    System::SharedPtr<Project> project = System::MakeObject<Project>();

    // add task, sub task and save project
    System::SharedPtr<Task> task = project->get_RootTask()->get_Children()->Add(u"Summary1");
    System::SharedPtr<Task> subtask = task->get_Children()->Add(u"Subtask1");
    project->Save(u"output.xml", Aspose::Tasks::Saving::SaveFileFormat::XML);

    return a.exec();

I’m using Qt Creator. To be honest it seems like I need to add a vast amount of includes or namespaces in order to get it to work??

Hi, Thomas.
We haven’t test our packages with Qt, but the fast ancwer is - possibly, you’re missing some third-party libraries, which are strictly necessary. Please, rfer to from distribution package for detailed information.
In short - you should have pkg-config and fontconfig libraries installed. If you don’t, you should install them with homebrew or any other package manager:

brew install pkg-config
brew install fontconfig

Also, ensure you’ve provided libraries connected in your QMake:

LIBS += -L/path/to/CodePorting.Native.Cs2Cpp/lib/ -laspose_cpp_appleclang
LIBS += -L/path/to/Aspose.Tasls.Cpp/lib/ -lAspose.Tasks.Cpp_appleclang

Please, let me know, if you’re still have any problems with your app.


In addition to provided source: you should add:

#include "Saving/Enums/SaveFileFormat.h"

as far as this enum is fast-forwarded (but not included) in Project header, so, you should include them.

There are no more comments to the code - it’s good, it well-compiled and also well-linked.

Also, please refer to 22.1 release notes - it is prefferable to use camel-cased enum values instead of capital-cased (i.e. SaveFileFormat::Xml instead of SaveFileFormat::XML). The capital-cased values are deprecated since 22.1


Hi Aleksey,
Thank you for fast reply.
Adding #include “Saving/Enums/SaveFileFormat.h” helped the pre-compiler error I had on the project->Save(… line.
I follow the instructions for Qt from one of your other products:

which means that I have copied Aspose.Tasks.Cpp and CodePorting.Native.Cs2Cpp into the project folder
My .pro file in Qt Creator looks like this:

QT -= gui

CONFIG += c++11 console
CONFIG -= app_bundle

# You can make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0


# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target

macx: LIBS += -L$$PWD/Aspose.Tasks.Cpp/lib/ -lAspose.Tasks.Cpp_appleclang

INCLUDEPATH += $$PWD/Aspose.Tasks.Cpp/include
DEPENDPATH += $$PWD/Aspose.Tasks.Cpp/include

win32:CONFIG(release, debug|release): LIBS += -L$$PWD/CodePorting.Native.Cs2Cpp/lib/release/ -laspose_cpp_appleclang
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/CodePorting.Native.Cs2Cpp/lib/debug/ -laspose_cpp_appleclang
else:unix: LIBS += -L$$PWD/CodePorting.Native.Cs2Cpp/lib/ -laspose_cpp_appleclang

INCLUDEPATH += $$PWD/CodePorting.Native.Cs2Cpp/include
DEPENDPATH += $$PWD/CodePorting.Native.Cs2Cpp/include

I used brew to install pkg-config, fontconfig, but the project still doesn’t compile, I get a list of errors:
Screenshot 2022-02-02 at 09.03.24.png (97.3 KB)

They seem to be related to the CodePorting.Native.Cs2Cpp library.
Do you have any suggestions on how to proceed?
Kr Thomas

Hi, Thomas, you should use c++14 instead of 11, of course, the referenced document is wrong, at least at this point.

So, use

CONFIG += c++14 console

CodePorting is C++ 14 standard compliant, not 11.
Hope, this will help.


That helped, thank you :slight_smile: