OpenCV "conflicting declaration" issue at compilation on armv7l (Odroid XU4) - c++

I'm trying to compile OpenCV 3.4.0 from sources but I'm running into a conflicting declaration issue between QT and OpenGL.
Upgrading from QT4 to QT5 solved some issues but not all.
It looks like GLsizeiptr and GLintptr are declared in both the OpenGL headers and the QT headers.
I tried to replace
#include <GL/glx.h>
with
#include <GLES3/gl3.h>
in window_QT.cpp but that only created more declaration issues.
Any ideas on how to fix that?
(My machine is an armv7l (Odroid XU4) running Ubuntu 16.04.3 LTS)
The cmake command I'm running:
cmake -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=/usr/local -DWITH_QT=5 -DWITH_OPENGLES=ON -DWITH_V4L=ON -DWITH_TBB=ON -DBUILD_TBB=ON -DENABLE_VFPV3=ON -DENABLE_NEON=ON ..
make -j8
the errors I'm getting:
[ 62%] Built target opencv_videoio
[ 63%] Built target opencv_superres
[ 63%] Building CXX object
modules/highgui/CMakeFiles/opencv_highgui.dir/src/window_QT.cpp.o
cc1plus: warning: /home/odroid/temporary_cmake_binary_dir/opencv-3.4.0/release/modules/highgui/precomp.hpp.gch/opencv_highgui_RELEASE.gch: not used because `TBB_USE_GCC_BUILTINS' is defined [-Winvalid-pch]
In file included from /usr/include/GL/gl.h:2055:0,
from /usr/include/GL/glx.h:32,
from /home/odroid/temporary_cmake_binary_dir/opencv-3.4.0/modules/highgui/src/window_QT.cpp:59:
/usr/include/GL/glext.h:466:19: error: conflicting declaration ‘typedef ptrdiff_t GLsizeiptr’
typedef ptrdiff_t GLsizeiptr;
^
In file included from /usr/include/arm-linux-gnueabihf/qt5/QtGui/qopengl.h:95:0,
from /usr/include/arm-linux-gnueabihf/qt5/QtGui/qopenglcontext.h:54,
from /usr/include/arm-linux-gnueabihf/qt5/QtGui/QtGui:32,
from /usr/include/arm-linux-gnueabihf/qt5/QtOpenGL/QtOpenGLDepends:4,
from /usr/include/arm-linux-gnueabihf/qt5/QtOpenGL/QtOpenGL:3,
from /home/odroid/temporary_cmake_binary_dir/opencv-3.4.0/modules/highgui/src/window_QT.h:50,
from /home/odroid/temporary_cmake_binary_dir/opencv-3.4.0/modules/highgui/src/window_QT.cpp:47:
/usr/include/GLES3/gl31.h:77:25: note: previous declaration as ‘typedef khronos_ssize_t GLsizeiptr’
typedef khronos_ssize_t GLsizeiptr;
^
In file included from /usr/include/GL/gl.h:2055:0,
from /usr/include/GL/glx.h:32,
from /home/odroid/temporary_cmake_binary_dir/opencv-3.4.0/modules/highgui/src/window_QT.cpp:59:
/usr/include/GL/glext.h:467:19: error: conflicting declaration ‘typedef ptrdiff_t GLintptr’
typedef ptrdiff_t GLintptr;
^
In file included from /usr/include/arm-linux-gnueabihf/qt5/QtGui/qopengl.h:95:0,
from /usr/include/arm-linux-gnueabihf/qt5/QtGui/qopenglcontext.h:54,
from /usr/include/arm-linux-gnueabihf/qt5/QtGui/QtGui:32,
from /usr/include/arm-linux-gnueabihf/qt5/QtOpenGL/QtOpenGLDepends:4,
from /usr/include/arm-linux-gnueabihf/qt5/QtOpenGL/QtOpenGL:3,
from /home/odroid/temporary_cmake_binary_dir/opencv-3.4.0/modules/highgui/src/window_QT.h:50,
from /home/odroid/temporary_cmake_binary_dir/opencv-3.4.0/modules/highgui/src/window_QT.cpp:47:
/usr/include/GLES3/gl31.h:78:26: note: previous declaration as ‘typedef khronos_intptr_t GLintptr’
typedef khronos_intptr_t GLintptr;
^
[ 63%] Built target gen_opencv_python_source
modules/highgui/CMakeFiles/opencv_highgui.dir/build.make:129: recipe for target 'modules/highgui/CMakeFiles/opencv_highgui.dir/src/window_QT.cpp.o' failed
make[2]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/src/window_QT.cpp.o] Error 1
CMakeFiles/Makefile2:5307: recipe for target 'modules/highgui/CMakeFiles/opencv_highgui.dir/all' failed
make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
Thanks for the help!

Problem solved: I just tried a fresh install with latest version of opencv cloned directly from github and the install went flawlessly.

Related

Build using 0.5 libyaml-cpp-dev fails with boost errors

I installed libyaml-cpp-dev via sudo apt install libyaml-cpp-dev and got yaml-cpp 0.5 version installed on my machine.
dpkg -s libyaml-cpp-dev | grep Version
Version: 0.5.2-4ubuntu1
Using this , I tried to build a testing code, demo.cpp as below:
#include <string>
#include "yaml-cpp/yaml.h"
int main(){
std::string config_file{"/home/freyr/exper/yamp-cpp/rvs.conf"};
YAML::Node config = YAML::LoadFile(config_file);
return 0;
}
with a cmake,
cmake_minimum_required (VERSION 2.8.11)
project (HELLO)
find_package(yaml-cpp REQUIRED)
add_executable (helloDemo demo.cpp)
include_directories(${YAML_CPP_INCLUDE_DIRS})
target_link_libraries(helloDemo ${YAML_CPP_LIBRARIES})
When I tried to build , I get below error:
make: Entering directory '/home/freyr/exper/yamp-cpp/build' make[1]: Entering directory '/home/freyr/exper/yamp-cpp/build' make[2]: Entering directory '/home/freyr/exper/yamp-cpp/build' Scanning dependencies of target helloDemo make[2]: Leaving directory '/home/freyr/exper/yamp-cpp/build' make[2]: Entering directory '/home/freyr/exper/yamp-cpp/build' [ 50%] Building CXX object CMakeFiles/helloDemo.dir/demo.cpp.o In file included from /usr/include/yaml-cpp/node/iterator.h:13:0,
from /usr/include/yaml-cpp/node/impl.h:11,
from /usr/include/yaml-cpp/yaml.h:17,
from /home/freyr/exper/yamp-cpp/demo.cpp:3: /usr/include/yaml-cpp/node/detail/iterator.h: In member function ‘void YAML::detail::iterator_base<V>::increment()’: /usr/include/yaml-cpp/node/detail/iterator.h:48:54: error: ‘next’ is not a member of ‘boost’ void increment() { this->base_reference() = boost::next(this->base()); }
^~~~ /usr/include/yaml-cpp/node/detail/iterator.h:48:54: note: suggested alternatives: In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/bits/char_traits.h:39,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from /home/freyr/exper/yamp-cpp/demo.cpp:1: /usr/include/c++/7/bits/stl_iterator_base_funcs.h:208:5: note: ‘std::next’
next(_ForwardIterator __x, typename
^~~~ In file included from /usr/local/include/boost/mpl/next.hpp:17:0,
from /usr/local/include/boost/mpl/bind.hpp:25,
from /usr/local/include/boost/mpl/lambda.hpp:18,
from /usr/local/include/boost/mpl/apply.hpp:25,
from /usr/local/include/boost/iterator/iterator_facade.hpp:36,
from /usr/include/yaml-cpp/node/detail/node_iterator.h:12,
from /usr/include/yaml-cpp/node/detail/iterator.h:12,
from /usr/include/yaml-cpp/node/iterator.h:13,
from /usr/include/yaml-cpp/node/impl.h:11,
from /usr/include/yaml-cpp/yaml.h:17,
from /home/freyr/exper/yamp-cpp/demo.cpp:3: /usr/local/include/boost/mpl/next_prior.hpp:29:8: note: ‘boost::mpl::next’ struct next
^~~~ CMakeFiles/helloDemo.dir/build.make:62: recipe for target 'CMakeFiles/helloDemo.dir/demo.cpp.o' failed make[2]: *** [CMakeFiles/helloDemo.dir/demo.cpp.o] Error 1 make[2]: Leaving directory '/home/freyr/exper/yamp-cpp/build' CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/helloDemo.dir/all' failed make[1]: *** [CMakeFiles/helloDemo.dir/all] Error 2 make[1]: Leaving directory '/home/freyr/exper/yamp-cpp/build' Makefile:83: recipe for target 'all' failed make: *** [all] Error 2
I see in latest https://github.com/jbeder/yaml-cpp/blob/master/include/yaml-cpp/node/detail/iterator.h there are no references to boost ad it is all std c++ alone.
How do I install latest version of libyaml-cpp-dev which has no boost dependencies ? I dont want to build and install from latest version as git cloning from master every time will not be a very secure practice.
yaml-cpp introduced boost dependency in version 0.5 and removed it in version 0.6. You need to upgrade your Ubuntu to a newer release or install yaml-cpp from sources, or install a version of yaml-cpp older than 0.5.
See: https://yaml-cpp.docsforge.com/#how-to-build
yaml-cpp 0.6.0 has been released! This release requires C++11, and no longer depends on Boost.
See also https://www.ubuntuupdates.org/package/core/hirsute/main/base/yaml-cpp - the current version of yaml-cpp in Ubuntu 21.4 is 0.6.3-9ubuntu1

Building OpenCV using makefile throwing error?

I was trying to setup OpenCV environment using MingW64 and visual studio code,
Work done so far
Installed and set environment CMake
Installed OpenCV 4.5.2
OpenCV Makefile generation
using CMake Build from source(openCV directory)
specified the generator for the project
configured the compiler type and makefile type
Enabled precompiled header
Confusing part
when I entered the command mingw32-make for compilation in directory where the makefile is generated
It worked until 67% after that:
[ 67%] Built target pch_Generate_opencv_test_dnn
Scanning dependencies of target opencv_test_dnn
[ 67%] Building CXX object modules/dnn/CMakeFiles/opencv_test_dnn.dir/test/npy_blob.cpp.obj
In file included from <command-line>:0:0:
D:/opencv/build/modules/dnn/test_precomp.hpp:50:10: fatal error: test_common.hpp: No such file or directory
#include "test_common.hpp"
^~~~~~~~~~~~~~~~~
compilation terminated.
mingw32-make[2]: *** [modules\dnn\CMakeFiles\opencv_test_dnn.dir\build.make:82: modules/dnn/CMakeFiles/opencv_test_dnn.dir/test/npy_blob.cpp.obj] Error 1
mingw32-make[1]: *** [CMakeFiles\Makefile2:3429: modules/dnn/CMakeFiles/opencv_test_dnn.dir/all] Error 2
mingw32-make: *** [Makefile:181: all] Error 2
thank you

Cannot install OpenOnload on AWS Server

I am trying to install OpenOnload on an AWS server running Ubuntu server 18.04.3. I downloaded the DEB release package from version 7.1.0.265 (the latest) from here: https://support.solarflare.com/index.php/component/cognidox/?view=categories&id=361
and then extract out of it just the folder \onload_7.1.0.265-debiansource.tgz\onload_7.1.0.265.orig.tar.gz and untar that. Then I can run
$ ./scripts/onload_install
as per the instructions in the README file. On Ubuntu 20 on my local machine this all worked and installed OpenOnload fine but on an AWS server instance this error is thrown:
onload_install: Building Onload.
Build tree made for linux as x86_64_linux-4.15.0-1057-aws
make: Entering directory '/home/ubuntu/onload-7.1.0.265/build/x86_64_linux-4.15.0-1057-aws'
# Build both autocompat.h files: linux_net and linux_affinity.
make -C driver/linux_net
make[1]: Entering directory '/home/ubuntu/onload-7.1.0.265/build/x86_64_linux-4.15.0-1057-aws/driver/linux_net'
make -C /usr/src/linux-headers-4.15.0-1057-aws CC="cc" M=$(pwd)
make[2]: Entering directory '/usr/src/linux-headers-4.15.0-1057-aws'
/home/ubuntu/onload-7.1.0.265/src/driver/linux_net/Makefile:61: SFE4001/Falcon is no longer supported
CHK /home/ubuntu/onload-7.1.0.265/build/x86_64_linux-4.15.0-1057-aws/driver/linux_net/autocompat.h
UPD /home/ubuntu/onload-7.1.0.265/build/x86_64_linux-4.15.0-1057-aws/driver/linux_net/autocompat.h
CHK /home/ubuntu/onload-7.1.0.265/build/x86_64_linux-4.15.0-1057-aws/driver/linux_net/config.h
UPD /home/ubuntu/onload-7.1.0.265/build/x86_64_linux-4.15.0-1057-aws/driver/linux_net/config.h
CC [M] /home/ubuntu/onload-7.1.0.265/build/x86_64_linux-4.15.0-1057-aws/driver/linux_net/efx.o
/home/ubuntu/onload-7.1.0.265/build/x86_64_linux-4.15.0-1057-aws/driver/linux_net/efx.c: In function ‘efx_init_struct’:
/home/ubuntu/onload-7.1.0.265/build/x86_64_linux-4.15.0-1057-aws/driver/linux_net/efx.c:5225:2: error: implicit declaration of function ‘efx_mtd_free’; did you mean ‘efx_mtd_probe’? [-Werror=implicit-function-declaration]
efx_mtd_free(efx);
^~~~~~~~~~~~
efx_mtd_probe
/home/ubuntu/onload-7.1.0.265/build/x86_64_linux-4.15.0-1057-aws/driver/linux_net/efx.c:5224:1: warning: label ‘fail’ defined but not used [-Wunused-label]
fail:
^~~~
/home/ubuntu/onload-7.1.0.265/build/x86_64_linux-4.15.0-1057-aws/driver/linux_net/efx.c: In function ‘efx_fini_struct’:
/home/ubuntu/onload-7.1.0.265/build/x86_64_linux-4.15.0-1057-aws/driver/linux_net/efx.c:5247:9: error: ‘struct efx_nic’ has no member named ‘mtd_struct’
if (efx->mtd_struct) {
^~
/home/ubuntu/onload-7.1.0.265/build/x86_64_linux-4.15.0-1057-aws/driver/linux_net/efx.c:5248:6: error: ‘struct efx_nic’ has no member named ‘mtd_struct’
efx->mtd_struct->efx = NULL;
^~
/home/ubuntu/onload-7.1.0.265/build/x86_64_linux-4.15.0-1057-aws/driver/linux_net/efx.c:5249:6: error: ‘struct efx_nic’ has no member named ‘mtd_struct’
efx->mtd_struct = NULL;
^~
cc1: some warnings being treated as errors
scripts/Makefile.build:330: recipe for target '/home/ubuntu/onload-7.1.0.265/build/x86_64_linux-4.15.0-1057-aws/driver/linux_net/efx.o' failed
make[3]: *** [/home/ubuntu/onload-7.1.0.265/build/x86_64_linux-4.15.0-1057-aws/driver/linux_net/efx.o] Error 1
Makefile:1580: recipe for target '_module_/home/ubuntu/onload-7.1.0.265/build/x86_64_linux-4.15.0-1057-aws/driver/linux_net' failed
make[2]: *** [_module_/home/ubuntu/onload-7.1.0.265/build/x86_64_linux-4.15.0-1057-aws/driver/linux_net] Error 2
make[2]: Leaving directory '/usr/src/linux-headers-4.15.0-1057-aws'
/home/ubuntu/onload-7.1.0.265/src/driver/linux_net/Makefile:300: recipe for target 'modules' failed
make[1]: *** [modules] Error 2
make[1]: Leaving directory '/home/ubuntu/onload-7.1.0.265/build/x86_64_linux-4.15.0-1057-aws/driver/linux_net'
../../src/mmake.mk:57: recipe for target 'all' failed
make: *** [all] Error 2
make: Leaving directory '/home/ubuntu/onload-7.1.0.265/build/x86_64_linux-4.15.0-1057-aws'
onload_build: ERROR: Failed to build driver components.
onload_install: ERROR: Build failed. Not installing.
Could this be due to incompatibility with some specific features on AWS? I checked the version compatibility for the downloaded source and it says compatible with Ubuntu server 18.04. Any ideas on how to fix it would be greatly appreciated!
Based on the comments.
The solution was to use Onload-7.0.0.176 instead of Onload-7.1.0.265.
Seems version Onload-7.1.0.265 has some compilation bugs on Ubuntu 18.04.

CGREEN compilation error: ‘assertion_tests’ does not name a type

When I try to compile cgreen unit testing framework in cygwin64 I get this error:
[ 34%] Building CXX object tests/CMakeFiles/cgreen_cpp_tests.dir/assertion_tests.cpp.o
/home/Administrator/cgreen/tests/assertion_tests.cpp:1:1: error: ‘assertion_tests’ does not name a type
assertion_tests.c
^~~~~~~~~~~~~~~
make[2]: *** [tests/CMakeFiles/cgreen_cpp_tests.dir/build.make:63: tests/CMakeFiles/cgreen_cpp_tests.dir/assertion_tests.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1615: tests/CMakeFiles/cgreen_cpp_tests.dir/all] Error 2 make: *** [Makefile:161: all] Error 2
I have searched on google with no result.
I am using cygwin64 with cmake 3.6.2 and gcc 7.3.0
Any help will be appreciated!
The assertion_tests.cpp file is a symlink, see github cgreen repo. Sadly, on windows symlink is converted into textfile with the path to the file it should link to. You need to convert the file into actual link, as well all the others links in the cgreen repo, and there are some. Some help on how to do it may be better found on this thread.

Problems with Running MySQL Connector in CLion

I've recently installed MySQL Connector for CLion as I am planning to make a program that would MySQL Databases. I've installed the Connector from the mysql website and tried the code that is provided by the website. After running it, I found that it says that boost/shared_ptr.hpp does not exist. So I went to download boost version 1.66.0 and installed it into my C drive. I also added these directories into my Cmake file but they still showed errors.
This is my Cmake File:
cmake_minimum_required(VERSION 3.8)
project(Learn_Cpp)
set(CMAKE_CXX_STANDARD 17)
LINK_DIRECTORIES(C:/Program Files/MySQL/MySQL Connector)
LINK_DIRECTORIES(C++ 1.1.9/include C:/Boost/boost_1_66_0)
include_directories("C:/Program Files/MySQL/MySQL Connector C++ 1.1.9/include" "C:/Boost/boost_1_66_0")
set(SOURCE_FILES "C++ Tutorials/Learn.cpp" "C++ Tutorials/ClassFile.cpp" "C++ Tutorials/ClassFile.h" "C++ Tutorials/Learn.cpp")
add_executable(Learn_Cpp ${SOURCE_FILES})
I tried resolving this issue and another error showed up that I do not have a user.hpp file in boost/config.
Here is the error message:
"C:\Program Files\JetBrains\CLion 2017.2.3\bin\cmake\bin\cmake.exe" --build C:\Users\Timothy\CLionProjects\Learn_Cpp\cmake-build-debug --target all -- -j 4
[ 33%] Building CXX object CMakeFiles/Learn_Cpp.dir/C++_Tutorials/Learn.cpp.obj
In file included from C:/Boost/boost_1_66_0/boost/smart_ptr/shared_ptr.hpp:17:0,
from C:/Boost/boost_1_66_0/boost/shared_ptr.hpp:17,
from C:/PROGRA~1/MySQL/MYSQLC~1.9/include/mysql_connection.h:31,
from C:\Users\Timothy\CLionProjects\Learn_Cpp\C++ Tutorials\Learn.cpp:9:
C:/Boost/boost_1_66_0/boost/config.hpp:30:29: fatal error: boost/config/user.hpp: No such file or directory
# include BOOST_USER_CONFIG
^
compilation terminated.
CMakeFiles\Learn_Cpp.dir\build.make:62: recipe for target 'CMakeFiles/Learn_Cpp.dir/C++_Tutorials/Learn.cpp.obj' failed
mingw32-make.exe[2]: *** [CMakeFiles/Learn_Cpp.dir/C++_Tutorials/Learn.cpp.obj] Error 1
mingw32-make.exe[1]: *** [CMakeFiles/Learn_Cpp.dir/all] Error 2
CMakeFiles\Makefile2:66: recipe for target 'CMakeFiles/Learn_Cpp.dir/all' failed
Makefile:82: recipe for target 'all' failed
mingw32-make.exe: *** [all] Error 2
Anyone who could provide a solution to this will be greatly appreciated. Thanks.
UPDATE:
I resolved the error "user.hpp" but I got another error message, this time regarding int32_t and uint32_t. I have no idea what these are or how to resolve this issue.
This is the error message now:
"C:\Program Files\JetBrains\CLion 2017.2.3\bin\cmake\bin\cmake.exe" --build C:\Users\Timothy\CLionProjects\Learn_Cpp\cmake-build-debug --target Learn_Cpp -- -j 4
Scanning dependencies of target Learn_Cpp
[ 25%] Building CXX object CMakeFiles/Learn_Cpp.dir/C++_Tutorials/ClassFile.cpp.obj
[ 75%] Building CXX object CMakeFiles/Learn_Cpp.dir/C++_Tutorials/Learn.cpp.obj
[ 75%] Building CXX object CMakeFiles/Learn_Cpp.dir/C++_Tutorials/Classes_and_simple_prgm.cpp.obj
In file included from C:/PROGRA~1/MySQL/MYSQLC~1.9/include/cppconn/resultset.h:30:0,
from C:\Users\Timothy\CLionProjects\Learn_Cpp\C++ Tutorials\Learn.cpp:13:
C:/PROGRA~1/MySQL/MYSQLC~1.9/include/cppconn/config.h:95:19: error: conflicting declaration 'typedef long int int32_t'
typedef __int32 int32_t;
^~~~~~~
In file included from c:\mingw\lib\gcc\mingw32\6.3.0\include\stdint.h:9:0,
from c:\mingw\lib\gcc\mingw32\6.3.0\include\c++\cstdint:41,
from c:\mingw\lib\gcc\mingw32\6.3.0\include\c++\bits\char_traits.h:420,
from c:\mingw\lib\gcc\mingw32\6.3.0\include\c++\ios:40,
from c:\mingw\lib\gcc\mingw32\6.3.0\include\c++\ostream:38,
from c:\mingw\lib\gcc\mingw32\6.3.0\include\c++\iostream:39,
from C:\Users\Timothy\CLionProjects\Learn_Cpp\C++ Tutorials\Learn.cpp:5:
c:\mingw\include\stdint.h:62:15: note: previous declaration as 'typedef int int32_t'
typedef int int32_t;
^~~~~~~
In file included from C:/PROGRA~1/MySQL/MYSQLC~1.9/include/cppconn/resultset.h:30:0,
from C:\Users\Timothy\CLionProjects\Learn_Cpp\C++ Tutorials\Learn.cpp:13:
C:/PROGRA~1/MySQL/MYSQLC~1.9/include/cppconn/config.h:99:26: error: conflicting declaration 'typedef long unsigned int uint32_t'
typedef unsigned __int32 uint32_t;
^~~~~~~~
In file included from c:\mingw\lib\gcc\mingw32\6.3.0\include\stdint.h:9:0,
from c:\mingw\lib\gcc\mingw32\6.3.0\include\c++\cstdint:41,
from c:\mingw\lib\gcc\mingw32\6.3.0\include\c++\bits\char_traits.h:420,
from c:\mingw\lib\gcc\mingw32\6.3.0\include\c++\ios:40,
from c:\mingw\lib\gcc\mingw32\6.3.0\include\c++\ostream:38,
from c:\mingw\lib\gcc\mingw32\6.3.0\include\c++\iostream:39,
from C:\Users\Timothy\CLionProjects\Learn_Cpp\C++ Tutorials\Learn.cpp:5:
c:\mingw\include\stdint.h:63:19: note: previous declaration as 'typedef unsigned int uint32_t'
typedef unsigned uint32_t;
^~~~~~~~
In file included from C:/PROGRA~1/MySQL/MYSQLC~1.9/include/cppconn/statement.h:30:0,
from C:\Users\Timothy\CLionProjects\Learn_Cpp\C++ Tutorials\Learn.cpp:14:
C:/PROGRA~1/MySQL/MYSQLC~1.9/include/cppconn/config.h:95:19: error: conflicting declaration 'typedef long int int32_t'
typedef __int32 int32_t;
^~~~~~~
In file included from c:\mingw\lib\gcc\mingw32\6.3.0\include\stdint.h:9:0,
from c:\mingw\lib\gcc\mingw32\6.3.0\include\c++\cstdint:41,
from c:\mingw\lib\gcc\mingw32\6.3.0\include\c++\bits\char_traits.h:420,
from c:\mingw\lib\gcc\mingw32\6.3.0\include\c++\ios:40,
from c:\mingw\lib\gcc\mingw32\6.3.0\include\c++\ostream:38,
from c:\mingw\lib\gcc\mingw32\6.3.0\include\c++\iostream:39,
from C:\Users\Timothy\CLionProjects\Learn_Cpp\C++ Tutorials\Learn.cpp:5:
c:\mingw\include\stdint.h:62:15: note: previous declaration as 'typedef int int32_t'
typedef int int32_t;
^~~~~~~
In file included from C:/PROGRA~1/MySQL/MYSQLC~1.9/include/cppconn/statement.h:30:0,
from C:\Users\Timothy\CLionProjects\Learn_Cpp\C++ Tutorials\Learn.cpp:14:
C:/PROGRA~1/MySQL/MYSQLC~1.9/include/cppconn/config.h:99:26: error: conflicting declaration 'typedef long unsigned int uint32_t'
typedef unsigned __int32 uint32_t;
^~~~~~~~
In file included from c:\mingw\lib\gcc\mingw32\6.3.0\include\stdint.h:9:0,
from c:\mingw\lib\gcc\mingw32\6.3.0\include\c++\cstdint:41,
from c:\mingw\lib\gcc\mingw32\6.3.0\include\c++\bits\char_traits.h:420,
from c:\mingw\lib\gcc\mingw32\6.3.0\include\c++\ios:40,
from c:\mingw\lib\gcc\mingw32\6.3.0\include\c++\ostream:38,
from c:\mingw\lib\gcc\mingw32\6.3.0\include\c++\iostream:39,
from C:\Users\Timothy\CLionProjects\Learn_Cpp\C++ Tutorials\Learn.cpp:5:
c:\mingw\include\stdint.h:63:19: note: previous declaration as 'typedef unsigned int uint32_t'
typedef unsigned uint32_t;
^~~~~~~~
mingw32-make.exe[3]: *** [CMakeFiles/Learn_Cpp.dir/C++_Tutorials/Learn.cpp.obj] Error 1
mingw32-make.exe[3]: *** Waiting for unfinished jobs....
CMakeFiles\Learn_Cpp.dir\build.make:87: recipe for target 'CMakeFiles/Learn_Cpp.dir/C++_Tutorials/Learn.cpp.obj' failed
CMakeFiles\Makefile2:66: recipe for target 'CMakeFiles/Learn_Cpp.dir/all' failed
mingw32-make.exe[2]: *** [CMakeFiles/Learn_Cpp.dir/all] Error 2
CMakeFiles\Makefile2:78: recipe for target 'CMakeFiles/Learn_Cpp.dir/rule' failed
mingw32-make.exe[1]: *** [CMakeFiles/Learn_Cpp.dir/rule] Error 2
mingw32-make.exe: *** [Learn_Cpp] Error 2
Makefile:117: recipe for target 'Learn_Cpp' failed