Mail Archives: cygwin/1999/04/09/16:46:53
"Richard Ashwell" <richval AT hotmail DOT com> writes:
> gcc -Wl,--subsystem,windows -mwindows -Lc:/wx/lib -o test.exe test.o
> test_resou
> rces.o c:/wx/lib/libwx.a -lstdc++ -lgcc -lwinspool -lwinmm -lshell32 -
> lcomctl32
> -lctl3d32 -lodbc32 -ladvapi32
> c:\egcs-1.1.2\lib\libstdc++.a(floatconv.o)(.text+0x12e7): undefined
> reference to
> `__imp__HUGE_dll'
> C:\EGCS-1~1.2\BIN\MAKE.EXE: *** [test.exe] Error 1
Interesting .... The symbol __imp__HUGE_dll is a reference to the symbol
HUGE_dll exported by CRTDLL runtime and is in libcrtdll.a. Whenever you
link using GCC, it automatically links in -lcrtdll, and so it should
always find this symbol.
Please check the following:
1. none of the variables are defined in the environment (ie., as DOS
variables) -- GCC_EXEC_PREFIX, COMPILER_PATH, LIBRARY_PATH,
C_INCLUDE_PATH, CPLUS_INCLUDE_PATH. If these are set, UNSET these
first. I don't like hidden surprises.
2. Make sure you're linking with the correct libcrtdll.a:
$ gcc -print-file-name=libcrtdll.a
should print `c:\egcs-1.1.2\i386-mingw32\lib\libcrtdll.a'
3. Add the `-v' option to gcc when linking to see what's going on.
4. If all of provide no clue, time for some detective work. First check
for HUGE_dll in the C++ runtime library:
C:\> cd c:/egcs-1.1.2/lib
C:\> nm --print-file-name libstdc++.a | nm HUGE
libstdc++.a:floatconv.o: U ___imp__HUGE_dll
now, check libcrtdll.a:
C:\> cd c:/egcs-1.1.2/i386-mingw32/lib
C:\> nm --print-file-name libcrtdll.a | nm HUGE
libcrtdll.a:ds16.o:00000000 T __HUGE_dll
libcrtdll.a:ds16.o:00000000 ? ___imp__HUGE_dll
libcrtdll.a:ds16.o:00000000 ? __imp___HUGE_dll
If you get something else, there's a problem somewhere. We can talk
then.
> Despite, the Install instructions for wxWindows which apear old (IE
> they had patchs for Mingw32 that when I went to implement where
> already there in my version) I didn't setup the environment the way
> the install instructions suggested. It appears they wanted me to run
> a Batch File like:
>
> REM
> REM replace k:\mingw32 with whatever your installation root may be.
> REM
> path c:\egcs-1.1.2\bin;%PATH%;
>
> SET GCC_EXEC_PREFIX=c:\egcs-1.1.2\lib\gcc-lib\
> set BISON_SIMPLE=c:\egcs-1.1.2\share\bison.simple
> set BISON_HAIRY=c:\egcs-1.1.2\share\bison.hairy
> set C_INCLUDE_PATH=c:\egcs-1.1.2\include
> set CPLUS_INCLUDE_PATH=c:\egcs-1.1.2\include\g++;c:\egcs-1.1.2\include
> set LIBRARY_PATH=c:\egcs-1.1.2\lib
> set GCC_EXEC_PREFIX=c:\egcs-1.1.2\lib\gcc-lib\
Please get rid of all bug BISON_SIMPLE and BISON_HAIRY, but only if you
have bison installed. It doesn't come with Mingw compiler distribution.
Try not to be frustrated by these problems; these are just part of the
learning process, albeit somewhat cruel at times. I have much more
trouble when I have to use Visual Studio once in a while to check for
something using VC 6; it took me a while one time to figure out why
it insisted on linking libpcmtd.lib or some such library no matter what
I did until I changed some linker option somewhere ...
Regards,
Mumit
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
- Raw text -