Quantcast
Channel: MySQL Forums - Connector/C++
Viewing all articles
Browse latest Browse all 527

C++ mysql connection problem (no replies)

$
0
0
I've centos7.5 and codeblocks 17 in VM. i am trying to build small project that needs to connect to mysql connection with c++. but having this error :-

||=== Build: Release in cbs (compiler: GNU GCC Compiler) ===|
/usr/include/mysql/mysql/psi/psi.h|40|error: #error "You must include my_global.h in the code for the build to be correct."|
/usr/include/mysql/mysql/psi/psi.h|40|error: #error "You must include my_global.h in the code for the build to be correct."|
/usr/include/c++/4.8.2/bits/stl_algobase.h|239|error: macro "min" passed 3 arguments, but takes just 2|
/usr/include/c++/4.8.2/bits/stl_algobase.h|260|error: macro "max" passed 3 arguments, but takes just 2|
/usr/include/mysql/mysql/psi/mysql_thread.h||In function ‘int inline_mysql_cond_wait(mysql_cond_t*, mysql_mutex_t*, const char*, uint)’:|
/usr/include/mysql/mysql/psi/mysql_thread.h|1151|error: ‘my_cond_wait’ was not declared in this scope|
/usr/include/mysql/mysql/psi/mysql_thread.h|1162|error: ‘my_cond_wait’ was not declared in this scope|
/usr/include/mysql/mysql/psi/mysql_thread.h||In function ‘int inline_mysql_cond_timedwait(mysql_cond_t*, mysql_mutex_t*, const timespec*, const char*, uint)’:|
/usr/include/mysql/mysql/psi/mysql_thread.h|1188|error: ‘my_cond_timedwait’ was not declared in this scope|
/usr/include/mysql/mysql/psi/mysql_thread.h|1199|error: ‘my_cond_timedwait’ was not declared in this scope|
/usr/include/c++/4.8.2/bits/stl_algobase.h|193|error: expected unqualified-id before ‘const’|
/usr/include/c++/4.8.2/bits/stl_algobase.h|193|error: expected ‘)’ before ‘const’|
/usr/include/c++/4.8.2/bits/stl_algobase.h|193|error: expected ‘)’ before ‘const’|
/usr/include/c++/4.8.2/bits/stl_algobase.h|193|error: expected initializer before ‘const’|
/usr/include/c++/4.8.2/bits/stl_algobase.h|216|error: expected unqualified-id before ‘const’|
/usr/include/c++/4.8.2/bits/stl_algobase.h|216|error: expected ‘)’ before ‘const’|
/usr/include/c++/4.8.2/bits/stl_algobase.h|216|error: expected ‘)’ before ‘const’|
/usr/include/c++/4.8.2/bits/stl_algobase.h|216|error: expected initializer before ‘const’|
/usr/include/c++/4.8.2/bits/stl_algobase.h|239|error: ‘std::min’ declared as an ‘inline’ variable|
/usr/include/c++/4.8.2/bits/stl_algobase.h|239|error: template declaration of ‘const _Tp& std::min’|
/usr/include/c++/4.8.2/bits/stl_algobase.h|242|error: expected primary-expression before ‘if’|
/usr/include/c++/4.8.2/bits/stl_algobase.h|242|error: expected ‘}’ before ‘if’|
/usr/include/c++/4.8.2/bits/stl_algobase.h|244|error: expected unqualified-id before ‘return’|
/usr/include/c++/4.8.2/bits/stl_algobase.h|260|error: ‘max’ declared as an ‘inline’ variable|
/usr/include/c++/4.8.2/bits/stl_algobase.h|260|error: template declaration of ‘const _Tp& max’|
/usr/include/c++/4.8.2/bits/stl_algobase.h|263|error: expected primary-expression before ‘if’|
/usr/include/c++/4.8.2/bits/stl_algobase.h|263|error: expected ‘}’ before ‘if’|
/usr/include/c++/4.8.2/bits/stl_algobase.h|265|error: expected unqualified-id before ‘return’|
/usr/include/c++/4.8.2/bits/stl_algobase.h|266|error: expected declaration before ‘}’ token|
/usr/include/mysql/mysql/psi/psi.h|40|error: #error "You must include my_global.h in the code for the build to be correct."|
/usr/include/c++/4.8.2/bits/stl_algobase.h|239|error: macro "min" passed 3 arguments, but takes just 2|
/usr/include/c++/4.8.2/bits/stl_algobase.h|260|error: macro "max" passed 3 arguments, but takes just 2|
/usr/include/mysql/mysql/psi/mysql_thread.h||In function ‘int inline_mysql_cond_wait(mysql_cond_t*, mysql_mutex_t*, const char*, uint)’:|
/usr/include/mysql/mysql/psi/mysql_thread.h|1151|error: ‘my_cond_wait’ was not declared in this scope|
/usr/include/mysql/mysql/psi/mysql_thread.h|1162|error: ‘my_cond_wait’ was not declared in this scope|
/usr/include/mysql/mysql/psi/mysql_thread.h||In function ‘int inline_mysql_cond_timedwait(mysql_cond_t*, mysql_mutex_t*, const timespec*, const char*, uint)’:|
/usr/include/mysql/mysql/psi/mysql_thread.h|1188|error: ‘my_cond_timedwait’ was not declared in this scope|
/usr/include/mysql/mysql/psi/mysql_thread.h|1199|error: ‘my_cond_timedwait’ was not declared in this scope|
/usr/include/c++/4.8.2/bits/stl_algobase.h|193|error: expected unqualified-id before ‘const’|
/usr/include/c++/4.8.2/bits/stl_algobase.h|193|error: expected ‘)’ before ‘const’|
/usr/include/c++/4.8.2/bits/stl_algobase.h|193|error: expected ‘)’ before ‘const’|
/usr/include/c++/4.8.2/bits/stl_algobase.h|193|error: expected initializer before ‘const’|
/usr/include/c++/4.8.2/bits/stl_algobase.h|216|error: expected unqualified-id before ‘const’|
/usr/include/c++/4.8.2/bits/stl_algobase.h|216|error: expected ‘)’ before ‘const’|
/usr/include/c++/4.8.2/bits/stl_algobase.h|216|error: expected ‘)’ before ‘const’|
/usr/include/c++/4.8.2/bits/stl_algobase.h|216|error: expected initializer before ‘const’|
/usr/include/c++/4.8.2/bits/stl_algobase.h|239|error: ‘std::min’ declared as an ‘inline’ variable|
/usr/include/c++/4.8.2/bits/stl_algobase.h|239|error: template declaration of ‘const _Tp& std::min’|
/usr/include/c++/4.8.2/bits/stl_algobase.h|242|error: expected primary-expression before ‘if’|
/usr/include/c++/4.8.2/bits/stl_algobase.h|242|error: expected ‘}’ before ‘if’|
/usr/include/c++/4.8.2/bits/stl_algobase.h|244|error: expected unqualified-id before ‘return’|
/usr/include/c++/4.8.2/bits/stl_algobase.h|260|error: ‘max’ declared as an ‘inline’ variable|
/usr/include/c++/4.8.2/bits/stl_algobase.h|260|error: template declaration of ‘const _Tp& max’|
/usr/include/c++/4.8.2/bits/stl_algobase.h|263|error: expected primary-expression before ‘if’|
||More errors follow but not being shown.|
||Edit the max errors limit in compiler options...|
||=== Build failed: 50 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|

I already included "mysql/my_global.h" but even this problem arised.

Viewing all articles
Browse latest Browse all 527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>