Skip to content

Help-me for build with mingw on windows #45

@MarcosSoares10

Description

@MarcosSoares10

Hello good evening, I'm having problems compiling your lib in my project, a good part of the implementations are compiling correctly in my MINGW compiler on a Windows machine.

However, adding #include "imguifilesystem.h" in the main.cpp file generates several errors like:

/usr/share/mingw-w64/include/minwindef.h:142:17: error: 'typedef float FLOAT' redeclared as different kind of symbol
/usr/share/mingw-w64/include/winnt.h:598:16: error: 'typedef BYTE BOOLEAN' redeclared as different kind of symbol  typedef BYTE BOOLEAN;
/usr/share/mingw-w64/include/winnt.h:3651:7: error: 'BOOLEAN' does not name a type BOOLEAN EffectiveOnly;

I'm including your lib in Cmake as follows:

set (IMGUI_INCLUDE_DIRS
  $ {CMAKE_CURRENT_SOURCE_DIR} / dependencies / imgui /
  $ {CMAKE_CURRENT_SOURCE_DIR} / dependencies / imgui / addons
  $ {CMAKE_CURRENT_SOURCE_DIR} / dependencies / imgui / addons / imguifilesystem)

set (IMGUI_LIBRARY imgui)

set (IMGUI_USE_MINIZIP OFF CACHE BOOL "IMGUI_USE_MINIZIP")
add_definitions (-DYES_IMGUIADDONS_ALL)

INCLUDE_DIRECTORIES (
    $ {CMAKE_CURRENT_SOURCE_DIR} / imgui / addons /
    $ {CMAKE_CURRENT_SOURCE_DIR} / imgui /
    $ {CMAKE_CURRENT_SOURCE_DIR} / imgui / addons / imguifilesystem /
)

add_library (imgui STATIC
    $ {CMAKE_CURRENT_SOURCE_DIR} /imgui/imgui.h
    $ {CMAKE_CURRENT_SOURCE_DIR} /imgui/imgui.cpp
    $ {CMAKE_CURRENT_SOURCE_DIR} /imgui/imgui_demo.cpp
    $ {CMAKE_CURRENT_SOURCE_DIR} /imgui/imgui_draw.cpp
    $ {CMAKE_CURRENT_SOURCE_DIR} /imgui/addons/imgui_user.h
    $ {CMAKE_CURRENT_SOURCE_DIR} /imgui/addons/imguifilesystem/dirent_portable.h
    $ {CMAKE_CURRENT_SOURCE_DIR} /imgui/addons/imguifilesystem/imguifilesystem.h
    $ {CMAKE_CURRENT_SOURCE_DIR} /imgui/addons/imguifilesystem/imguifilesystem.cpp
    )

How can I proceed with a solution?
Thank you for your cooperation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions