From: Iain M. <iai...@op...> - 2002-04-04 04:56:03
|
Hey folks, When I try to compile my program, I get the error "undefined reference to `GetTextExtentPoint32A@16'" from the linker. Running nm on libgdi32.a and grepping the result for "Extent" yields the following: 00000000 T _GetTextExtentPointW@16 00000000 ? __imp__GetTextExtentPointW@16 00000000 T _GetTextExtentPointA@16 00000000 ? __imp__GetTextExtentPointA@16 00000000 T _GetTextExtentPoint32W@16 00000000 ? __imp__GetTextExtentPoint32W@16 00000000 T _GetTextExtentPoint32A@16 00000000 ? __imp__GetTextExtentPoint32A@16 00000000 T _GetTextExtentExPointW@28 00000000 ? __imp__GetTextExtentExPointW@28 00000000 T _GetTextExtentExPointA@28 00000000 ? __imp__GetTextExtentExPointA@28 plainly, the 7th one there is either what I'm after or incredibly close to it. Adding "-lgdi32" to my gcc command changes nothing. Copying and pasting the name of the function from the help file makes a difference of *nothing* I dunno if it's relevant, but I'm doing all this stuff from a linux box using the precompiled cross-compiler linked to by the mingw FAQ page. All other API calls I've tried to use work fine. Thus far my only guess is that the problem lies in the gdi lib not being used by the linker properly. Thanks, Iain McCoy |