2005.10.17 03:43 "[Tiff] newbie asks for help with mingw and libtiff", by

2005.10.17 23:16 "Re: [Tiff] newbie asks for help with mingw and libtiff", by Frank Warmerdam

On 10/16/05, gnunes5@comcast.net <gnunes5@comcast.net> wrote:

  1. ld -o first first.0 c:\mingw\lib\libtiff.lib (third argument could be -ltiff)

This produces the following messages:

ld: warning: cannot find entry symbol _mainCRTStartup; defaulting to 00401000

first.o(.text+0x21):first.c: undefined reference to `_alloca'
first.o(.text+0x26):first.c: undefined reference to `__main'
first.o(.text+0x32):first.c: undefined reference to `printf'
first.o(.text+0x9b):first.c: undefined reference to `printf'
first.o(.text+0xae):first.c: undefined reference to `printf'


I would suggest instead doing:

 gcc -o first first.o c:\mingw\lib\libtiff.lib

or even:

  gcc first.c -o first -ltiff

The stuff you are missing is C support library stuff and if you link your program with the compiler it will supply the needed extra libraries.

BTW, this isn't strictly a libtiff question.

Best regards,

I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent