Qt 5.2.0 generate single .o file
-
wrote on 22 Dec 2013, 11:13 last edited by
Now Qt generates one .o file per every .cpp file in my project. Can I force it to generate only one huge .o file? Or can I convert multiple .o files in a single one using some utils?
-
wrote on 22 Dec 2013, 12:24 last edited by
Why does it matter? Isn't that normal behaviour? Aren't the .o files temporary, that the linker will use to create one big .exe file?
-
wrote on 22 Dec 2013, 13:35 last edited by
The reason why I am doing that is because I want to compile a signle exe (no dlls) but LGPL requires that statically linked programs must be provided with it's object files. I want to provide only one huge object file.
-
wrote on 22 Dec 2013, 14:01 last edited by
Then make an archive (which is one big file.)
Or is your goal to obfuscate?
Why no dll's, i.e. not dynamic linking? If you used dynamic linking, couldn't you provide your code as one big library?
-
wrote on 22 Dec 2013, 14:07 last edited by
If I was using dlls I would't have provide any source code
-
wrote on 22 Dec 2013, 14:23 last edited by
I'm not sure I understand. Under the LGPL, the source for the LGPL libraries (say Qt) must only be available, upon request from you or from other repositories. You don't have to ship (or even provide?) the source for the LGPL. You need not provide your proprietary code in source form, only in a form (say a library or object files) that can be linked with modified LGPL libraries.
I think the terminology used is 'convey.' All you have to do is say precisely which LGPL libraries you used and how a user can get the source. Then the user can modify the LGPL libraries and relink with your library.
-
wrote on 22 Dec 2013, 14:38 last edited by
Create huge.cpp with:
@
#include "main.cpp"
#include "file1.cpp"
#include "filen.cpp"
@and then compile:
@
gcc -c huge.cpp
@
5/7