User forums > Help

mingw missing libs

(1/2) > >>

Barmkin:
This problem keeps happening where i have the path of the variables correctly placed in the compiler settings but i cant seem to find the   -ldwmapi anywhere (this is the message):

 gcc.exe  -o bin\Debug\GTK_Demo.exe obj\Debug\main.o  -LC:/msys64/mingw64/bin/../lib -lgtk-3 -lgdk-3 -lz -lgdi32 -limm32 -lshell32 -lole32 -Wl,-luuid -lwinmm -ldwmapi -lsetupapi -lcfgmgr32 -lpangowin32-1.0 -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lintl   
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: cannot find -ldwmapi
collect2.exe: error: ld returned 1 exit status

I'm kinda new to this ide and how to use it properly any ideas? The C:/msys64/mingw64/bin/../lib path as the -ldwmapi libs on it.
I have applied `pkg-config --cflags gtk+-3.0` to other compiler options and in the linker `pkg-config --libs gtk+-3.0`

ollydbg:
what is the lib's file name?

I just search the keyword "dwmapi" in my F:\msys2\mingw64\lib folder, I don't see such name matches, instead, there is a file named:F:\msys2\mingw64\include\dwmapi.h

So, my guess is that the library name is not "dwmapi"?

stahta01:

--- Quote from: Barmkin on November 18, 2023, 07:27:33 am ---gcc.exe  -o bin\Debug\GTK_Demo.exe obj\Debug\main.o  -LC:/msys64/mingw64/bin/../lib -lgtk-3 -lgdk-3 -lz -lgdi32 -limm32 -lshell32 -lole32 -Wl,-luuid -lwinmm -ldwmapi -lsetupapi -lcfgmgr32 -lpangowin32-1.0 -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lintl   
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: cannot find -ldwmapi
collect2.exe: error: ld returned 1 exit status

--- End quote ---

Decide which toolchain you are trying to use!
The above shows both "c:/mingw" and "C:/msys64/mingw64" this will normally result in a few weird errors.

Tim S.

stahta01:
Old thread with same problem https://forums.codeblocks.org/index.php?topic=24524.0

omlk:
Here's what I found about "-ldwmapi"

--- Code: ---/*
 * dwmapi.h
 *
 * Some dwmapi.dll exported functions such as
 *   DwmFlush
 *   DwmAttachMilContent
 *   DwmDetachMilContent
 * are not declared in this header for not being documented by Microsoft
 *
 */


#ifndef __WINAPI_DWMAPI_H
#define __WINAPI_DWMAPI_H


#include <wtypes.h>


/* for MARGINS structure declaration.  */
#include <uxtheme.h>


/*
 * This API is available only on Vista+ versions. It's not guarded by version check
 * because that would cause problems with Mozilla code (and MSVC doesn't seem to be
 * doing that as well).
 */


#ifdef __cplusplus
extern "C" {
#endif


/* FIXME: move to winuser.h */
/* DWM messages.  */
#define WM_DWMCOMPOSITIONCHANGED 0x031E
#define WM_DWMNCRENDERINGCHANGED 0x031F
#define WM_DWMCOLORIZATIONCOLORCHANGED 0x0320
#define WM_DWMWINDOWMAXIMIZEDCHANGE 0x0321
/* FIXME end */
--- End code ---
https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8/+/l-preview/x86_64-w64-mingw32/include/dwmapi.h


--------------------------------------------------------------------------------------------------
https://windows10dll.nirsoft.net/dwmapi_dll.html
Static Linking dwmapi.dll is statically linked to the following files:
msvcrt.dll
ntdll.dll
api-ms-win-core-libraryloader-l1-2-0.dll
api-ms-win-core-synch-l1-2-0.dll
api-ms-win-core-errorhandling-l1-1-1.dll
api-ms-win-core-handle-l1-1-0.dll
api-ms-win-core-heap-l1-2-0.dll
api-ms-win-core-registry-l1-1-0.dll
api-ms-win-core-processthreads-l1-1-2.dll
api-ms-win-core-profile-l1-1-0.dll
api-ms-win-core-debug-l1-1-1.dll
api-ms-win-core-sysinfo-l1-2-1.dll
api-ms-win-core-kernel32-legacy-l1-1-1.dll
USER32.dll
GDI32.dll
api-ms-win-core-util-l1-1-0.dll
api-ms-win-core-winrt-error-l1-1-1.dll
api-ms-win-core-quirks-l1-1-0.dll
api-ms-win-core-delayload-l1-1-1.dll  This means that when dwmapi.dll is loaded, the above files are automatically loaded too. If one of these files is corrupted or missing, dwmapi.dll won't be loaded.

Navigation

[0] Message Index

[#] Next page

Go to full version