acl-dev / acl

C/C++ server and network library, including coroutine,redis client,http/https/websocket,mqtt, mysql/postgresql/sqlite client with C/C++ for Linux, Android, iOS, MacOS, Windows, etc..
https://acl-dev.cn
GNU Lesser General Public License v3.0
2.83k stars 937 forks source link

MYSQL冲突 #315

Closed yangzijiang98 closed 10 months ago

yangzijiang98 commented 12 months ago

老师您好,想请问一下和mysql的冲突应该怎么解决呢 In file included from /usr/include/acl-lib/acl_cpp/lib_acl.hpp:118:0, from 01_globals.h:10, from 06_db.cpp:7: /usr/include/acl-lib/acl_cpp/db/db_mysql.hpp:8:25: error: conflicting declaration ‘typedef struct st_mysql MYSQL’ typedef struct st_mysql MYSQL; ^ In file included from 06_db.cpp:4:0: /usr/include/mysql/mysql.h:333:3: note: previous declaration as ‘typedef struct MYSQL MYSQL’ } MYSQL;

zhengshuxin commented 12 months ago

可以在/usr/include/acl-lib/acl_cpp/db/db_mysql.hpp中暂将 ypedef struct st_mysql MYSQL; 这行注释掉。

zhengshuxin commented 10 months ago

已经将 db_mysql.hpp 中的 MYSQL 类型去掉了,应该不会有冲突了。