re_exec

Posted by Cyldor on Thu 30 May 2002 08:51 PM — 9 posts, 30,132 views.

USA #0
Ok, I compiled after fixing the crypt and rename errors, but this seems to haunt me now and halts the compile.


act_comm.c:36: parse error before '_RE_ARGS_'
act_comm.o: In function 'is _profane':
act_comm.c:3347: undefined reference to 're_exec'


Not exactly sure how to fix this. the fourm mentions nothing of a solution to it. I uncommented what it said to in Makefile


#Uncomment the line below if you are getting undefined re_exec errors
NEED_REG = -lgnuregex


But the error still comes up. Any ideas from anybody? Also...


#ifdef REGEX
	#include <regex.h>
#endif

#ifdef FREEBSD
	#include <unistd.h>
	#include <regex.h>
#endif
#include "mud.h"


#ifdef REGEX
	extern int re_exec _RE_ARGS ((const char *));
#endif


I think the top ha;f and bottom half, not the miiddle may have something to do with this.
Amended on Thu 30 May 2002 09:50 PM by Cyldor
Australia Forum Administrator #1
It's very simple. re_exec is only used in one place, which seems to be a profanity checker. Who cares if that is there or not? This is what I did to get rid of those errors:


int is_profane (char *what)
{
#if 0
  int ret;

  ret = re_exec(what);
  if (ret==1)
     return(1);
#endif
  return(0);
}


This is in file act_comm.c.
USA #2
Hmm, didn't really work. Returned some new errors, same nature


act_comm.c:36: parse error before 'RE_ARGS_'
act_comm.c: In function 'is_profane'
act_comm.c:3347: warning: implict declaration of 're_exec'
act_comm.c: At top level:
act_comm.c:3354: redefinition of 'is_profane'
act_comm.c:3343: 'is_profane' previously defined here


Takes too long to type all that out..anyways

I uncommented what it said to for implict decaration in the make file


#Uncomment the line below if you are getting implicit decleration of re_exec
#REG = -DREGEX


Commented or non-commented it shows the same error. I put what you said to at the end of act_comm.c
Australia Forum Administrator #3
Huh? You were supposed to modify the existing is_profane to add the 2 lines in bold, not add a whole new one.
USA #4
Ah, stupid me. I see what you ment. I did that, yet i get basically the same errors


act_comm.c:3344: warning: '#ifdef' argument starts with a digit
act_comm.c:36: parse error before '_RE_ARGS_'
act_comm.c: In function 'is_profane'
act_comm.c:3347: warning: implict declaration of 're_exec'


Maybe the code just doesn't like me? At the very end of the act_comm.c file, I changed what you said to.
Amended on Fri 31 May 2002 11:24 AM by Cyldor
USA #5
Never mind. I will never code at 7 am again. forgot to change #ifndef 0 to #if 0


I have another error, but I think i might can fix it myself..how do you write the error messages from cygwin to a .txt file? And just to let you know, it is calling up a non-existant funct 'mcount'.
Amended on Fri 31 May 2002 04:59 PM by Cyldor
USA #6
Blah, im clueless..its calling for the function mcount, yet mcount is not even in the src. Its trying to call it out of comm.c and act_info.c

If I could get the command to write all the errors to a file, I will piost the full errors here.
Australia Forum Administrator #7
Just use the "capture text" feature of command windows (see the system menu). You can "start edit", click and drag over the message, then press <enter>. The message is then on the clipboard.
#8
ok, if this hasnt already been answered, maybe the compile is halting as you said in the first post because of the Parse Error!?


act_comm.c:36: parse error before '_RE_ARGS_'

....
whatever...