View unanswered posts | View active topics It is currently Wed Jul 23, 2014 3:31 am



Reply to topic  [ 5 posts ] 
Compiling Error 'strncasecmp' not declared. 
Author Message
Post Compiling Error 'strncasecmp' not declared.
Hardware
Intel Pentium 4 with HT @ 2,8Ghz
1,5 GB of RAM @ 400Mhz
ATI Radeon 5500 with 256MB VRAM
Soundblaster Live 1,5 audio card

OS
Linux 2.6.32-24-generic
#42-Ubuntu
SMP Fri Aug 20 14:24:04 UTC 2010
i686 GNU/Linux
Distributor ID: Ubuntu
Description: Ubuntu 10.04.1 LTS
Release: 10.04
Codename: lucid

I tried to compile following the instructions (for my distribution) at: viewtopic.php?f=18&t=7371

BTW, the list of dependencies in that thread is not complete as Qt4 libraries are also needed, installing libqt4-dev packages solves this.

After configuring, when trying to compile the following error is printed:

Code:
g++  -pipe -I. -I/usr/local/include -I/usr/include -D__UNIXSDL__ -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT   -D__LIBAO__ -D__OPENGL__ -DNO_DEBUGGER -DNDEBUG -march=native -O2 -fomit-frame-pointer -s -DQT_SHARED -I/usr/include/qt4 -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui   -fno-rtti -o tools/strutil.o -c tools/strutil.cpp
In file included from tools/strutil.cpp:22:
tools/strutil.h: In static member function ‘static int ci_char_traits::compare(const char*, const char*, size_t)’:
tools/strutil.h:34: error: ‘strncasecmp’ was not declared in this scope
make: *** [tools/strutil.o] Error 1


Is there a way to fix this?

Thanks in advance for your replies.


Mon Sep 06, 2010 3:08 am
Lurker
User avatar

Joined: Fri May 11, 2007 4:28 am
Posts: 139
Post Re: Compiling Error 'strncasecmp' not declared.
the instructions in your link from 2004 wrote:

link at the top of this very page wrote:
Heavy work is being done on the sound core at the moment. Please do not report any bugs from SVN until we say it is safe to do so.


But.... since that first page doesn't say "don't use SVN" like every other thread around here does, I'll cut you a break and give you this link:
viewtopic.php?f=2&t=11513
That's the source you want to compile from.


Mon Sep 06, 2010 5:20 am
Profile
"Your thread will be crushed."
User avatar

Joined: Wed Jul 28, 2004 12:49 am
Posts: 1207
Location: Not in Winnipeg
Post Re: Compiling Error 'strncasecmp' not declared.
Public SVN is no longer updated.

I suggest using the precompiled binaries in this thread:

viewtopic.php?f=2&t=11513&start=0


Which are optimized for Linux use.

_________________
<pagefault> i'd break up with my wife if she said FF8 was awesome


Mon Sep 06, 2010 9:44 am
Profile WWW
Post Re: Compiling Error 'strncasecmp' not declared.
Not sure if you've solved this or not.

The error is this:

Code:
In file included from tools/strutil.cpp:22:
tools/strutil.h: In static member function ‘static int ci_char_traits::compare(const char*, const char*, size_t)’:
tools/strutil.h:34: error: ‘strncasecmp’ was not declared in this scope
make: *** [tools/strutil.o] Error 1


You'll go into tools/strutil.h, and add the proper header that defines strncasecmp (hint: strings.h). Re-configure and make, and then you should see another error. Follow the same procedure and then it should compile fine.


Wed Sep 22, 2010 2:16 am
Post Re: Compiling Error 'strncasecmp' not declared.
You must to add to each file in tools subfolder the next line at beginning (you'll understand it if you know C)

Code:
#include <string.h>


After this, if you have GCC 4.4, the make will run correctly.
If you haven't got the GCC, I suppose it will run correctly too.

PS: Add the line but don't remove the line "#include <string>" (or similar; without quotes).


Sat Oct 09, 2010 4:45 pm
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: Bing [Bot], jbyyqj15qh and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software.