My program need to add GLFW [...] to the code. [...] So it wonders me what about those dll and a file? |
Is your problem the compilation or the deployment?
a) If your problem is building your project, the answer varies according to your IDE.
For example, by standard option, Qt Creator makes a folder where it puts the makefiles and, inside that, other two folders, one for the debug built and one for the release built, where it adds the object files and the final executable. If you add your dll(st) here, the OS is usually able to find them.
Graphically (Qt Creator):
myproject
- headers
- sources
- (whatever)
build-myproject-[date_hours_...]-...
debug
- *.o
- *. exe
- you can add your dll(s) here
release
- *.o
- *. exe
- you can add your dll(s) here
- makefiles
- (whatever) |
b) If your question is about deployment (that is: if your project is production ready and you want to start its distribution), that’s another kettle of fish, far harder to work out.
You need to plan from the very beginning in which operative systems it’s going to be installed, if you want to make it ‘portable’ (everything in a directory) or installed according to specific OS rules; if you’re going to provide updates, an un-install utility, patches...
(Besides, if you include other people’s code, when their developers provide an update, perhaps you’ll be require to ‘transmit’ it to your clients, because it could solve potential security issues.)
While in Linux you can usually cope with those requirements by makefiles, in Windows things could be more complicated and you could evaluate ready made tools that do it.
If you could be more specific, you’d get better answers.
Happy coding!