pvpgn / pvpgn-server

Next generation of PvPGN server
https://pvpgn.pro
GNU General Public License v2.0
541 stars 155 forks source link

Building Error while src/bnetd/CMakeFiles/bnetd.dir/sql_mysql.cpp.o #472

Open gugo2808 opened 2 years ago

gugo2808 commented 2 years ago

Hello everyone. it is the second day, that i'm trying to install PVPGN pro. I have an Ubuntu 20.04.1

every time when i try to build the server i get this error

[ 72%] Building CXX object src/bnetd/CMakeFiles/bnetd.dir/sql_mysql.cpp.o /root/pvpgn-server/src/bnetd/sql_mysql.cpp: In function ‘int pvpgn::bnetd::sql_mysql_init(const char*, const char*, const char*, const char*, const char*, const char*)’: /root/pvpgn-server/src/bnetd/sql_mysql.cpp:175:4: error: ‘my_bool’ was not declared in this scope; did you mean ‘bool’? 175 | my_bool my_true = true; | ^~~~~~~ | bool /root/pvpgn-server/src/bnetd/sql_mysql.cpp:176:51: error: ‘my_true’ was not declared in this scope 176 | if (mysql_options(mysql, MYSQL_OPT_RECONNECT, &my_true)){ | ^~~~~~~ make[2]: *** [src/bnetd/CMakeFiles/bnetd.dir/build.make:752: src/bnetd/CMakeFiles/bnetd.dir/sql_mysql.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:955: src/bnetd/CMakeFiles/bnetd.dir/all] Error 2 make: *** [Makefile:141: all] Error 2

What am i doing wrong? How can i solve it? thank you!

kaki-jiu commented 2 years ago

编辑sql_mysql.cpp.o文件, 将my_bool my_true = xxx 中的 my_bool 改为 bool

gugo2808 commented 2 years ago

编辑sql_mysql.cpp.o文件, 将my_bool my_true = xxx 中的 my_bool 改为 bool

Excuse me, could you please rewrite your comment in English, I didn't understand very well after the Google translation)😃 Thank you!

kaki-jiu commented 2 years ago

open and edit the sql_mysql.cpp.o file ,change my_bool(line 175 and 193) to bool, as mentioned in the error(I don't know if I'm expressing what I mean clearly. if you solve the problem, please tell me. i'm trying to install PVPGN too, and the ./bnetd can run at my severce, but I can't see my buddy in the lobby. i don't know where is wrong)

gugo2808 commented 2 years ago

I successfully built file. Thank you!) Now I'm trying to understand how to connect this server to red alert 2.

kaki-jiu commented 2 years ago

I successfully built file. Thank you!) Now I'm trying to understand how to connect this server to red alert 2.

can you give me your contact info like twitter in my homepage(@qianmo366573994)? i still can't connect this sever to re2 because of my poverty of knowledge about the net. thank you.

RElesgoe commented 2 years ago

@gugo2808 Switch to the develop branch and compile from there.

gugo2808 commented 2 years ago

I successfully built file. Thank you!) Now I'm trying to understand how to connect this server to red alert 2.

can you give me your contact info like twitter in my homepage(@qianmo366573994)? i still can't connect this sever to re2 because of my poverty of knowledge about the net. thank you.

Hello, this is my telegram channel, if you want you can find me there, but I don't think, that I will able to help you to much. I haven't connected it yet to the game.

https://t.me/EnCryptech

gugo2808 commented 2 years ago

@gugo2808 Switch to the develop branch and compile from there.

Thank you. The database mysql is necessary? And after I successfully run it on my VPS, how to connect it to the game?)

Thank you!