Closed R2Sam closed 10 months ago
No idea, I'm sorry. I don't even know if mingw is fully supported since it's not on the CI nor there is a plan to address it. At first glance, it looks like a linking issue and therefore the error is probably in your cmake file but 🤷♂️ it's hard to say from a non-formatted wall of messages as returned by the compiler. Try to provide a little more information if possible. Otherwise, I think there is no way to help you, sorry.
Thanks for answering so quickly. Not sure what more info is needed, builds well using MSVC obviusly, but I was hoping to use the library in a project I have going on using mingw, you think there's any way to do this?
Best way is to share a common environment to have a look. Can you try to setup such an environment with PR ?
I got it to work with mingw by building/installing libuv separately. With libuv installed you can link:
target_link_libraries(myproj libuv::uv uvw::uvw)
Then when you configure your project define -DFIND_LIBUV=ON
I'm sure there's a better way to do it, but that's the quickest workaround I could come up with.
FIND_LIBUV
prevents the libuv to be fetched by CMake (if it can be found somewhere on the HOST building machine).
I'm going to close this, if you are willing to deep dive into more details, feel free to reopen it.
Seems that when I build the project on my windows machine using cmake and mingw I get this string of errors after about halfway through the build. I have checked and a libuvw.a file is outputted but unsupringly it doesn't link to anything I can through at it.
[ 31%] Built target uv_a [ 50%] Built target uvw [ 51%] Built target fake [ 52%] Built target gtest [ 54%] Built target gtest_main [ 55%] Building CXX object test/CMakeFiles/main.dir/main.cpp.obj c++.exe: warning: /EHsc: linker input file unused because linking not done c++.exe: error: /EHsc: linker input file not found: No such file or directory mingw32-make[2]: *** [test\CMakeFiles\main.dir\build.make:76: test/CMakeFiles/main.dir/main.cpp.obj] Error 1 mingw32-make[2]: *** Deleting file 'test/CMakeFiles/main.dir/main.cpp.obj' mingw32-make[1]: *** [CMakeFiles\Makefile2:1129: test/CMakeFiles/main.dir/all] Error 2 mingw32-make: *** [Makefile:145: all] Error 2
This is the error msg that I get from cmake, I'm quite new to all this sort of things but I can't seem to find what I'm doing wrong