Build opencv in windows
Hey All
I installed codeblocks(17.12 with mingw) and extract opencv(4.3.1) and cmake(3.11.1) it in Windows.
Now i want to build the opencv.cbp
I see many error from codeblocks because cant compile code and codes need edit . Is this usual?
see this , i have this error in codeblocks too
please, no screenshots of code or errormsgs. replace those with a TEXT version,
if you're using mingw, which version is it ? (codeblock's is usually too old)
try a
g++ -v
and report back.for heaven's sake NOOOOO
does not exist. you probably mean
3.4.1
?you can add
BUILD_TESTS=OFF
to the cmake params, but i guess, you need to install a a more modern gccyes ( 3.4.1 ) . the newest version of codeblocks is 17.12 . i use version 5.1 ( mingw ) this is not a my code . its a library from opencv and you can see all file in opencv . how can try g++ -v ? tnx
you open a console window and type that.
but 5.1 is a number that makes sense, so it's probably that.
yes, i know. it's from google's test suite. again, you can try to disable the build tests, but expect more problems. here are some nessecary cmake options for building with mingw:
please also check, if you have a 32 or 64 bit version. if you run into problems, the 1st thing will probably be to swap your current mingw for latest mingw64 (7.2 or 7.3), which is somewhat proven to work here.
Hi break again I do all cmake option and i change my MinGW But i have the Errors Again . the first Error i see it : code :
(<typename char_type> bool null_or_empty(const char_type* s) { return s == nullptr || *s == 0; })
Error :( Build: all in OpenCV (compiler: GNU GCC Compiler) ===| D:\Program\Open Cv Modern\sources\3rdparty\protobuf\src\google\protobuf\stubs\io_win32.cc|94|warning: identifier 'nullptr' is a keyword in C++11 [-Wc++0x-compat]| D:\Program\Open Cv Modern\sources\3rdparty\protobuf\src\google\protobuf\stubs\io_win32.cc||In function 'bool google::protobuf::internal::win32::{anonymous}::null_or_empty(const char_type*)':| D:\Program\Open Cv Modern\sources\3rdparty\protobuf\src\google\protobuf\stubs\io_win32.cc|94|error: 'nullptr' was...)
now i try to install another MinGW(w64) and feedback this .
^^ yea, mingw 5.1 does not know c++11 by default
i cant donwload online mingw . i downloaded offline version 6.6 . i have error again . that error showing to me . i have no idea about this .
version 6.6 have c++ 11 ? have link from offline mingw newer version ?
you can try to add
CMAKE_CXX_FLAGS="-std=c++11"
to the cmake flagsor (better) try to get latest minngw64 from here