[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gnubg] Building on Windows - `getDataDir'
From: |
motiv4u |
Subject: |
[Bug-gnubg] Building on Windows - `getDataDir' |
Date: |
Tue, 11 Aug 2009 07:53:07 +0200 |
Building on Windows lately fails with:
Compiling util.c
util.c: In function `getDataDir':
util.c:74: error: `ret' undeclared (first use in this function)
util.c:74: error: (Each undeclared identifier is reported only once
util.c:74: error: for each function it appears in.)
mingw32-make: *** [../bin/obj/util.o] Error 1
** Build failed **
These are the lines:
#ifndef WIN32
datadir = g_strdup(DATADIR);
#else
char buf[FILENAME_MAX];
if (GetModuleFileName(NULL, buf, sizeof(buf)) != 0) {
char *p1 = strrchr(buf, '/'), *p2 = strrchr(buf, '\\');
int pos1 = (p1 != NULL) ? (int)(p1 - buf) : -1;
int pos2 = (p2 != NULL) ? (int)(p2 - buf) : -1;
int pos = MAX(pos1, pos2);
if (pos > 0)
buf[pos] = '\0';
ret = g_strdup(buf);
}
#endif
Any ideas?
N.
--
"He is no fool who gives up what he cannot keep to gain what he cannot
lose." -Jim Elliot
- [Bug-gnubg] Building on Windows - `getDataDir',
motiv4u <=
- Re: [Bug-gnubg] Building on Windows - `getDataDir', Michael Petch, 2009/08/11
- Re: [Bug-gnubg] Building on Windows - `getDataDir', Michael Petch, 2009/08/11
- Re: [Bug-gnubg] Building on Windows - `getDataDir', motiv4u, 2009/08/11
- Re: [Bug-gnubg] Building on Windows - `getDataDir', Michael Petch, 2009/08/11
- Re: [Bug-gnubg] Building on Windows - `getDataDir', Christian Anthon, 2009/08/11
- Re: [Bug-gnubg] Building on Windows - `getDataDir', motiv4u, 2009/08/11
- Re: [Bug-gnubg] Building on Windows - `getDataDir', Michael Petch, 2009/08/11
- Re: [Bug-gnubg] Building on Windows - `getDataDir', Christian Anthon, 2009/08/11
- Re: [Bug-gnubg] Building on Windows - `getDataDir', Michael Petch, 2009/08/11
- Re: [Bug-gnubg] Building on Windows - `getDataDir', motiv4u, 2009/08/11