www.digitalmars.com         C & C++   DMDScript  

c++.windows.32-bits - Error 42: Symbol Undefined __pctype

reply tatc _NO_SPAM_cybernetics.com.au writes:
Hi,
I have just downloaded DM v8.29n as I heard it is the successor to Symantec C++.
I have some old code and makefiles that were compiled using Symantec C++ v7.2
and I thought I would give DM a go.

My setup is NT 4.0 SP6a and the Cygwin Bash shell (only for command line
compilation).

I compiled the source using Symantec V7.2 (with SC v7.2B2n, LINK v7.21B3 and
SMAKE v7.21).

Compiling the code using the original Makefile and Symantec v7.2 was fine. I
then modified the Makefile to use the DM, and I get the following problem during
compilation:

(I still use the original Smake that came with Symantec v7.2, but use the new DM
versions of SC and Link)


SMAKE  Program Maintenance Utility (Console) Version 7.21
Copyright (c) 1994-1995 Innovative Data Concepts Incorporated
Copyright (c) 1994-1995 Symantec Corporation
All Rights Reserved

d:\dm\bin\sc -r -Ju -mn -3 -a8 -C -S -g -gd  -D_CONSOLE -D_MT -D_WINDOWS
-DHAVE_USLEEP -DSQUID_CFG_DIR=\"./config\" -DSQUID_WGT_DIR=\"./wgtfiles\"  -DSQ
UID_LOG_DIR=\"./logs\" -DSAVESAMP_DIR=\"./savesamp\" -DUSE_GUI    -DHAVE_CAPI=1
-Ig:\capi20\include   -c -opsquid\main.obj main.c
perl ./scripts/xsrcs.pl -obj -prefix psquid sqexe.mak | perl ./scripts/m
kresp.pl        -symantec -link psquid\psquid.exe >psquid.lnk
echo pstnslib.lib sqlib.lib g:\capi20\lib\capi2032sym.lib  snn.lib winmm.lib
kernel32.lib gdi32.lib user32.lib >>psquid.lnk
echo psquid.def >>psquid.lnk
LINK /CODEVIEW /NOI /DE /XN /NT /ENTRY:mainCRTStartup  /BAS:4194304 /A:5
12   psquid.lnk
OPTLINK (R) for Win32  Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

sqlib.lib(misc)
Error 42: Symbol Undefined __pctype
sqlib.lib(misc)
Error 42: Symbol Undefined __isctype
sqlib.lib(misc)
Error 42: Symbol Undefined ___locale_mbsize
SMAKE fatal error: command "LINK" returned with error code 3
Stopping.
SMAKE fatal error: command "smake" returned with error code 2
Stopping.

I did a grep on the contents of d:/dm/lib, and grep reported that the 3
undefined symbols are matched in snn.lib. In the makefile, I tried including
snn.lib via the -l option and via a Makefile libs variable, to no success. The
dir d:/dm/lib is set in my LIBS environment variable.

Any help would be appreciated.

Thanks,

Tat
Sep 02 2002
next sibling parent reply Jan Knepper <jan smartsoft.cc> writes:
Weird...
I think though this would indicate that for some reason the linker is still
picking
up the wrong snn.lib file.
You could try to add the .lib with a complete path, i.e. d:\dm\lib\snn.lib

Jan



tatc _NO_SPAM_cybernetics.com.au wrote:

 Hi,
 I have just downloaded DM v8.29n as I heard it is the successor to Symantec
C++.
 I have some old code and makefiles that were compiled using Symantec C++ v7.2
 and I thought I would give DM a go.

 My setup is NT 4.0 SP6a and the Cygwin Bash shell (only for command line
 compilation).

 I compiled the source using Symantec V7.2 (with SC v7.2B2n, LINK v7.21B3 and
 SMAKE v7.21).

 Compiling the code using the original Makefile and Symantec v7.2 was fine. I
 then modified the Makefile to use the DM, and I get the following problem
during
 compilation:

 (I still use the original Smake that came with Symantec v7.2, but use the new
DM
 versions of SC and Link)

 SMAKE  Program Maintenance Utility (Console) Version 7.21
 Copyright (c) 1994-1995 Innovative Data Concepts Incorporated
 Copyright (c) 1994-1995 Symantec Corporation
 All Rights Reserved

 d:\dm\bin\sc -r -Ju -mn -3 -a8 -C -S -g -gd  -D_CONSOLE -D_MT -D_WINDOWS
 -DHAVE_USLEEP -DSQUID_CFG_DIR=\"./config\" -DSQUID_WGT_DIR=\"./wgtfiles\"  -DSQ
 UID_LOG_DIR=\"./logs\" -DSAVESAMP_DIR=\"./savesamp\" -DUSE_GUI    -DHAVE_CAPI=1
 -Ig:\capi20\include   -c -opsquid\main.obj main.c
 perl ./scripts/xsrcs.pl -obj -prefix psquid sqexe.mak | perl ./scripts/m
 kresp.pl        -symantec -link psquid\psquid.exe >psquid.lnk
 echo pstnslib.lib sqlib.lib g:\capi20\lib\capi2032sym.lib  snn.lib winmm.lib
 kernel32.lib gdi32.lib user32.lib >>psquid.lnk
 echo psquid.def >>psquid.lnk
 LINK /CODEVIEW /NOI /DE /XN /NT /ENTRY:mainCRTStartup  /BAS:4194304 /A:5
 12   psquid.lnk
 OPTLINK (R) for Win32  Release 7.50B1
 Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

 sqlib.lib(misc)
 Error 42: Symbol Undefined __pctype
 sqlib.lib(misc)
 Error 42: Symbol Undefined __isctype
 sqlib.lib(misc)
 Error 42: Symbol Undefined ___locale_mbsize
 SMAKE fatal error: command "LINK" returned with error code 3
 Stopping.
 SMAKE fatal error: command "smake" returned with error code 2
 Stopping.

 I did a grep on the contents of d:/dm/lib, and grep reported that the 3
 undefined symbols are matched in snn.lib. In the makefile, I tried including
 snn.lib via the -l option and via a Makefile libs variable, to no success. The
 dir d:/dm/lib is set in my LIBS environment variable.

 Any help would be appreciated.

 Thanks,

 Tat
Sep 02 2002
parent Tat Chan <Tat_member pathlink.com> writes:
Hi Jan and Walter,

Thanks for the help. I finally got it to compile. In my Makefile, I had the line

SYSLIBS	= snn.lib winmm.lib kernel32.lib gdi32.lib user32.lib

but I had to add the full path to the snn.lib file

SYSLIBS	= d:\dm\lib\snn.lib winmm.lib kernel32.lib gdi32.lib user32.lib

for the linker to succeed. I suppose it was picking up the old SNN.LIB file in
the Symantec directory.

Thanks once again. The reason I downloaded DM was because I have to add some new
features to old code that was compiled with Symantec C++, and the version I had
didn't have full support for STL.


Tat

In article <3D736BF1.40218E9 smartsoft.cc>, Jan Knepper says...
Weird...
I think though this would indicate that for some reason the linker is still
picking
up the wrong snn.lib file.
You could try to add the .lib with a complete path, i.e. d:\dm\lib\snn.lib

Jan
Sep 02 2002
prev sibling parent "Walter" <walter digitalmars.com> writes:
<tatc _NO_SPAM_cybernetics.com.au> wrote in message
news:akv4ka$2np8$1 digitaldaemon.com...
 I did a grep on the contents of d:/dm/lib, and grep reported that the 3
 undefined symbols are matched in snn.lib. In the makefile, I tried
including
 snn.lib via the -l option and via a Makefile libs variable, to no success.
The
 dir d:/dm/lib is set in my LIBS environment variable.
Optlink uses the LIB environment variable, not LIBS.
Sep 02 2002