#mingw64 terminal, cmake and... conan

1 messages · Page 1 of 1 (latest)

neat crown
#

Hello everyone,

I had a wonderfull experience enjoying msys2/mingw64 under windows with its cmake.. doing small personal project seemlessly portable through my windows and linux machines.

Although I recently started using conan, under linux everything works fine, but in mingw64 I have some path issues.
I installed conan through mingw64 python pip, it thus uses cygpath and generated cmake files contain cygpath, whereas cmake expects winpaths

 ╰─λ just configure
Running with debug output on for the `find` commands.
-- Using Conan toolchain: E:/repos/ertms_app_protocols/build/conan_toolchain.cmake
-- Conan toolchain: C++ Standard 23 with extensions ON
-- Conan: Component target declared 'Catch2::Catch2'
-- Conan: Component target declared 'Catch2::Catch2WithMain'
CMake Debug Log at build/cmakedeps_macros.cmake:23 (find_library):
  find_library called with the following settings:

    VAR: CONAN_FOUND_LIBRARY
    NAMES: "Catch2Main"
...
  find_library considered the following locations:

    /c/Users/nekos/.conan2/p/b/catchcb67c17fe103c/p/lib/(lib|)Catch2Main(\.dll\.a|\.a|\.lib)

  The item was not found.

athough:

 ╰─λ ll ~/.conan2/p/b/catchcb67c17fe103c/p/lib/
total 2.2M
drwxr-xr-x 1 Neko None    0 Aug 13 23:23 cmake/
-rw-r--r-- 1 Neko None 2.2M Aug 13 23:23 libCatch2.a
-rw-r--r-- 1 Neko None 2.2K Aug 13 23:23 libCatch2Main.a

I find it a bit strange that cmake CMAKE_SYSTEM is Windows and uses winpath in mingw64, maybe it is not.

How should I handle this issue the best.
I had a though that if I installed conan through a windows python3 it should use windows path, is that really a thing ?
Should I use mingw64 python-conan package (I recently found there was one) ?

thanks in adavance for any help 🙂

floral lark
#

the mingw python only uses windows paths. Maybe you used the wrong one?

#

(I've never used conan though)

#

which pip should give you /ucrt64/bin/pip

#

and note we also have a conan package in pacman, if you want

neat crown
#
 ╰─λ which python
/mingw64/bin/python
 ╰─λ which pip
/usr/bin/pip

seems like I have the wrong pip 🤔

neat crown
floral lark
#

yes

#

you need pacman -S mingw-w64-x86_64-python-pip

#

or pacman -S mingw-w64-x86_64-python-conan