Code::Blocks Forums

User forums => Help => Topic started by: Barmkin on November 18, 2023, 07:27:33 am

Title: mingw missing libs
Post by: Barmkin on November 18, 2023, 07:27:33 am
 From amateur to professional, from solo to orgy, from romance to kink, there is a gay [censored] movie for every mood and desire.
https://gayporn.name/channels/nakedsword/
https://freegayporn.club/sites/men-at-play/
https://gaypornwebsite.com/videos/gay-massage-hot-blowjob-69-style/
Title: Re: mingw missing libs
Post by: ollydbg on November 18, 2023, 12:25:45 pm
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"?
Title: Re: mingw missing libs
Post by: stahta01 on November 18, 2023, 12:53:05 pm
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

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.
Title: Re: mingw missing libs
Post by: stahta01 on November 18, 2023, 01:39:38 pm
Old thread with same problem https://forums.codeblocks.org/index.php?topic=24524.0 (https://forums.codeblocks.org/index.php?topic=24524.0)
Title: Re: mingw missing libs
Post by: omlk on November 18, 2023, 02:11:48 pm
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 */
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://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 (https://windows10dll.nirsoft.net/msvcrt_dll.html)
ntdll.dll (https://windows10dll.nirsoft.net/ntdll_dll.html)
api-ms-win-core-libraryloader-l1-2-0.dll (https://windows10dll.nirsoft.net/api-ms-win-core-libraryloader-l1-2-0_dll.html)
api-ms-win-core-synch-l1-2-0.dll (https://windows10dll.nirsoft.net/api-ms-win-core-synch-l1-2-0_dll.html)
api-ms-win-core-errorhandling-l1-1-1.dll (https://windows10dll.nirsoft.net/api-ms-win-core-errorhandling-l1-1-1_dll.html)
api-ms-win-core-handle-l1-1-0.dll (https://windows10dll.nirsoft.net/api-ms-win-core-handle-l1-1-0_dll.html)
api-ms-win-core-heap-l1-2-0.dll (https://windows10dll.nirsoft.net/api-ms-win-core-heap-l1-2-0_dll.html)
api-ms-win-core-registry-l1-1-0.dll (https://windows10dll.nirsoft.net/api-ms-win-core-registry-l1-1-0_dll.html)
api-ms-win-core-processthreads-l1-1-2.dll (https://windows10dll.nirsoft.net/api-ms-win-core-processthreads-l1-1-2_dll.html)
api-ms-win-core-profile-l1-1-0.dll (https://windows10dll.nirsoft.net/api-ms-win-core-profile-l1-1-0_dll.html)
api-ms-win-core-debug-l1-1-1.dll (https://windows10dll.nirsoft.net/api-ms-win-core-debug-l1-1-1_dll.html)
api-ms-win-core-sysinfo-l1-2-1.dll (https://windows10dll.nirsoft.net/api-ms-win-core-sysinfo-l1-2-1_dll.html)
api-ms-win-core-kernel32-legacy-l1-1-1.dll (https://windows10dll.nirsoft.net/api-ms-win-core-kernel32-legacy-l1-1-1_dll.html)
USER32.dll (https://windows10dll.nirsoft.net/user32_dll.html)
GDI32.dll (https://windows10dll.nirsoft.net/gdi32_dll.html)
api-ms-win-core-util-l1-1-0.dll (https://windows10dll.nirsoft.net/api-ms-win-core-util-l1-1-0_dll.html)
api-ms-win-core-winrt-error-l1-1-1.dll (https://windows10dll.nirsoft.net/api-ms-win-core-winrt-error-l1-1-1_dll.html)
api-ms-win-core-quirks-l1-1-0.dll (https://windows10dll.nirsoft.net/api-ms-win-core-quirks-l1-1-0_dll.html)
api-ms-win-core-delayload-l1-1-1.dll (https://windows10dll.nirsoft.net/api-ms-win-core-delayload-l1-1-1_dll.html)  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.
Title: Re: mingw missing libs
Post by: omlk on November 18, 2023, 02:45:49 pm
Why do you need "-ldwmapi" if you use GTK?
Here is my project in codeblocks (https://fex.net/s/r2poe0t), you can see it as a demo GTK for Windows.
@stahta01 I have used a makefile here, this is my answer to whether it is difficult to use a makefile if I understand you correctly.