Re: Touble with Win32-API-0.41
From: Sisyphus (kalinaubears_at_iinet.net.au)
Date: 02/16/04
- Previous message: thinkfirst: "Re: Image::Magick::Thumbnail"
- In reply to: C McKay: "Touble with Win32-API-0.41"
- Next in thread: C McKay: "Re: Touble with Win32-API-0.41"
- Reply: C McKay: "Re: Touble with Win32-API-0.41"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 16 Feb 2004 14:44:08 +1100
C McKay wrote:
> Creating library file: libCallback.dll.a
> Callback.o(.text+0x87b):Callback.c: undefined reference to `_itoa'
> Callback.o(.text+0xf87):Callback.c: undefined reference to `_itoa'
> collect2: ld returned 1 exit status
> perlld: *** system() failed to execute
I was able to compile the code below by simply running 'gcc itoa.c'.
No additional libs needed to be linked in. (Removing the leading
underscores made no difference at all.)
Will it build for you ? Your post suggests that it won't - but if you
can get that code to compile, then you should not have that trouble with
Win32::API.
I am using Mingw (but not Cygwin). Doing a search of your compiler's
'.a' files for the string 'itoa' should throw up something. I get
matches in 7 separate files including libcrtdll.a, libmsvcrt.a and
libntdll.a. Is 'itoa' not defined in *any* of your library files ? If
it's simply not there, then I don't know what you can do - maybe the
Cygwin list would be able to provide better help.
#include <stdlib.h>
#include <stdio.h>
int main()
{
char buffer[20];
int i = 3445;
long l = -344115L;
unsigned long ul = 1234567890UL;
_itoa( i, buffer, 10 );
printf( "String of integer %d (radix 10): %s\n", i, buffer );
_itoa( i, buffer, 16 );
printf( "String of integer %d (radix 16): 0x%s\n", i, buffer );
_itoa( i, buffer, 2 );
printf( "String of integer %d (radix 2): %s\n", i, buffer );
_ltoa( l, buffer, 16 );
printf( "String of long int %ld (radix 16): 0x%s\n", l,
buffer );
_ultoa( ul, buffer, 16 );
printf( "String of unsigned long %lu (radix 16): 0x%s\n", ul,
buffer );
}
Hth .... somehow :-)
Cheers,
Rob
-- To reply by email u have to take out the u in kalinaubears.
- Previous message: thinkfirst: "Re: Image::Magick::Thumbnail"
- In reply to: C McKay: "Touble with Win32-API-0.41"
- Next in thread: C McKay: "Re: Touble with Win32-API-0.41"
- Reply: C McKay: "Re: Touble with Win32-API-0.41"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|