Using Qt Creator for ShiVa Engine Plugins
Linux plugin development for ShiVa suffers from the lack of a unifying C++ IDE, like Visual Studio on Windows or Xcode on macOS. To make our plugins work with the widest range of distros and development environments, we only create makefiles on Linux and not IDE projects. This has several disadvantages for developers who come from Windows or Mac, most notably the more complicated build configuration via make-file editing, and the lack of IDE-supported coding with benefits like autocomplete or syntax checking. While Qt Creator cannot resolve the makefile inconvenience, it certainly provides a great an unintrusive way to make your coding experience on Linux much better.
To add your ShiVa plugion project to Qt Creator, choose File > New File or Project… and then Import Project from an Existing Project.
Qt creator looks through all your folders and intelligently finds all Cpp-related files. For simple projects, this will only be the Sources folder, but projects that rely on external libraries might also require you to add the Frameworks folder.
Qt creator will now add a few files to the plugin directory, which will not interfere with your plugin or build. After that, you are set to code. Qt Creator perfectly resolves the S3DX API…
… and you get syntax highlighting, autocomplete, prediction and syntax checking without doing anything yourself!
With this setup, you still cannot build from the IDE. In order to build, you need to run the makefile through make:
cd /path/to/your/project/Plugins/com.company.project/Make/Linux make -f makefilename TARGET_ARCH=X86_32 -j2 make -f makefilename TARGET_ARCH=X86_64 -j2
In case you add any frameworks/libraries to your project, most likely you will also have to manually edit the makefile to fit your needs – especially the linker commands.