Views: 6,701,279 Homepage | Main | Rules/FAQ | Memberlist | Active users | Last posts | Calendar | Stats | Online users | Search 03-28-24 11:22 PM
Guest:

0 users reading Compiling on Windows (VSCommunity 2019) - cmake can't find qt5 configs | 1 bot

Main - Development - Compiling on Windows (VSCommunity 2019) - cmake can't find qt5 configs Hide post layouts | New reply


SSUPII
Posted on 06-09-20 01:57 PM (rev. 2 of 06-09-20 01:57 PM) Link | #1848
I get this error:

CMake Error at C:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake:286 (_find_package):
By not providing "FindQt5.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Qt5", but
CMake did not find one.

Could not find a package configuration file provided by "Qt5" with any of
the following names:

Qt5Config.cmake
qt5-config.cmake

Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR"
to a directory containing one of the above files. If "Qt5" provides a
separate development package or SDK, be sure it has been installed. C:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake 286


I get almost the exact same error when building with MSYS but I managed to fix it (I then encountered another error with make, I will post another thread about this one if I fail with VS).

I'm compiling the latest commit in master.

I never used cmake myself, I may be missing something.

Generic aka RSDuck
Posted on 06-09-20 02:13 PM (rev. 2 of 06-09-20 02:13 PM) Link | #1849
msvc is currently not supported.

The build instructions haven't been updated yet. You need to install qt and some other libraries in msys2 using this command
pacman -Sq mingw-w64-x86_64-{cmake,mesa,SDL2,qt5-static,toolchain}


____________________
Take me to your heart / never let me go!

"clearly you need to mow more lawns and buy a better pc" - Hydr8gon

SSUPII
Posted on 06-09-20 03:16 PM Link | #1851
Posted by Generic aka RSDuck
msvc is currently not supported.

The build instructions haven't been updated yet. You need to install qt and some other libraries in msys2 using this command
pacman -Sq mingw-w64-x86_64-{cmake,mesa,SDL2,qt5-static,toolchain}


I installed qt5-static earler by using
pacman -S mingw-w64-x86_64-qt5-static
. Reinstalling it using the commands you gave still game me the error i get with make. Should I create a new thread?

thiccsilv3r
Posted on 06-09-20 08:11 PM Link | #1852
I ran into the same issue.
collect2.exe: error: ld returned 1 exit status
make[2]: *** [src/frontend/qt_sdl/CMakeFiles/melonDS.dir/build.make:593: melonDS.exe] Error 1
make[1]: *** [CMakeFiles/Makefile2:164: src/frontend/qt_sdl/CMakeFiles/melonDS.dir/all] Error 2
make: *** [Makefile:150: all] Error 2

Generic aka RSDuck
Posted on 06-09-20 08:46 PM Link | #1853
if you just want binaries and you have a Github account, you can use our CI aswell: https://github.com/Arisotura/melonDS/runs/751181473

____________________
Take me to your heart / never let me go!

"clearly you need to mow more lawns and buy a better pc" - Hydr8gon

thiccsilv3r
Posted on 06-09-20 10:03 PM Link | #1854
I'm sorry, I'm pretty inexperienced with working with code. I was just following the instructions for downloading melonds on windows and have been applying the patches whenever I run into errors. I don't really understand how this works. What would I do with the binaries?

SSUPII
Posted on 06-10-20 07:00 AM Link | #1855
Posted by Generic aka RSDuck
if you just want binaries and you have a Github account, you can use our CI aswell: https://github.com/Arisotura/melonDS/runs/751181473

I know, but I'm looking to edit the code and probably even trying to contribute on the project in the future.

I have the same issue thiccsilv3r has

Generic aka RSDuck
Posted on 06-10-20 12:56 PM Link | #1859
hm, let's see. Did you use the mingw64 shell and generated Msys Makefiles?

____________________
Take me to your heart / never let me go!

"clearly you need to mow more lawns and buy a better pc" - Hydr8gon

SSUPII
Posted on 06-11-20 05:55 AM Link | #1860
Posted by Generic aka RSDuck
hm, let's see. Did you use the mingw64 shell and generated Msys Makefiles?

Yes, I created the makefiles and using mingw64 from MSYS 64-bit shell

Generic aka RSDuck
Posted on 06-13-20 09:31 AM Link | #1870
did you properly install msys2 (i.e. running all steps listed here?

____________________
Take me to your heart / never let me go!

"clearly you need to mow more lawns and buy a better pc" - Hydr8gon

SSUPII
Posted on 06-29-20 02:38 PM Link | #1966
I'm really sorry for responding this late, I read the message on my phone then forgot about it when I went back home that day.

Posted by Generic aka RSDuck
did you properly install msys2 (i.e. running all steps listed here?


Yes, MSYS is propetly installed.

Reading the logs again I notice a LOT of undefined references to many SDL components. I tried compiling on Debian Linux and it didn't throw any error.

Full log
D:/Software/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/Software/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../lib\libSDL2.a(hid.c.obj):(.text+0x307): undefined reference to `__imp_SetupDiGetClassDevsA'
D:/Software/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/Software/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../lib\libSDL2.a(hid.c.obj):(.text+0x30e): undefined reference to `__imp_SetupDiEnumDeviceInterfaces'
D:/Software/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/Software/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../lib\libSDL2.a(hid.c.obj):(.text+0x31e): undefined reference to `__imp_SetupDiGetDeviceInterfaceDetailA'
D:/Software/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/Software/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../lib\libSDL2.a(hid.c.obj):(.text+0x3ba): undefined reference to `__imp_SetupDiEnumDeviceInfo'
D:/Software/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/Software/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../lib\libSDL2.a(hid.c.obj):(.text+0x3f6): undefined reference to `__imp_SetupDiGetDeviceRegistryPropertyA'
D:/Software/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/Software/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../lib\libSDL2.a(hid.c.obj):(.text+0x435): undefined reference to `__imp_SetupDiDestroyDeviceInfoList'
D:/Software/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/Software/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../lib\libSDL2.a(hid.c.obj):(.text+0x484): undefined reference to `__imp_SetupDiGetDeviceRegistryPropertyA'
collect2.exe: error: ld returned 1 exit status
make[2]: *** [src/frontend/qt_sdl/CMakeFiles/melonDS.dir/build.make:593: melonDS.exe] Error 1
make[1]: *** [CMakeFiles/Makefile2:164: src/frontend/qt_sdl/CMakeFiles/melonDS.dir/all] Error 2
make: *** [Makefile:150: all] Error 2

Generic aka RSDuck
Posted on 06-29-20 02:44 PM Link | #1967
could it be possible that you haven't pulled in the latest changes from git?

because that exact linker problem with SDL was fixed by Nadia some time ago.

____________________
Take me to your heart / never let me go!

"clearly you need to mow more lawns and buy a better pc" - Hydr8gon

SSUPII
Posted on 06-29-20 07:21 PM Link | #1971
I'm cloning the latest commit from master.

Rayyan
Posted on 06-30-20 12:19 PM (rev. 4 of 06-30-20 12:20 PM) Link | #1976

I made this bash script. It works fine for me.
See if it works for you.

melonDS-git.sh
git clone https://github.com/Arisotura/melonDS.git
cd melonDS
mkdir build
cd build
cmake .. -G 'MSYS Makefiles' -DCMAKE_BUILD_TYPE=Release -DBUILD_STATIC=ON -DQT5_STATIC_DIR=D:/msys64/mingw64/qt5-static
make -j$(nproc --all)
../msys-dist.sh
cd dist
explorer.exe .


____________________

How to write an emulator
1. throw code to be emulated somewhere
2. make memory system that allows accessing that code
3. emulate CPU
4. have fun implementing all the other hardware
-- Arisotura, Tuesday 5th January 2021, 22:00:17

SSUPII
Posted on 07-02-20 08:40 PM (rev. 3 of 07-02-20 08:44 PM) Link | #1993
MSYS2 doesn't want to connect to the internet today
fatal: unable to access 'https://github.com/Arisotura/melonDS.git/': Could not resolve host: github.com

Cursed


I simply cloned from Powershell then did the rest on MSYS2 and it indeed compiled. I had to change -DQT5_STATIC_DIR to the directory msys64 was installed (in one subfolder in D:\)

Thanks!

But what exactly was happening? I see we pointed directly to qt5 and specified the build method

Rayyan
Posted on 07-03-20 10:31 AM (rev. 5 of 07-03-20 10:52 AM) Link | #1999

I didn't really write it myself, i copied it from the workflow file. :P

____________________

How to write an emulator
1. throw code to be emulated somewhere
2. make memory system that allows accessing that code
3. emulate CPU
4. have fun implementing all the other hardware
-- Arisotura, Tuesday 5th January 2021, 22:00:17


Main - Development - Compiling on Windows (VSCommunity 2019) - cmake can't find qt5 configs Hide post layouts | New reply

Page rendered in 0.035 seconds. (2048KB of memory used)
MySQL - queries: 29, rows: 108/108, time: 0.014 seconds.
[powered by Acmlm] Acmlmboard 2.064 (2018-07-20)
© 2005-2008 Acmlm, Xkeeper, blackhole89 et al.