ivakyb / minini

Automatically exported from code.google.com/p/minini
Other
0 stars 0 forks source link

Error on linux build: undefined reference to `strnicmp' #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I'm tried to build test.c on Linux using Scons build system (configuration
file in attachment), and got these errors:
minIni.o: In function `getkeystring':
minIni.c:(.text+0x26b): undefined reference to `strnicmp'
minIni.c:(.text+0x362): undefined reference to `strnicmp'
minIni.o: In function `ini_puts':
minIni.c:(.text+0x96b): undefined reference to `strnicmp'
minIni.c:(.text+0xb29): undefined reference to `strnicmp'

To fix this issue I'm put strnicmp into "ifdef" section:
#ifdef __WIN32
  #define _tcsnicmp strnicmp
#else
  #define _tcsnicmp strncasecmp
#endif

diff of a fix:
diff -rN minIni_02/minIni.c minIni_02_path/minIni.c
50a51
> #ifdef __WIN32
51a53,55
> #else
>   #define _tcsnicmp strncasecmp
> #endif

Original issue reported on code.google.com by daraku.a...@gmail.com on 18 May 2008 at 9:59

GoogleCodeExporter commented 9 years ago
Thank you for the report. Release 0.3 should contain a correction for this bug.

Original comment by thiadmer...@gmail.com on 19 May 2008 at 1:21