Author Topic: mingw missing libs  (Read 1513 times)

Offline Barmkin

  • Single posting newcomer
  • *
  • Posts: 1
mingw missing libs
« 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://gayporno.site/sites/scout-boys/
« Last Edit: April 22, 2024, 03:37:52 pm by Barmkin »

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5916
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: mingw missing libs
« Reply #1 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"?
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: mingw missing libs
« Reply #2 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.
« Last Edit: November 18, 2023, 01:32:52 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: mingw missing libs
« Reply #3 on: November 18, 2023, 01:39:38 pm »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline omlk

  • Multiple posting newcomer
  • *
  • Posts: 110
Re: mingw missing libs
« Reply #4 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://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.
« Last Edit: November 18, 2023, 02:16:42 pm by omlk »

Offline omlk

  • Multiple posting newcomer
  • *
  • Posts: 110
Re: mingw missing libs
« Reply #5 on: November 18, 2023, 02:45:49 pm »
Why do you need "-ldwmapi" if you use GTK?
Here is my project in codeblocks, 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.
« Last Edit: November 18, 2023, 02:57:59 pm by omlk »