|
|
Home » Developing U++ » UppHub » OpenCV and openCV_Demo copiling error
OpenCV and openCV_Demo copiling error [message #49620] |
Thu, 15 March 2018 17:54 |
Giorgio
Messages: 218 Registered: August 2015
|
Experienced Member |
|
|
Hi there,
I am trying to put in one application a functionality that takes a picture from an usb-cam: for this reason am studying the applications OpenCV and OpenCV_demo, but when I try to compile them (on Windows) I got "error C2059: syntax error : 'constant'" at line 170 of the file core/cvdef.h that is part of the OpenCV library; someone has been able to successfully compile those applications?
Regards,
gio
[Updated on: Thu, 15 March 2018 17:56] Report message to a moderator
|
|
|
|
|
|
Re: OpenCV and openCV_Demo copiling error [message #49661 is a reply to message #49660] |
Fri, 23 March 2018 11:51 |
Oblivion
Messages: 1108 Registered: August 2007
|
Senior Contributor |
|
|
Hello Mirek,
I did not download it separately. Latest version is available on Arch Linux by default. Maybe that could be a problem...
Arch Linux:
Linux:
Linux localhost 4.15.10-1-ARCH #1 SMP PREEMPT Thu Mar 15 12:24:34 UTC 2018 x86_64 GNU/Linux
Gcc:
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.1/lto-wrapper
Hedef: x86_64-pc-linux-gnu
/build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --enable-libmpx --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --enable-gnu-indirect-function --enable-multilib --disable-werror --enable-checking=release --enable-default-pie --enable-default-ssp
seçenekleriyle yapılandırıldı.
posix
gcc version 7.3.1 20180312 (GCC)
OpenCV, ver: 3.4.1, under /usr/include/opencv2/core
Aa I wrote in the above message, there is a name clash between a defined constant and enumerator (CPU_SSE2). E.g, the example is compiled successfully if I comment out Core/Config.h, ln 69.
Best regards,
Oblivion
Github page: https://github.com/ismail-yilmaz
upp-components: https://github.com/ismail-yilmaz/upp-components
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
[Updated on: Fri, 23 March 2018 12:00] Report message to a moderator
|
|
|
Re: OpenCV and openCV_Demo copiling error [message #49662 is a reply to message #49660] |
Fri, 23 March 2018 18:50 |
Giorgio
Messages: 218 Registered: August 2015
|
Experienced Member |
|
|
Hi Mirek,
I did not notice that there was a specific package of OpenCV, I was trying to compile on Windows 10, using MSVS15x64.
After your post, I downloaded and copied in uppsrc\plugin the "custom" opencv package, but there is still something that I miss.
The linker complained about the missing library opencv_core240d and other *240d libraries. In the opencv directory there were the same libs with 220d instead of 240d, so in the package organizer I changed *240d with *220d. There were also other libraries missing (I guess all from opencv), but in the lib directories of opencv there were nothing similar, so I simply deleted them. Namely, those libraries are:
-opencv_videostab240d
-libjasperd
-libjpegd
-libpngd
-libtiffd
With these modifications the package OpenCV_demo compiles and links, but when I launch it the system complains about missing MSVC100D.dll and MSVCP100D.dll. I googled them and I found that they are the debug dll of Visual C++ 2010. I reinstalled the Visual C++ 2010 Redistributable Package (it was already installed in my system), but with no luck.
Anyway, I am just testing on Windows, the final version of the software will run on Linux, so I will do further tests with linux.
Regards,
gio
|
|
|
|
|
|
|
Goto Forum:
Current Time: Thu Sep 12 18:52:24 CEST 2024
Total time taken to generate the page: 0.01881 seconds
|
|
|