-
Notifications
You must be signed in to change notification settings - Fork 777
Copy DLLs for Protonect on Windows #282
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
Conversation
|
Can you add a check if the dlls are actually found? - I, for the fun of it (before this patch - I'm not trying to find errors just for fun!), compiled glfw as a static library without a dll, so I get an error when running the install project :) Also, do you know the instructions for copying the dll, when debugging in VS - maybe a post build script? or can we change so the library dll also gets outputted in the bin/buildtype folder like the protonect? |
|
Locally, I just changed everything to build static libs (libusb, freenect2), then I can just link them and don't need to copy any DLLs and can more easily debug everything |
Yes
What do you mean? This is merely a helper to provide convenience for testing, as least for me who is not using VS IDE. The users can of course use what VS provides and ignore this installation. Personally I don't see the value of the
I tried this and it didn't work without making a mess in CMakeLists.txt. If you have a clean patch to enable static linking of Protonect, submit it and that'd be great. |
|
I think the current build system only supports building a dynamically linked Protonect.exe, therefore it is justified to enhance that functionality. Supporting a static build of Protonect.exe is a separate matter and should be handled in a different PR. |
|
If I want to debug protonect/libfreenect2(dll) I have to copy the new dll from lib folder to bin folder for VS to pick up new changes etc. This was also a problem before this patch, so there is nothing breaking :) It would just be convenient for VS users not to copy it manually. But I can try figure it out and make a separate PR. |
|
Please do, as I have no idea how to debug in VS IDE. So, this patch is considered correct if you double click |
|
@HenningJ I found out how. The problem with static linking is because the official glfw3.lib static binary is linked with MSVCRT.lib, the dynamic link version. MSVCRT conflicts with LIBCMT etc. For static linking, the users must build glfw3 with |
|
I'll create a seperate PR for static linking on Windows. |
|
@HenningJ I built a completely static Protonect.exe, but it runs very slow with OpenGL processor. What can be the problem? |
|
@xlz Maybe it is a debug build? Those are quite slow in windows. Static linking should not affect performance as far as I know. |
|
@gaborpapp Thanks for the note. It was because glfw3 was not found and cpu processor as used instead.
|
Really? I just got the current version from github, cmaked and built it and it was fine. So, you're doing a pull request for static linking? That's good, so I don't have to figure out how to clean up my cmake files for a proper PR. :-) |
|
Without that flag, the static glfw3.lib is compiled with |
|
Ah, I see what you mean now. But actually, all my static libs seem to be compiled with |
|
At least OpenCV's pre-built static libraries are compiled with |
|
The more I look into it, the more confused I get. But it still works fine. So I'm comfortable with ignoring these warnings. |
|
#284 (building a static Protonect.exe) was closed in favor of this, because juggling /MD and /MT is just confusing. But this PR will stay idle unless any Windows users feel interested again. |
|
Implemented again in #429. This time it should work for both debugging and installation. |
This PR will stay idle unless any Windows users feel interested again.
Install Protonect.exe and linked DLLs to
bin/, so the users can directly run Protonect.exe without having to set up environment paths or copying DLLs themselves.Also, only include the core and highgui components of OpenCV.