Operating System - HP-UX
1752805 Members
5592 Online
108789 Solutions
New Discussion юеВ

Re: unicode wchar problem on hp-ux pa risc

 
SOLVED
Go to solution
uiqbal
Advisor

unicode wchar problem on hp-ux pa risc

Hi,

uname -a
HP-UX B.11.11 U 9000/800

I have code which uses wchar methods, one of them being wcsstr which is available in wchar.h but when i compile the program, i get this error

Error 328: "../src/util/Misc.cpp", line 124 # Function 'wcsstr' has not been defined yet; cannot call.


What could be problem with this, i am compiling using -AA flag like this

aCC -DHAVE_CONFIG_H -I. -I. -I.. -AA -D_REENTRANT -g -c ../src/util/Misc.cpp -DPIC -o .libs/Misc.o

Best regards,
uiqbal
4 REPLIES 4
Steven E. Protter
Exalted Contributor

Re: unicode wchar problem on hp-ux pa risc

Shalom,

Warning: Possible meaningful unix error message.

Error 328: "../src/util/Misc.cpp", line 124 # Function 'wcsstr' has not been defined yet; cannot call.

Bad code. Function is called but not defined.

Looks like the code being compiled.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Dennis Handly
Acclaimed Contributor
Solution

Re: unicode wchar problem on hp-ux pa risc

What version of aC++ are you using?

Did you read wcschr(3) carefully? It says you must use: -D_INCLUDE__STDC_A1_SOURCE

>I am compiling using -AA flag
aCC -DHAVE_CONFIG_H -I. -I. -I.. -AA -D_REENTRANT -g -c Misc.cpp -DPIC

Newer versions set that -D if -AA is used.
Also I would suggest you put options like -AA -g -c before any -D/-I. And replace -D_REENTRANT by -mt if using libpthread.
uiqbal
Advisor

Re: unicode wchar problem on hp-ux pa risc

Thanks Dennis -- it works great with the -D_INCLUDE__STDC_A1_SOURCE option on hp parisc but i am having problem on intel itanium where uname -a
HP-UX B.11.23 U ia64 4119213449
and the compiler is aCC
HP C/aC++ Version A.06.15

The problem is that i am using the -D_INCLUDE__STDC_A1_SOURCE flag but have the following error:

source='../src/document/DateField.cpp' object='DateField.lo' libtool=yes \
DEPDIR=.deps depmode=none /bin/sh ../config/depcomp \
/bin/sh ../libtool --tag=CXX --mode=compile aCC -DHAVE_CONFIG_H -I. -I. -I.. +Z -AA -mt -D_INCLUDE__STDC_A1_SOURCE -D_REENTRANT -g -c -o DateField.lo `test -f '../src/document/DateField.cpp' || echo './'`../src/document/DateField.cpp
aCC -DHAVE_CONFIG_H -I. -I. -I.. +Z -AA -mt -D_INCLUDE__STDC_A1_SOURCE -D_REENTRANT -g -c ../src/document/DateField.cpp -DPIC -o .libs/DateField.o

"../src/document/DateField.cpp", line 57: error #2020: identifier
"wcstoll" is undefined
return _tcstoi64(time, &end, 36);
^
1 error detected in the compilation of "../src/document/DateField.cpp".


I have seen wcstoll man as well as ./configure reported yes for wcstoll?

Best regards,
uiqbal
Dennis Handly
Acclaimed Contributor

Re: unicode wchar problem on hp-ux pa risc

>I am using the -D_INCLUDE__STDC_A1_SOURCE flag

You don't need that with A.06.15.

>error #2020: identifier "wcstoll" is undefined

You are going to have to look at the #if in to figure this out.

If you compile with "-E -.i", you'll see what the compiler sees.