June 16, 2011

nonot1 nonot1
Lab Rat
47 posts

configure “qtnamespace” flags?

 

Hello,

The instructions for building the Qt / Eclipse integration says that Qt must be configured with:

“./configure -qtnamespace QtCppIntegration -qtlibinfix CppIntegration”

I see the man page at http://doc.qt.nokia.com/4.7-snapshot/configure-options.html , but I still don’t understand:

  1. What exactly does this do?
  2. Why/when I would need to use these flags in other cases?
  3. Could regular Qt-based code still use the Qt built like this?
  4. Why, in this case, the particular names “QtCppIntegration” and “CppIntegration”?

Thank you

2 replies

June 20, 2011

sigrid sigrid
Lab Rat
138 posts
  1. qtnamespace compiles Qt into a namespace and qtlibinfix modifies the names of the Qt dlls. For example: qtlibinfix renames all the Qt dlls with the infix you have chosen, for example to QtGuiCppIntegration.dll and qtnamespace wraps all of the Qt code in the namespace QtCppIntegration
  2. You can see an example of another usecase for qtlibinfix here [developer.qt.nokia.com]
  3. Yes
  4. The reason there is a difference between the naming of the options “QtGuiCppIntegration” and “CppIntegration” is simply that if qtlibinfix had the option “QtCppIntegration then the resulting dll names would be e.g “QtGuiQtCppIntegration” which does not look as nice as QtGuiCppIntegration

June 20, 2011

nonot1 nonot1
Lab Rat
47 posts

Thank you, sigrid.

Three followup questions:

  1. You said that code that was written for normal Qt can be used with Qt built like this, but I assume that some changes must be made to some makefile /.pro file… Correct? If so, is there a simple example somewhere?
  2. Does anyone know why the Eclipse integration needed these flags?
  3. For the Eclipse integration, was the choice of “CppIntegration” arbitrary, or was that exact name needed to integrate with some other library?

Thank you

 
  ‹‹ Compiling on Ubuntu 64bit for 32bit - App looks bad      VS2010 Issue. Project in 64 bit mode won’t find Qt version, setting Qt Version reverts project to Win32. ››

You must log in to post a reply. Not a member yet? Register here!