Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUDs
➜ General
➜ Questions about tiny mud server
Questions about tiny mud server
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Dr_who
(5 posts) Bio
|
Date
| Fri 02 Jul 2010 04:29 PM (UTC) |
Message
| I have a questions about compiling tinymud server version 2_2.
I have tried typing make at the command line, and I get a long list of compile errors. According to the readme file included with the software, you can also type:
gcc tinymudserver.cpp -o tinymudserver -g -Wall at the command line to try to get it to compile. However, this method also produces compile errors (at least for me). Perhapse I have something wrong with my build environment.
I have tried pulling files into netbeans one at a time to try to help me identify the problems and get it to compile. Most of the errors I've found appear to stem from the lack of putting std:: in front of string declarations.
So far, I have gotten nearly everything cleared up. However, I still have one error where netbeans states that it cannot resolve the identifier MAKE_STRING used in player.h.
No matter what I try, I cannot get the compiler to recognize MAKE_STRING from the following code:
// output to player (any type)
template<typename T>
tPlayer & operator<< (const T & i)
{
outbuf += MAKE_STRING (i);
return *this;
};
Can someone please offer some suggestions?
Thanks in advance. | Top |
|
Posted by
| David Haley
USA (3,881 posts) Bio
|
Date
| Reply #1 on Fri 02 Jul 2010 05:18 PM (UTC) |
Message
| What kind of error messages are you getting? |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | Top |
|
Posted by
| Dr_who
(5 posts) Bio
|
Date
| Reply #2 on Fri 02 Jul 2010 06:49 PM (UTC) |
Message
| After a little digging in the code, I found the definition of MAKE_STRING in the utils.h file. So, I included utils.h in the player.h file, and I thought all would be good.
When I went to compile the code, I got the following error however:
utils.h: In function ‘void LoadSet(std::ifstream&, T&)’:
In file included from player.h:19,
utils.h:37: error: no matching function for call to ‘getline(std::basic_ifstream<char, std::char_traits<char> >&, std::string&)’
The code snippet from utils.h is as follows:
// load a set of flags from a single line in the input stream "f"
template <class T>
void LoadSet (ifstream & f, T & s)
{
s.clear ();
string sLine;
getline (f, sLine); // get one line
istringstream is (sLine); // convert back to stream
string flag; // each flag name
while (!is.eof ()) // read that stream
{
is >> flag; // read flag
s.insert (flag); // and insert it
} // end of getting each item
} // end of LoadSet
I'm really new to c++, but so far as I know I'm using g++ version 4.4 if that helps.
Any help would be appreciated. Thanks. | Top |
|
Posted by
| Dr_who
(5 posts) Bio
|
Date
| Reply #3 on Fri 02 Jul 2010 08:11 PM (UTC) |
Message
| Well, this is an update...
After poking about a bit, I found this thread on tinymudserver
http://www.gammon.com.au/forum/?id=4496
I found out there is a version 2.3. I downloaded that, and made the includes to make the transform error go away.
Everything compiles now and I can connect via telnet.
I guess we can mark this as solved. | 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.
18,084 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top