[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUDs
. -> [Folder]  General
. . -> [Subject]  Odd Compiling Errors
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Odd Compiling Errors

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by IAmSlime   USA  (26 posts)  [Biography] bio
Date Tue 21 Mar 2006 01:23 AM (UTC)
Message
Hello, this is sort of a continuation of my Help With ScratchMUD topic, that seems to have gone defunct. I am currently using a linux box running OpenSuSe 10.0, and with it I have been able to surpass my little progress with Windows. This is the Compile Log;

asmodean@linux:~/Desktop/ScratchMUD> make
g++ -c -Wall -O -ggdb src/avatar.cpp -o obj/avatar.o
g++ -c -Wall -O -ggdb src/colorTable.cpp -o obj/colorTable.o
g++ -c -Wall -O -ggdb src/commands.cpp -o obj/commands.o
g++ -c -Wall -O -ggdb src/commandTable.cpp -o obj/commandTable.o
g++ -c -Wall -O -ggdb src/editHandlers.cpp -o obj/editHandlers.o
g++ -c -Wall -O -ggdb src/loginHandlers.cpp -o obj/loginHandlers.o
g++ -c -Wall -O -ggdb src/main.cpp -o obj/main.o
g++ -c -Wall -O -ggdb src/smysql.cpp -o obj/smysql.o
g++ -c -Wall -O -ggdb src/socket.cpp -o obj/socket.o
g++ -c -Wall -O -ggdb src/split.cpp -o obj/split.o
src/split.cpp: In function âstd::string quotesSplit(const std::string&, std::string&)â:
src/split.cpp:93: warning: control reaches end of non-void function
g++ -c -Wall -O -ggdb src/stringutil.cpp -o obj/stringutil.o
g++ -c -Wall -O -ggdb src/timer.cpp -o obj/timer.o
g++ -c -Wall -O -ggdb src/timestamp.cpp -o obj/timestamp.o
g++ -c -Wall -O -ggdb src/world.cpp -o obj/world.o
rm -f scratch
g++ -o scratch obj/avatar.o obj/colorTable.o obj/commands.o obj/commandTable.o obj/editHandlers.o obj/loginHandlers.o obj/main.o obj/smysql.o obj/socket.o obj/split.o obj/stringutil.o obj/timer.o obj/timestamp.o obj/world.o -lmysqlclient -lcrypt
/usr/lib/gcc/i586-suse-linux/4.0.2/../../../../i586-suse-linux/bin/ld: cannot find -lmysqlclient
collect2: ld returned 1 exit status
make: *** [all] Error 1
asmodean@linux:~/Desktop/ScratchMUD>

"Life Sucks, Then You Die."
[Go to top] top

Posted by IAmSlime   USA  (26 posts)  [Biography] bio
Date Reply #1 on Tue 21 Mar 2006 01:25 AM (UTC)
Message
The above tells me that the error is on line 93 of Split.CPP, which is;

///////////////////////////////////////////////////////////
///////////////// Have an itch? Scratch it! ///////////////
///////////////////////// SCRATCH /////////////////////////
///////////////////// A MUD Server ////////////////////
///////////////////// By: Jared Devall ////////////////////
///////////////////// Thanks: ////////////////////
///////////////////// DIKU/Merc/ROM ////////////////////
///////////////////// Aetas/Deus Gang ////////////////////
///////////////////// Beej ////////////////////
///////////////////////////////////////////////////////////

#include "split.h"
#include <string>

using namespace std;

//////////////
// Get Word //
//////////////
string::const_iterator getword ( const string &src, string &dest, const char delim ) {
return getword( src.begin(), src.end(), dest, delim );
}

string::const_iterator getword ( string::const_iterator it, string::const_iterator end, string &dest, const char delim ) {
for ( ; it != end; ++it ) {
if ( *it == delim ) {
++it;
break;
}
dest += *it;
}
return it;
}

/////////////////
// Split Delim //
/////////////////
vector< string > split( const string &src, char delim ) {
vector<string> dest;
string current;

for ( string::const_iterator c = src.begin(); c != src.end(); ++c ) {
if ( (*c) == delim ) {
if ( (*c) == delim ) {
dest.push_back( current );
current = "";
continue;
} else {
current.push_back( (*c) );
}
}

if ( !current.empty() )
dest.push_back( current );

return dest;
}

string::const_iterator split( const string &src, string &word1, char delim ) {
return getword( src, word1, delim );
}
string::const_iterator split( const string &src, string &word1, string &word2, char delim ) {
return getword( getword( src, word1, delim ), src.end(), word2, delim );
}
string::const_iterator split( const string &src, string &word1, string &word2, string &word3, char delim ) {
return getword( getword( getword(src, word1, delim ), src.end(), word2, delim ), src.end(), word3, delim );
}
string::const_iterator split( const string &src, string &word1, string &word2, string &word3, string &word4, char delim ) {
return getword( getword( getword( getword( src, word1, delim ), src.end(), word2, delim ), src.end(), word3, delim ), src.end(), word4, delim );
}

///////////
// Split //
///////////
string::const_iterator split( const string &src, string &word1 ) {
return getword( src, word1, '\0' );
}
string::const_iterator split( const string &src, string &word1, string &word2 ) {
return getword( getword( src, word1 ), src.end(), word2, '\0' );
}
string::const_iterator split( const string &src, string &word1, string &word2, string &word3 ) {
return getword( getword( getword( src, word1 ), src.end(), word2 ), src.end(), word3, '\0' );
}
string::const_iterator split ( const string &src, string &word1, string &word2, string &word3, string &word4 ) {
}
string::const_iterator split ( const string &src, string &word1, string &word2, string &word3, string &word4 ) {
return getword( getword( getword( getword( src, word1 ), src.end(), word2 ), src.end(), word3 ), src.end(), word4, '\0' );
}


string quotesSplit( const string &src, string &dest ) {
string::const_iterator it;

for ( it = src.begin(); it != src.end(); ++it ) {
}
} // Line 93

"Life Sucks, Then You Die."
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio
Date Reply #2 on Tue 21 Mar 2006 01:36 AM (UTC)
Message
Please, please use code tags when posting code. It makes it easier to read which in turn makes people who read it to help you happier. :-)

First: line 93 isn't an error, it's a warning. It says that control reaches the end of a non-void function. That means that the function is supposed to return something (a string in this case), but you didn't return anything.

Second: your error is:
/usr/lib/gcc/i586-suse-linux/4.0.2/../../../../i586-suse-linux/bin/ld: cannot find -lmysqlclient

This is saying that the linker is not finding the mysqlclient library. Have you installed it? Were there any instructions for the MUD that describe how to get things ready?

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


2,774 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]