Ethereal-dev: [Ethereal-dev] Re: [Ethereal-users] Compiling prefs.c

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <guy@xxxxxxxxxx>
Date: Mon, 25 Jun 2001 11:35:51 -0700 (PDT)
> I am using a Borland C++ Builder 4 compiler in Windows 2000.
> 
> I'm getting an error that states that DATAFILE_DIR is an undefined symbol 
> pointing to line 624 in prefs.c.
> 	 if ((pf = fopen(GPF_PATH, "r")) != NULL) {
> 
> GPF_PATH uses DATAFILE_DIR much earlier in line 71
> 	#define GPF_PATH	DATAFILE_DIR "/ethereal.conf".
> 
> Does anybody know what could be the error?

DATAFILE_DIR is expected to be defined in "config.h".

"config.h.win32" is probably a good starting point for the "config.h" to
be used with Borland C++ Builder, although, as it was written for
MSVC++, it may require changes (I have no idea what changes it might
require, as I have no familiarity whatsoever with Borland C++ Builder).

The "Makefile.nmake" for use with MSVC++ makes "config.h" depend on
"config.h.win32", so "nmake" will filter "config.h.win32" through "sed"
(building with MSVC++ requires that you have a number of UNIX tools
installed, e.g. from Cygwin) if "config.h" doesn't exist or has a
modification time before that of "config.h.win32".  If Borland C++
Builder has a "make"-like program and the equivalent of Makefiles, you
might want to do something similar in the Makefile-equivalent you're
constructing.

(I'm CCing the reply to "ethereal-dev" - these are more
"ethereal-dev"-type questions than "ethereal-users"-type questions.)