Skip to main content
Known Participant
December 9, 2013
Answered

Configuring Qt creator for AI plugin development

  • December 9, 2013
  • 1 reply
  • 5903 views

I tried creating AI plugin using

- Visual Studio Premium 2010

- Visual Studio Addin for Qt

- QWinWidget for Qt 4.8

- Qt 4.8 for windows

- Windows 7 32 bit

However,  I could not compile the plugin for 64 bit edition as the Qt addin for visual studio do not support Qt 4.8 for 64 bit compilation.

I cannot switch to Qt 5.1 as compatible QWinWidget is not available there.

So I decided to migrate to Qt Creator 2.8 IDE instead of visual studio and bypass the addin.

I could migrate the VS project to a Qt project and compile it. I get a .aip file now.

However, this AI plugin is not loaded by Illustrator.exe

I added the following to get my aip file.

TARGET_EXT = .aip
TEMPLATE = lib

CONFIG += dll embed_manifest_dll

However,

1. the plugin main was not exposed. So, tried

DEF_FILE += "Definitions/PluginMain.def"

Dependency walker now shows "PluginMain", but AI cannot load the plugin.

Qt documentation tell, use "DEF_FILE" only with "app" template. Is this the reason for the failure ?

What is the solution ?

2. How to get the 64 bit target in Qt creator ?

I tried      QMAKE_TARGET.arch = x86_64 but the target was 32 bit (checked in dependency walker).

My OS is 32 bit win 7. Is this the reason I cannot get 64 bit target ?

Do I need to install Qt environment on 64bit OS to get the 64 bit target ??

Message was edited by: Dataset

This topic has been closed for replies.
Correct answer A. Patterson

How about the Qt moc on Mac ?

On windows, visual studio addin does the moc'ing and uic'ing.

Who does this on mac ? How do we configure with xcode ?


We don't use the VS addin, we use qmake at the command line to generate projects. If you do that, it will add all the UIC & MOC steps for you. You do have to regenerate the project every time you add something that has the Q_OBJECT macro in it, but that's actually less of a pain then you'd think. We have a batch file that does the heavy lifting and a script on Mac to do the same.

1 reply

panduvittala
Inspiring
December 10, 2013

make sure your qt build is 64 bit (4x windows installer on qt site is 32 bit, so you may have to build the 64 bit version. I use qt visual studio plugin so that I am in familiar territory when building qt apps. It is better than struggling with qt build files.

I am not sure if you will be able to build 64 bit apps in 32 bit os. Should be possible, as long as required libraries are available. But you will not be able to run 64 bit illustrator on that machine anyway. It may be better to develop plugin using 32 bit env, then once it is working, move the code to 64 bit env, build and test. I have all 64 bit env (os, illustrator, plugin) except visual studio which is 32 bit (but also emits 64 bit code).

One more thing to check is that in qtcreator preferences, compilers, see if a 64 bit compiler is listed (amd64)

A. Patterson
Inspiring
December 10, 2013

I don't know anything about Qt Creator, we use Studio and qmake to generate projects. Which admittedly is a bit of a problem, as qmake won't generate 64-bit project settings (which is insane, there's a bug that goes back a couple of years for that one). We solved a bunch of qmake related issues by writing a dinky little C# program called QMakeFix that will do things like convert 32-bit projects into 64-bit projects (it's quite easy using XPath). We also use it to clean up the generated projects (we find the default qmake include/source split stupid) and lets us do other handy things.

Presumably there's a way in Qt Creator to get aroudn the 32/64-bit thing but I don't know off hand.

DatasetAuthor
Known Participant
December 11, 2013

Oh ! .. lot of stuff to handle for 64 bit stuff !

How are things at mac platform ?

XCode + CS6 SDK + Qt 4.8 , what is the counter part for QWinWidget and Visual Studio Addin ?