New experimental QtCreator exporter for IntroJucer


#1

Hi everybody,

in the last weeks I have been working on a QtCreator/QMake exporter for the IntroJucer. It is already working quite well and I regularly use it do code my plugins on Linux and Windows. The code is available at GitHub if you want to give it a try: https://github.com/seebk/JUCE

Please report back if you experienced any trouble or if everything worked fine. Maybe it can become part of the official JUCE soon?

Sebastian


JUCE Qt project!
#2

Uh... seems I am the only one who was eagerly waiting for a QtCreator exporter :D

Anyway, I use it regularly and it works well on Windows and Linux.  I have just merged version 3.0.6 into the above repository to keep it up to date. Will do the same with the next versions, too.

Jules: What is your opinion about merging the exporter into the official JUCE repository? If there is some interest, I will clean up and restructure the code in the next weeks to make it ready.


#3

Jules: What is your opinion about merging the exporter into the official JUCE repository?

The main problem for me with integrating things that I don't use myself is the burden of maintaining them.. If there was more than one person interested in this, then perhaps!


#4

I would be interested in this. I prefer using Qt Creator over Visual Studio on Windows, and it's quite tedious to set up a new Juce-based project for Creator. (I haven't actually tried the Introjucer exporter by the original poster yet, will have to do that soon...)


#5

When using the .pro file generated by this in Creator set up to use the Visual Studio 2013 compiler, the debug build does not work with the .pro file generated with the default settings. The linker doesn't find some debugging functions such as _CrtDbgReport and _free_dbg. Building in release mode seems to work.


#6

Hmm, looks like the generated .pro file doesn't work for release builds either, must have been some temporary fluke it worked once...

edit : Need to add Shell32.lib into to the libraries (doesn't help the debug build though)


#7

I have to admit I did not even know that you can use any other compiler apart from GCC with QTCreator. So I never checked it with Visual Studio... I wonder how this actually works for a any build, because all compiler flags are specific for GCC. Do you have an idea how QtCreator can handle this?


#8

I guess qmake (which powers the Creator build process by default) just ignores the flags that are not suitable for the currently used compiler/linker...Or perhaps it does in fact pass invalid flags to MSVC which will in turn ignore them...I could take a look what the compiler invocations done by qmake are from the .pro file generated by your Introjucer fork.

edit : Yes, qmake will just pass the invalid flags to MSVC's cl.exe, which in turn just complains they are unknown, but it can take the build process up to the linking stage, where it fails for the debug build. So it looks like compatibility with the Visual Studio compiler/linker wouldn't probably be too hard to achieve...I guess I could take a look at fixing that at some point, if you are not inclined to do so.


#9

If you find some time to fix this it would be great. I only have minor experience with Visual Studio and absolutely no experience with the combination with QtCreator.

However, I hope there is some more intelligent mechanism to pass flags to different compilers with qmake. To rely on the fact that cl.exe just ignores unknown flags sounds really messy. The other way round, GCC will not ignore Visual Studio flags and quit compilation with an error. So I don't see a possibility to set some specific flags needed by Visual Studio. I googled a bit on this topic, but could not find something useful.


#10

Obviously passing in invalid compiler arguments isn't really going to work, I didn't mean to suggest anything like that. It was just an interesting observation that MSVC was able to deal with that, to some degree.

IMHO the way to go would be to have separate targets in Introjucer for Qt Creator using gcc and MSVC on Windows...qmake might have some way to deal with the gcc/msvc differences using conditionals etc, but the .pro file syntax is so tedious for that kind of stuff that I think I'd rather just add the new Qt Creator/MSVC target type into Introjucer. (I haven't looked into that at all yet though, been a bit busy with other stuff now.)


#11

Are JUCE fully compatible with the gcc/mingw 4.8 compiler? If so I'm gonna start using and supporting this exporter (because MSVC is "too slow" implementing new standards and is a bottleneck in a true cross-platform solution imo)


#12

I compile all my JUCE plugins and applications with GCC/MingW 4.8 on linux and windows. You may encounter some problems with too long paths when your project is deeply nested in the file system, but that can be avoided by mapping your project folder to an own drive letter. Apart from that it works perfect.


#13

Thank you for the information, i will check it out ;)

 

As a side note, I wish for a "exporter modules" feature in Introjucer though, that would probably ease the maintanence burden on jules and still support additional IDEs by importing 3rd party exporters maintained by others.

 

John


#14

yeah exactly, exporters should be done in javascript engine now that we have the interpreter inside the library… i find myself much mucking around the exporters too much to tweak things that Julian doesn’t want to add himself…


#15

btw i use qtcreator since some years now, it’s the only ide that works, it’s light (comparing to xcode and vscrap) and quite complete… and the only one i can use on whatever platform i’m in at the moment of writing code. i’m 100% supporting this!


#16

I was actually going to request a QT Creator build but I thought it was an odd request. XCode really is the best imho  and coding in Linux makes no sense when you have the great code completion of Xcode on a Mac. QT Creator beats Code::Blocks in my option and a QT Creator build would make development on Linux be much more pleasant. I'm going to try this experimental exporter.


#17

Possibly relevant to this topic are my posts on this forum under the title  "Building on OSX"

I have manually created a .pro file for a debug build of a JUCE based application for OSX using QtCreator. This is not very difficult once you know what to do, though I have to say is probably less complicated for my own project as I use CMake and Eclipse to first build most of the shared libraries. The only problem encountered was that the latest version of XCode broke my QtCreator build and I had to revert XCode by one version.

 


#18

I'm interested with juce but qtCreator is a must for me. I can't never work on another editor over qtCreator. It's incredible well and clear to work on complex projects. All other editors are mostly crap else CodeBlocks. But it's not well as qtCreator.


#19

There is external way to use and compile MSVC projects. So it's easily possible to use qtCreator and compile by VS. You can create a custom build step as in attached image.

 


#20

If need i can post .pro file example for creating .dll with juce