Mail Archives: cygwin/2001/05/24/09:37:30
I have just installed cygwin and have used it to develop a small Win32 utility.
Everything was working amazingly well until I tried to use some of the functions
from ctype.h (isspace, tolower).
$ make
gcc -e _mainCRTStartup -mno-cygwin -mwindows main.o errlog.o main.res -o main.ex
e -lrasapi32
main.o(.text+0x1f87):main.cpp: undefined reference to `_imp___ctype_'
main.o(.text+0x1fb1):main.cpp: undefined reference to `_imp___ctype_'
collect2: ld returned 1 exit status
make: *** [main.exe] Error 1
I added -lc to link in the ctype functions, and it compiled fine, but now the
program just hangs (the initial window does not even display). This happens
even if I never actually call the function that is using isspace and tolower, so
it is not a problem introduced by the code itself.
If I leave it running long enough, I get this error:
MAIN caused a stack fault in module KERNEL32.DLL at 0167:bff9db61.
Registers:
EAX=c00309c4 CS=0167 EIP=bff9db61 EFLGS=00010202
EBX=0254ff68 SS=016f ESP=00551db0 EBP=0055204c
ECX=00000000 DS=016f ESI=00000000 FS=2e3f
EDX=bff76855 ES=016f EDI=bff79138 GS=0000
Bytes at CS:EIP:
53 8b 15 e4 9c fc bf 56 89 4d e4 57 89 4d dc 89
Stack dump:
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
If I remove no-cygwin it will work, but now I need cygwin1.dll, and I really
need this to be a self-contained EXE. I have experimented with -static, but it
still wants cygwin1.dll.
Any suggestions on how to do this?
Lyle Frost
Citadel Consulting
http://www.cnz.com
--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple
- Raw text -