• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[Compiling] Source 8.60 + Cast System !

arthurluna

Member
Joined
Apr 12, 2008
Messages
180
Reaction score
15
Recentimente cast system put on my source, compiling works perfectly on Windows, when I compile in Unbutu 11:04 is giving this error in the source code, I'm not very good at C + +, someone says what to do?

Inglês:
Code:
In file included from actions.cpp: 24:0:
player.h: In member function 'uint32_t Player :: getCastIpByName (std :: string)':
player.h: 206:11: error: converting to non-pointer type 'uint32_t {aka unsigned int}' from NULL [-Werror = conversion-null]
player.h: In member function 'void Player :: kickCastViewers ()':
player.h: 227:34: error: can not call constructor 'PlayerCast :: PlayerCast' directly [-fpermissive]
player.h: 227:34: error: for a function-style cast, remove the redundant ':: PlayerCast' [-fpermissive]
In file included from actions.cpp: 24:0:
player.h: In member function 'bool Player :: addCastBan (std :: string)':
player.h: 244:46: error: can not call constructor 'CastBan :: CastBan' directly [-fpermissive]
player.h: 244:46: error: for a function-style cast, remove the redundant ':: CastBan' [-fpermissive]
player.h: In member function 'bool Player :: addCastMute (std :: string)':
player.h: 265:47: error: can not call constructor 'CastBan :: CastBan' directly [-fpermissive]
player.h: 265:47: error: for a function-style cast, remove the redundant ':: CastBan' [-fpermissive]
**CXX chat.o
cc1plus: all warnings are treated as errors

make [1]: ** [actions.o] Error 1
make [1]: ** Waiting for other processes to finish.
In file included from house.h: 31:0,
*****************from beds.cpp: 20:
player.h: In member function 'uint32_t Player :: getCastIpByName (std :: string)':
player.h: 206:11: error: converting to non-pointer type 'uint32_t {aka unsigned int}' from NULL [-Werror = conversion-null]
player.h: In member function 'void Player :: kickCastViewers ()':
player.h: 227:34: error: can not call constructor 'PlayerCast :: PlayerCast' directly [-fpermissive]
player.h: 227:34: error: for a function-style cast, remove the redundant ':: PlayerCast' [-fpermissive]
In file included from house.h: 31:0,
*****************from beds.cpp: 20:
player.h: In member function 'bool Player :: addCastBan (std :: string)':
player.h: 244:46: error: can not call constructor 'CastBan :: CastBan' directly [-fpermissive]
player.h: 244:46: error: for a function-style cast, remove the redundant ':: CastBan' [-fpermissive]
player.h: In member function 'bool Player :: addCastMute (std :: string)':
player.h: 265:47: error: can not call constructor 'CastBan :: CastBan' directly [-fpermissive]
player.h: 265:47: error: for a function-style cast, remove the redundant ':: CastBan' [-fpermissive]
cc1plus: all warnings are treated as errors

make [1]: ** [beds.o] Error 1
In file included from party.h: 20:0,
*****************from chat.h: 24
*****************from chat.cpp: 18:
player.h: In member function 'uint32_t Player :: getCastIpByName (std :: string)':
player.h: 206:11: error: converting to non-pointer type 'uint32_t {aka unsigned int}' from NULL [-Werror = conversion-null]
player.h: In member function 'void Player :: kickCastViewers ()':
player.h: 227:34: error: can not call constructor 'PlayerCast :: PlayerCast' directly [-fpermissive]
player.h: 227:34: error: for a function-style cast, remove the redundant ':: PlayerCast' [-fpermissive]
In file included from party.h: 20:0,
*****************from chat.h: 24
*****************from chat.cpp: 18:
player.h: In member function 'bool Player :: addCastBan (std :: string)':
player.h: 244:46: error: can not call constructor 'CastBan :: CastBan' directly [-fpermissive]
player.h: 244:46: error: for a function-style cast, remove the redundant ':: CastBan' [-fpermissive]
player.h: In member function 'bool Player :: addCastMute (std :: string)':
player.h: 265:47: error: can not call constructor 'CastBan :: CastBan' directly [-fpermissive]
player.h: 265:47: error: for a function-style cast, remove the redundant ':: CastBan' [-fpermissive]
cc1plus: all warnings are treated as errors

make [1]: ** [chat.o] Error 1
make [1]: Leaving directory `/ home / arthur / Source '
make: ** [all] Error 2


BR:
Code:
In file included from actions.cpp:24:0:
player.h: Na função membro ‘uint32_t Player::getCastIpByName(std::string)’:
player.h:206:11: erro: converting to non-pointer type ‘uint32_t {aka unsigned int}’ from NULL [-Werror=conversion-null]
player.h: Na função membro ‘void Player::kickCastViewers()’:
player.h:227:34: erro: cannot call constructor ‘PlayerCast::PlayerCast’ directly [-fpermissive]
player.h:227:34: erro:   for a function-style cast, remove the redundant ‘::PlayerCast’ [-fpermissive]
In file included from actions.cpp:24:0:
player.h: Na função membro ‘bool Player::addCastBan(std::string)’:
player.h:244:46: erro: cannot call constructor ‘CastBan::CastBan’ directly [-fpermissive]
player.h:244:46: erro:   for a function-style cast, remove the redundant ‘::CastBan’ [-fpermissive]
player.h: Na função membro ‘bool Player::addCastMute(std::string)’:
player.h:265:47: erro: cannot call constructor ‘CastBan::CastBan’ directly [-fpermissive]
player.h:265:47: erro:   for a function-style cast, remove the redundant ‘::CastBan’ [-fpermissive]
  CXX    chat.o
cc1plus: todos os avisos devem ser tratados como erros

make[1]: ** [actions.o] Erro 1
make[1]: ** Esperando que outros processos terminem.
In file included from house.h:31:0,
                 from beds.cpp:20:
player.h: Na função membro ‘uint32_t Player::getCastIpByName(std::string)’:
player.h:206:11: erro: converting to non-pointer type ‘uint32_t {aka unsigned int}’ from NULL [-Werror=conversion-null]
player.h: Na função membro ‘void Player::kickCastViewers()’:
player.h:227:34: erro: cannot call constructor ‘PlayerCast::PlayerCast’ directly [-fpermissive]
player.h:227:34: erro:   for a function-style cast, remove the redundant ‘::PlayerCast’ [-fpermissive]
In file included from house.h:31:0,
                 from beds.cpp:20:
player.h: Na função membro ‘bool Player::addCastBan(std::string)’:
player.h:244:46: erro: cannot call constructor ‘CastBan::CastBan’ directly [-fpermissive]
player.h:244:46: erro:   for a function-style cast, remove the redundant ‘::CastBan’ [-fpermissive]
player.h: Na função membro ‘bool Player::addCastMute(std::string)’:
player.h:265:47: erro: cannot call constructor ‘CastBan::CastBan’ directly [-fpermissive]
player.h:265:47: erro:   for a function-style cast, remove the redundant ‘::CastBan’ [-fpermissive]
cc1plus: todos os avisos devem ser tratados como erros

make[1]: ** [beds.o] Erro 1
In file included from party.h:20:0,
                 from chat.h:24,
                 from chat.cpp:18:
player.h: Na função membro ‘uint32_t Player::getCastIpByName(std::string)’:
player.h:206:11: erro: converting to non-pointer type ‘uint32_t {aka unsigned int}’ from NULL [-Werror=conversion-null]
player.h: Na função membro ‘void Player::kickCastViewers()’:
player.h:227:34: erro: cannot call constructor ‘PlayerCast::PlayerCast’ directly [-fpermissive]
player.h:227:34: erro:   for a function-style cast, remove the redundant ‘::PlayerCast’ [-fpermissive]
In file included from party.h:20:0,
                 from chat.h:24,
                 from chat.cpp:18:
player.h: Na função membro ‘bool Player::addCastBan(std::string)’:
player.h:244:46: erro: cannot call constructor ‘CastBan::CastBan’ directly [-fpermissive]
player.h:244:46: erro:   for a function-style cast, remove the redundant ‘::CastBan’ [-fpermissive]
player.h: Na função membro ‘bool Player::addCastMute(std::string)’:
player.h:265:47: erro: cannot call constructor ‘CastBan::CastBan’ directly [-fpermissive]
player.h:265:47: erro:   for a function-style cast, remove the redundant ‘::CastBan’ [-fpermissive]
cc1plus: todos os avisos devem ser tratados como erros

make[1]: ** [chat.o] Erro 1
make[1]: Saindo do diretório `/home/arthur/Source'
make: ** [all] Erro 2
 
Used Linux 11.04
apt-get install autoconf libxml2-dev liblua5.1-0-dev g++ libgmp3-dev libcrypto++-dev libboost-filesystem1.40-dev libboost-system1.40-dev libboost-regex1.40-dev libboost-thread1.40-dev libmysqlclient15-dev make

Windows 7 Ultimete
is used and works 100%
-O1
-lboost_system
-lgmp
-llua5.1
-lmysql
-lboost_regex
-lsqlite3
-lwsock32
-lxml2
-lmysql
-lws2_32
-s
-lboost_filesystem
-lboost_thread
-lz
-lcryptopp
-leay32
 
You are using 1.40 libbosts, thats why you've got errors.
Try to install those:

Code:
sudo apt-get install subversion autoconf build-essential pkg-config libboost-dev libgmp3-dev libxml2-dev liblua5.1-0-dev libmysqlclient-dev libcrypto++-dev ccache libboost-filesystem-dev libboost-regex-dev libboost-system-dev libboost-thread-dev screen libssl-dev libluajit-5.1-dev
 
Solve the problem using libboost 1:46 ;)
Thank you for using


Source.list Unbutu 11.04 Workshops 100%
#############################################################
################### OFFICIAL UBUNTU REPOS ###################
#############################################################

###### Ubuntu Main Repos
deb Index of /ubuntu oneiric main restricted universe multiverse
deb-src Index of /ubuntu oneiric main restricted universe multiverse

###### Ubuntu Update Repos
deb Index of /ubuntu oneiric-security main restricted universe multiverse
deb Index of /ubuntu oneiric-updates main restricted universe multiverse
deb Index of /ubuntu oneiric-proposed main restricted universe multiverse
deb Index of /ubuntu oneiric-backports main restricted universe multiverse
deb-src Index of /ubuntu oneiric-security main restricted universe multiverse
deb-src Index of /ubuntu oneiric-updates main restricted universe multiverse
deb-src Index of /ubuntu oneiric-proposed main restricted universe multiverse
deb-src Index of /ubuntu oneiric-backports main restricted universe multiverse
 
With all other libs and libboost autalizadas still found errors:

Code:
make all-am
make [1]: Entering directory `/ home / arthur / source '
  CXX actions.o
  CXX allocator.o
  CXX baseevents.o
In file included from actions.cpp: 24:0:
player.h: In member function 'uint32_t Player :: getCastIpByName (std :: string)':
player.h: 206:11: error: converting to non-pointer type 'uint32_t {aka unsigned int}' from NULL [-Werror = conversion-null]
player.h: In member function 'void Player :: kickCastViewers ()':
player.h: 227:34: error: can not call constructor 'PlayerCast :: PlayerCast' directly [-fpermissive]
player.h: 227:34: error: for a function-style cast, remove the redundant ':: PlayerCast' [-fpermissive]
In file included from actions.cpp: 24:0:
player.h: In member function 'bool Player :: addCastBan (std :: string)':
player.h: 244:46: error: can not call constructor 'CastBan :: CastBan' directly [-fpermissive]
player.h: 244:46: error: for a function-style cast, remove the redundant ':: CastBan' [-fpermissive]
player.h: In member function 'bool Player :: addCastMute (std :: string)':
player.h: 265:47: error: can not call constructor 'CastBan :: CastBan' directly [-fpermissive]
player.h: 265:47: error: for a function-style cast, remove the redundant ':: CastBan' [-fpermissive]
  CXX beds.o
  CXX chat.o
cc1plus: all warnings are treated as errors

make [1]: ** [actions.o] Error 1
make [1]: ** Waiting for other processes to finish.
In file included from house.h: 31:0,
                 from beds.cpp: 20:
player.h: In member function 'uint32_t Player :: getCastIpByName (std :: string)':
player.h: 206:11: error: converting to non-pointer type 'uint32_t {aka unsigned int}' from NULL [-Werror = conversion-null]
player.h: In member function 'void Player :: kickCastViewers ()':
player.h: 227:34: error: can not call constructor 'PlayerCast :: PlayerCast' directly [-fpermissive]
player.h: 227:34: error: for a function-style cast, remove the redundant ':: PlayerCast' [-fpermissive]
In file included from house.h: 31:0,
                 from beds.cpp: 20:
player.h: In member function 'bool Player :: addCastBan (std :: string)':
player.h: 244:46: error: can not call constructor 'CastBan :: CastBan' directly [-fpermissive]
player.h: 244:46: error: for a function-style cast, remove the redundant ':: CastBan' [-fpermissive]
player.h: In member function 'bool Player :: addCastMute (std :: string)':
player.h: 265:47: error: can not call constructor 'CastBan :: CastBan' directly [-fpermissive]
player.h: 265:47: error: for a function-style cast, remove the redundant ':: CastBan' [-fpermissive]
In file included from party.h: 20:0,
                 from chat.h: 24
                 from chat.cpp: 18:
player.h: In member function 'uint32_t Player :: getCastIpByName (std :: string)':
player.h: 206:11: error: converting to non-pointer type 'uint32_t {aka unsigned int}' from NULL [-Werror = conversion-null]
player.h: In member function 'void Player :: kickCastViewers ()':
player.h: 227:34: error: can not call constructor 'PlayerCast :: PlayerCast' directly [-fpermissive]
player.h: 227:34: error: for a function-style cast, remove the redundant ':: PlayerCast' [-fpermissive]
In file included from party.h: 20:0,
                 from chat.h: 24
                 from chat.cpp: 18:
player.h: In member function 'bool Player :: addCastBan (std :: string)':
player.h: 244:46: error: can not call constructor 'CastBan :: CastBan' directly [-fpermissive]
player.h: 244:46: error: for a function-style cast, remove the redundant ':: CastBan' [-fpermissive]
player.h: In member function 'bool Player :: addCastMute (std :: string)':
player.h: 265:47: error: can not call constructor 'CastBan :: CastBan' directly [-fpermissive]
player.h: 265:47: error: for a function-style cast, remove the redundant ':: CastBan' [-fpermissive]
cc1plus: all warnings are treated as errors

make [1]: ** [beds.o] Error 1
cc1plus: all warnings are treated as errors

make [1]: ** [chat.o] Error 1
make [1]: Leaving directory `/ home / arthur / source '
make: ** [all] Error 2
arthur @ root: ~ / source $
 
wow that is probably one of distinct error messages and you cannot just do what it says lol?
 
remove -werror from Makefile, than in player.h find every PlayerCast::PlayerCast and remove PlayerCast:: from start, also do the same with the CastBan::CastBan change to CastBan
 
remove -werror from Makefile, than in player.h find every PlayerCast::playerCast and remove PlayerCast:: from start, also do the same with the CastBan::CastBan change to CastBan

Oh, this really helps, thanks.
But now this errors appears:

player.h:185:31: aviso: type qualifiers ignored on function return type [-Wignored-qualifiers]
player.h:186:43: aviso: type qualifiers ignored on function return type [-Wignored-qualifiers]
player.h:188:49: aviso: type qualifiers ignored on function return type [-Wignored-qualifiers]
player.h:196:44: aviso: type qualifiers ignored on function return type [-Wignored-qualifiers]
player.h:205:42: aviso: type qualifiers ignored on function return type [-Wignored-qualifiers]
player.h:226:30: aviso: type qualifiers ignored on function return type [-Wignored-qualifiers]
player.h:238:48: aviso: type qualifiers ignored on function return type [-Wignored-qualifiers]
player.h: Na função membro ‘uint32_t Player::getCastIpByName(std::string)’:
player.h:214:11: aviso: converting to non-pointer type ‘uint32_t {aka unsigned int}’ from NULL [-Wconversion-null]
mv -f .deps/manager.Tpo .deps/manager.Po

A lot of errors like that, just change the file name.
Any help?
 
Back
Top