1

Can someone tell me if it's possible to compile a project that works with Qt but without installing the entire sdk ? I mean, something like recompile Qt source code and link the libraries or something like this.

I know my problem is weird but I work in special conditions : I am on a linux machine and I have to work on a windows project therefore I use a distant server on windows to compile but I can't install anything on this serveur. I need an idea to have a fully portable folder with Qt who can compile without installing anything.

I hope I was clear in my explications. Thank you for your help.

Zat42
  • 2,471
  • 4
  • 22
  • 36
  • 1
    You should install compiler (e.g minGW) and Qt library (any version), set into 'PATH' path to `qmake`, start windows terminal (cmd or powershell or etc), move to directory with your source code of Qt Project and run `qmake`, then you should be exec `make` (e.g. for windows you can install minGW compiler (`mingw32-make`)) – Ruu May 16 '13 at 08:27
  • When you say "set into PATH", what do you exactly mean? – Zat42 May 16 '13 at 08:31
  • 1
    Excuse me, for your case, you should choosen 2 way. Build static Qt Library from source code and use static linking with your project. Or, install Qt library and to copy them near your project – Ruu May 16 '13 at 08:35
  • 2
    I guess here you can find your answer: http://stackoverflow.com/questions/10934683/how-do-i-configure-qt-for-cross-compilation-from-linux-to-windows-target – Amartel May 16 '13 at 08:45
  • @Amartel, it's a good post but I don't need to compile on Linux to Windows, I need to know how compile Qt without installing anything on Windows. But thank you too for your help, this may be usefull later. – Zat42 May 16 '13 at 09:29

1 Answers1

1

I has combined comments in answer.

  1. You need to install compiler (e.g minGW) and Qt Library (as needed version).
  2. You should add into environment variable 'PATH' your path to qmake and compiler.
  3. Start terminal and move to directory with your source code of Qt project.
  4. Run qmake and then exec make (e.g. It, for minGW, is mingw32-make).

For your case, you may choosen 2 way:

  1. Build static Qt Library from source code and use static linking with your project.
  2. Install Qt Library and copy libraries near your project with dynamic linking (recomended).
Ruu
  • 1,245
  • 9
  • 9