-
Notifications
You must be signed in to change notification settings - Fork 11
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
MSVS 2017: Impossible to link against BRFv4_WIN_trial.lib #1
Comments
Thanks for the heads up, will keep that in mind for any new release. |
@MarcelKlammer great, thanks! |
Update:
But then... new surprise! I received the following error when running brfv4 from the command prompt: The unfun bit: it looks like OpenCV Windows mantainers don't provide OpenCV for Windows builds with OpenGL support enabled. Dang. It's a pity that there is no easy / immediate way of testing your native windows program on Windows desktop systems (as for the javascript / emscripten case)... Regards :) |
Thanks again for the heads up. I guess that might be the reason no one actually used the Windows version until now :)... |
@MarcelKlammer yes... :) So I decided to try and compile the latest OpenCV (3.4.1) with Open GL support enabled. OpenCV uses CMake to generate project files, so I downloaded the current version (3.11.1) and pointed it to the cloned OpenCV 3 repository folder. After choosing Configure in CMake GUI for the first time, I selected the MSVS 2015 x64 option in the initial configuration step. I also had to solve an issue with CMake not recognizing the Windows SDK / toolchain. Then, for the configure step to succeed, I had to disable a pair of At that point I could successfully run Configure, Generate, and then Open Project. Yay! :) I then built both Debug and Release targets for OpenCV 3.4.1. I then opened the brfv4 project and set in Project Settings the proper include and lib folders (The Since various separate
(with the And finally to copy the corresponding compiled OpenCV 3 DLLs (similarly to the above That's all, and it works... phew! A question: having an NVidia GPU, would enabling CUDA in OpenCV compiling speed up the detection? Regards. |
Great. That's what I meant in the Readme:
|
And no, the OpenCV stuff is only for camera access and drawing the shapes. All the tracking stuff is BRFv4 at work (face detection/tracking) |
@mathieu-b So I tried the whole process again, just to find a way to use the standard download of opencv v3.4.1... So download the self extracting packing of opencv from their source forge page. Once extracted, load this BRFv4 project from github (download zip). Then open the BRFv4 VS project and open the project settings (Release/x64). Debugging/Environment (Umgebung in German), add PATH=C:\Users\YOURUSERNAME\PATHTO\opencv\build\x64\vc15\bin;%PATH% So no need to copy any dll. Under C/C++, change the include folder to : C:\Users\YOURUSERNAME\PATHTO\opencv\build\include Under Linker, change the lib folder: C:\Users\YOURUSERNAME\PATHTO\opencv\build\x64\vc15\lib and under Linker/Input (Eingabe in German), change opencv_world320.lib to opencv_world341.lib. In the code itself use: main.cpp: CameraUtils.hpp ... this will make the current Windows example project work with the current OpenCV standard download. |
Ok, good to know :) |
Shouldn't be pinning to 2.0 - many people will only have the 2.1 SDK installed Fixes Tastenkunst#1
how do you include the library for that? |
I don't understand the question. The whole post is about adding OpenCV to the project settings. |
CameraUtils.hpp For this part,I added it into the main.cpp however it says these two are undeclared hence I found out that these are suppose to have a library so it can be declared. |
CameraUtils.hpp These two parts of the codes seem to be undeclared identifier. How to solve this issue? |
You supposed to be loading main.cpp, this includes CameraUtils.hpp, which itself includes camera.open(1). Not sure how to help you without error message or code. |
The error code is C2065. Error is " 'CameraUtils': undeclared identifier" |
Please take a look at https://github.com/Tastenkunst/brfv4_win_examples/blob/master/brfv4_win_examples/main.cpp and how CameraUtils are imported and used correctly. |
Why would you add those two lines? Remove them. |
I dont really understand how to solve these errors. |
Seems like the BRF library is not in the lib path? |
Do you mean this PATH=C:\Users\YOURUSERNAME\PATHTO\opencv\build\x64\vc15\bin;%PATH% ? |
That would be a path you have to set for OpenCV, which was the topic of this thread. |
Are they all included in your post? |
The project already includes the paths to the libs I guess. Again, I don't have the time to check it. |
Re-downloaded and redid all your steps.Still got the external errors issues. Anyways,thanks alot for your time,Marcel |
Possible to share your cmakelists.txt |
|
Hi
It looks like the
BRFv4_WIN_trial.lib
library has been generated with an older compiler version, possibly MSVS 2015.This might have happened at the time of loading the old project in the new MSVS 2017, where the toolset stayed to that older version instead of being switched to the newest. So the result is a valid MSVS 2017 project that uses the older toolset (which will not necessarily be present on the host machine).
In the meantime I'll try to run the example by downloading the older toolset and selecting it explicitly.
Another (compilmentary) idea would be to use the GitHub "releases" features, where after creating a tag in the repository it becomes possible to upload precompiled binaries and resources associated with that release / tag. In this way the software could be tested without even needing to download and install any version of MSVS, nor having to configure the project either.
Regards.
The text was updated successfully, but these errors were encountered: