in reply to Re^3: RFC: Setting up a minGW compiling envronment for Perl 5.10
in thread RFC: Setting up a minGW compiling envronment for Perl 5.10

Makes no difference to the output from dmake except that these libs are now included

Well ... all that you have done is to provide the *location* of those libs. Apparently, therefore, the build process is not even trying to find those libs - and you'll have to tell it to do that with -lglib (assuming the glib library is named glib.a or libglib.a). There are probably other libraries that need to be explicitly linked in, too - but start by just trying to get those glib undefined references fixed. That should (at least) greatly reduce the number of undefined references that you get.


Replies are listed 'Best First'.
Re^5: RFC: Setting up a minGW compiling envronment for Perl 5.10
by Bloodrage (Monk) on Mar 03, 2008 at 02:36 UTC

    Ok, the library in question is G:\GTK\lib\glib-2.0.a so I assume that somewhere I've got to hand -lglib-2.0 over to the Makefile, dmake, or the compiler.

    Looking at the header of the Makefile shows me that indeed CPAN informed Makefile.PL and MakeMaker what's going on, but the Makefile.PL may not have done anything useful with it. Joy.

    # MakeMaker Parameters: # ABSTRACT_FROM => q[] # DL_FUNCS => { Glib=>[] } # SNIP! # INC => q[-IG:/GTK/include/glib-2.0 -IG:/GTK/lib/glib-2.0/include + -I.] # LIBS => q[-LG:/GTK/lib -lgobject-2.0 -lglib-2.0 -lintl -liconv - +lgthread-2.0] # SNIP! # --- MakeMaker post_initialize section:

    ...but -lglib-2.0 isn't found again in the Makefile.

    At the bottom of the Makefile is the EXTRALIBS and LDLOADLIBS, so I appended G:\GTK\lib\glib-2.0.a to those strings.

    Success! To a degree. the "undefined reference" errors have reduced from around a thousand to ~300. Now to figure out which other libs are needed. Hmm... those one's listed in the Makefile header snippet above look like prime suspects... especially the ones beginning with 'g'...

    Adding those changes my error log to:

    um... which looks successful...

    The conclusion from this is that:

    • My compile environment is complete.
    • The standard makefiles need help
    • syphilis is godlike
    • ...and I am his profit

    PS: That I've never seriously jiggered about a Makefile before and that I inferred that this is what I should do from syphilis' comment is just more evidence that I'm fucking psychic :P

    PPS: Putting your compiler-onna-stick in a different computer and having it assigned a different drive letter breaks your nicely fixed up files. Bother.