|
Questions about tiny mud server
|
Reply to this subject
Start a new subject
 
Refresh page
| Posted by |
Dr_who
(5 posts) bio
|
| Date |
Fri 02 Jul 2010 04:29 PM (UTC) [ quote
] |
| 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
Moderator |
| Date |
Reply #1 on Fri 02 Jul 2010 05:18 PM (UTC) [ quote
] |
| 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) [ quote
] |
| 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) [ quote
] |
| 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.
1,412 views.
Reply to this subject
Start a new subject
 
Refresh page
top
Comments to:
Gammon Software support
Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )