How to send DLL files with a .exe file

I have an application that depends on some DLL files. I know that if I just make them in the same folder as the .exe file, this will work, but I do not want to leave files with the .dll extension with my .exe file. Is there a way to place them in a folder with my .exe file?

Or even better, can they be compiled and linked to an .exe file to have a standalone file? And no, I do not have a static version of these dynamic libraries.

(ps application is written with c, compiled with gcc, mingw win64, and .dll from gtk3 libs)

Thanks for reading my question.

+4
source share
2 answers

You have several options.

A) ,.lib windows .

B) , Windows. , , , . , , , dll , , , . , , exe. ? ( LoadResource, FindResource, MAKEINTRESOURCE ..)

C) , DLL , exe, env . , C:\Windows, - . dll_path env .

D) C) , , , exe, , , dll_files. script :

@echo off
set PATH=%PATH%;<path to dll files>
myprogram.exe
+1

Source: https://habr.com/ru/post/1626744/


All Articles