-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues when building on Mingw #5375
Comments
Why build it your self using an unusual compiler if you can build it using travis or appveyor? |
Because I want to eventually contribute to the project which means setting up a dev environment and I don't want to use visual studio. |
That is Genuine, but the best development compiler for windows is of course its native development compiler, that means visual studio. There is a free version of visual studio for those contributing to open source dev. check this out https://visualstudio.microsoft.com/downloads/. If it does not fit your needs, you can set up a development environment ONLINE using appveyor. That save you the hassle of building using that unusual compiler. By the way, in appveyor, just change the code that you want to contribute on your branch and appveyor will compile it for you, hassle free & easy compiling. Those are few of the things that can do in the mean time while you are waiting for mingw experts to check this out. Good luck! :) |
Right I'm aware of visual studio community, however I prefer using VSCode, and if I can get away with not installing VS that would be great. And I didn't know appveyor had online dev environments (if I'm understanding correctly), that sounds pretty cool but I'd rather have a local environment. Now even if there are better ways on windows of getting the dev environment up and running, the instructions for setting up the environment on MinGW are literally on the front page of this repo in the README. If they don't work what's the point of having them there. So even if I don't end up using this in the future, this is also a way of contributing: making sure that the bootstrap instructions on the FRONT PAGE work for everybody and are fool proof. I hope this makes sense |
@guigzzz most likely https://github.com/RPCS3/hidapi/blob/4c2750112e89bf579e7752285ad56e69d15549df/windows/CMakeLists.txt#L1 needs additional line: diff --git a/windows/CMakeLists.txt b/windows/CMakeLists.txt
index 387ac02..873216a 100644
--- a/windows/CMakeLists.txt
+++ b/windows/CMakeLists.txt
@@ -1 +1,2 @@
-add_library(hidapi-hid hid.c)
\ No newline at end of file
+add_library(hidapi-hid hid.c)
+target_link_libraries(hidapi-hid setupapi) and then you may need to re-run cmake. That should address the linkage problems, I'm not sure about discord yet. |
cheers I'll check it out now |
yeap seems like it's working now (I reran CMake and make and the executable linked fine). Thanks guys |
I've submitted RPCS3/hidapi#5 |
This is not entirely fixed yet, the hidapi PR is not merged yet |
Includes RPCS3/hidapi#5 to fix #5375
I followed the steps here and running
make
fails at the very end.The error I get is:
Looking in
rpcs3_build/rpcs3/CMakeFiles/rpcs3.dir/build.make
, I found:bin/rpcs3.exe: discord-rpc/src/libdiscord-rpc.a
Also the path used in the linking is
../discord-rpc/src/libdiscord-rpc.a
I noticed that other
3rdparty
ressources had their paths prepended with3rdparty/
.Trying this, I make the following changes to the
build.make
:bin/rpcs3.exe: discord-rpc/src/libdiscord-rpc.a
->bin/rpcs3.exe: 3rdparty/discord-rpc/src/libdiscord-rpc.a
../discord-rpc/src/libdiscord-rpc.a
->../3rdparty/discord-rpc/src/libdiscord-rpc.a
As expected, these changes fix this error.
Running
make
again, I then get another error:Searching online, I found this stackoverflow thread and tried adding
-lsetupapi -lhid
to the end of the massiveg++
command contained in thebuild.make
.With this change, I finally get everything to link up correctly and the executable to build.
I'm not very familiar with C++ build tools and I have no idea what generates these paths and commands so unfortunately I can't fix this myself. But hopefully someone who knows a bit more than me will be able to figure it out.
The text was updated successfully, but these errors were encountered: