Porting Awake 0.8.12B to Cygwin

Posted by Wraithian on Thu 20 Jan 2005 12:03 PM — 4 posts, 17,213 views.

USA #0
Would anyone care to try this?
I'm not too adept at programming... and I would love to be able to run this codebase through cygwin (I'm still timid about getting a full Linux installation).

For background notes, the Awake code is a Circle derivative. You can find it at:
http://www.awakenedworlds.net/AwakeMUD-0.8.12B.tar.bz2
USA #1
What kind of errors do you get when you compile it on Cygwin?
USA #2
After changing -Dlinux to -Dcygwin and "making", here's the error output:
Quote:
dblist.cpp: In member function `bool helpList::FindTopic(char*, char*)':
dblist.cpp:377: error: no matching function for call to `getline(char**,
size_t*, FILE*&)'
dblist.cpp:379: error: no matching function for call to `getline(char**,
size_t*, FILE*&)'
make: *** [dblist.o] Error 1


Here's the block of code with the offending errors:
bool helpList::FindTopic(char *help, char *arg)
{
  nodeStruct<struct help_index_data *> *temp;
  FILE *fl;
  for (temp = head; temp; temp = temp->next) {
    if (isname(arg, temp->data->keyword)) {
      fl = fopen(temp->data->filename, "r");
      if (fl) {
        char *tempc = NULL;
        size_t line;
        getline(&tempc, &line, fl);
        sprintf(buf, "^W%s^n\r\n", temp->data->keyword);
        while (getline(&tempc, &line, fl) != -1)
          sprintf(ENDOF(buf), "%s\r", tempc);
        strcpy(help, buf);
        fclose(fl);
        return TRUE;
      }
    }
  }
  return FALSE;
}


I have the full Cygwin installation plus the most recent updates, so...

Amended on Fri 21 Jan 2005 07:09 AM by Wraithian
USA #3
Do you know where getline is defined? And did you change that define because you were told to, or because you think you're supposed to? What happens if you compile with -Dlinux?