简体   繁体   中英

Linking .dll files to .exe file

I have just created my first graphical application with the GTK library and I have a little problem. The application only opens a window of type GtkWidget and shows it to the user as a test. When compiling this application with Linux g ++, the application opens correctly. When compiling this application with MinGW g ++ for Windows, this shows that several .dlls are needed to run. The only solution I have found is to save the .dll files in the same application folder, but I would like to save the .dll files in a separate folder for a better project structure. I have built the application using the Visual Studio Code text editor. The compilation has been done using MinGW (and I would like to keep it that way)

I don't think there is an easy way to do it, which is why almost all Windows applications just put the DLLs in the same directory as the executable. Modifying the PATH variable for the user is kind of intrusive (and might be undone by the user).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM