From: Earnie B. <ear...@ya...> - 2002-12-19 21:49:15
|
Earnie Boyd wrote: > > > I knew that my report wasn't a bug report. It was a developers beware > report. It's taken three days to narrow it down to optimization issues. > I use -O0 because I wanted to debug the problem but had no joy with the > bug because it went away. Today, I'll rebuild with -O2 -g and see if > the linker will give me more useful information. > I've narrowed this further to the declaration of _pctype in ctypes.h. But I still don't have a proper bug report. When declared as __declspec(dllimport) extern unsigned short* _pctype; the error persists. When declared as extern unsigned short** _imp___pctype; #define _pctype (*_imp___pctype); the error does not occur. The error is happening in a static library with a link line similar to gcc -o foo.exe foo.o libbar.a The function uses the isspace() and friends and every use is listed in the error assuming I use the -W1,--disable-auto-import option. If I don't --disable-auto-import, the _pctype is resolved to _imp___pctype but I get ``undefined reference to `libmsvcrt_a_iname''' instead of ``undefined reference to `_pctype'''. Earnie. |