-
Notifications
You must be signed in to change notification settings - Fork 44
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
Windows installation: unknown symbol 'inline_c_OpenCV_Internal_Exception' #71
Comments
Hi @tmh2211 , great to hear you want to use Unfortunately I can't help you with your problem since I don't have a Windows machine. Maybe try googling for similar problems. |
I don't have either Window. But I could recommend: 1- To use stack. There you'll have the stack.yaml and the your-project.cabal It works fine for me. |
Thanks for your replies. Had the same issue with stack. Maybe I'll just switch to linux. |
It would be a safe and healthy choice 😂 |
I successfully build 0.0.2.1 from source on MinGW with stack's buildin MinGW environment during the building process, I encounted 'undefined symbol __ZdlPvm' while building OpenCV/Core/Types/Rect. It was caused by Template Haskell that can not link stdc++-6.dll. So in opencv.cabal at ghc-options tag, add -lstdc++ to solve the problem then I use stack to create a new project, on stack.yaml I set lts-13.25. setup environment variable PKG_CONFIG_PATH pointing to opencv.pc, execute stack build copy paste an highgui example program from opencv source directory to main.hs, stack build agian copy libstdc++-6.dll from msys provided by stack to the current directory, so that you can execute stack exec Your-program |
additional comment, I recommended to build opencv from source on MinGW. I download opencv-3.4.2 from github, use stack to create an new project, specific lts-13.25 or any other lts equal or greater than lts-10.2 is ok. then I should use stack's buildin gcc to compile opencv source I invoke stack exec -- pacman -S mingw-w64-x86_64-make to install make utility, and so is cmake, stack exec -- pacman -S mingw-w64-x86_64-cmake I invoke stack exec -- sh, this put you in stack's current(lts-13.25) shell environment cd to opencv preconfigured build directory cmake-gui -DCMAKE_MAKE_PROGRAM=path to configurate the opencv build parameters, generate the makefile mingw32-make -j4; mingw32-make install |
I also successfully build under lts-18.28 on win10, I can not help to share some tips, I use stack doing the whole jobs
|
Hi Guys,
I want to use your library for my bachelor project and therefor I'm trying to install it on windows.
I downloaded the opencv version 3.1 for Windows and extracted it to C:\opencv. Then I created the following pc-File:
Name: opencv
Description: Library for machine vision
Version: 3.1.0
CFlags: -IC:\\opencv\\build\\include
Libs: -LC\\opencv\\build\\x64\\vc12\\lib -lopencv_world310
Next I cloned your repository and tried to install it via:
cabal install opencv.cabal
This works until the compilation of OpenCV.Internal.Core.Types.Mat. There I get the following error:
`[36 of 70] Compiling OpenCV.Internal.Core.Types.Mat ( src\OpenCV\Internal\Core\Types\Mat.hs, dist\dist-sandbox-800a0dac\build\OpenCV\Internal\Core\Types\Mat.o )
ghc.exe: dist/dist-sandbox-800a0dac\build\OpenCV\Internal\Exception.o: unknown symbol
inline_c_OpenCV_Internal_Exception_1_2402dbf3aea4f7f79392b71ed42618962a22e9aa' cabal: Error: some packages failed to install: opencv-0.0.0 failed during the building phase. The exception was: ExitFailure 1
My ghc version is: 7.10.3
Note: I'm not an expert on building such projects - especially C - so I'm pretty sure I did something wrong :D.
Thanks for your help
The text was updated successfully, but these errors were encountered: