[go: nahoru, domu]

Skip to content
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

Can not build bgslibrary as a static library #194

Open
GuruRajan2211 opened this issue Nov 4, 2020 · 1 comment
Open

Can not build bgslibrary as a static library #194

GuruRajan2211 opened this issue Nov 4, 2020 · 1 comment

Comments

@GuruRajan2211
Copy link

[ 95%] Built target bgslibrary_core
[ 96%] Linking CXX executable bgslibrary
libbgslibrary_core.a(KNN.cpp.o): In function bgslibrary::algorithms::KNN::process(cv::Mat const&, cv::Mat&, cv::Mat&)': KNN.cpp:(.text+0x12d8): undefined reference to cv::createBackgroundSubtractorKNN(int, double, bool)'
libbgslibrary_core.a(MixtureOfGaussianV2.cpp.o): In function bgslibrary::algorithms::MixtureOfGaussianV2::process(cv::Mat const&, cv::Mat&, cv::Mat&)': MixtureOfGaussianV2.cpp:(.text+0xea0): undefined reference to cv::createBackgroundSubtractorMOG2(int, double, bool)'
collect2: error: ld returned 1 exit status
CMakeFiles/bgslibrary.dir/build.make:214: recipe for target 'bgslibrary' failed
make[2]: *** [bgslibrary] Error 1
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/bgslibrary.dir/all' failed
make[1]: *** [CMakeFiles/bgslibrary.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

@andrewssobral
Copy link
Owner

Hello @naruto-uzumakki , sorry for my delayed feedback.
I just released a new version of the BGSLibrary, now v3.1.0. I fixed a lot of issues on this release.
I tested it on Windows, Mac and Linux, both compiling the C++ library on OpenCV 3.4.7, 3.4.16 and 4.6.0.
I also tested its respective Python wrapper and GT user interface.
If you have OpenCV 3 or 4 installed and Python higher than 3.6 (+numpy package):

git clone --recursive https://github.com/andrewssobral/bgslibrary.git
cd bgslibrary/build
cmake .. -DBGS_PYTHON_SUPPORT=ON -DBGS_CORE_STATIC=ON
make -j $(nproc)

Note: at the end you will see some warnings, but it will generate the bgslibrary executable + libbgslibrary_core.a + pybgs.cpython-39-darwin.so (python module to be added in your PYTHONPATH environment variable)
Everything is working for me, could you please check in your side if this new version fix your issues?
Thanks in advance,
Andrews

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants