Hi everyone, I'm still new to programming. I've made my first app using Qt4 and now I want to give it to my friend to try it out, but my problem is that, I have no idea how to package my code and hide it so that my friend doesn't see it. Basically what I'm saying is that up to now, I've written my programs using an IDE and I don't know how to make a program run independently of an IDE, like on my friends computer for example. Another issue I have is: How does my friend install my app on his computer? Is there something I have to do on my side to ensure that he is able to install my app?
come on, there has to be somebody.
When you build your program, an executable is created in your project folder.
That's what you need to distribute to others (and if it's a Windows program, any DLL files it might need).
Last edited on
Well, provided you are both using the same OS, you can just send him the executable. When you compile your code, the compiler generates this executable file and your IDE puts it somewhere. Where your IDE puts it depends on what IDE you are using, but I'm sure you can figure that part out. Just Google it if you can't find it. You're also going to have to send him the QT dll's, which should be somewhere inside of your QT folder.
It depends on your friend's platform- if Windows you can use the Inno Setup

Or perhaps upload the compiled binary and the compressed sources.
Say my app is made up of ten stand-alone classes linked together using class headers, If understand correctly, after compiling my app, I should just take the executable and leave the rest (that is, classes and other .cpp files) or am I misunderstanding somewhere?
Yes, all source files are linked into a single executable after they've been compiled.
It's not necessary to distribute the source files with your applications and you should only do that if you want users to have access to the source code.
@Athar, that makes sense but one question though: why is it that when you install most software on windows you find that the software is packaged with a lot of dll files? what is contained in those dll files. and why are these dll's necessary?
DLL files are files that contain executable data. They are typically used so that executables can share the same functions contained within those DLL's, rather than each executable having its own copy of the same function.
Topic archived. No new replies allowed.