Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Hi. BUU wanted a ppm version of Tk-PNG-2.005, so I went downloaded it, downloaded and compiled zlib and libpng, and did like the readme suggests, so I do like
E:\dev\new\Tk-PNG-2.005>perl Makefile.PL -I./zlib -I./libpng -L./zlib +-L./libpng E:/dev/new/Tk-PNG-2.005 does not start with C:/Perl/site/lib i.e. building outside Tk itself Note (probably harmless): No library found for '-lpng' Note (probably harmless): No library found for '-lz' Finding dependancies for PNG.xs Finding dependancies for imgPNG.c Cannot find 'png.h' assume made Writing Makefile for Tk::PNG E:\dev\new\Tk-PNG-2.005>nmake Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. NMAKE : fatal error U1073: don't know how to make 'png.h' Stop.
I crack the makefile open, and search for png.h, and find
imgPNG$(OBJ_EXT) : imgPNG.c C:/Perl/site/lib/Tk/pTk/Lang.h \ C:/Perl/site/lib/Tk/pTk/Lang.m C:/Perl/site/lib/Tk/pTk/Lang.t \ C:/Perl/site/lib/Tk/pTk/LangIO.h C:/Perl/site/lib/Tk/pTk/Lang_f.h \ C:/Perl/site/lib/Tk/pTk/Xlib.h C:/Perl/site/lib/Tk/pTk/Xlib.m \ C:/Perl/site/lib/Tk/pTk/Xlib.t C:/Perl/site/lib/Tk/pTk/Xlib_f.h \ C:/Perl/site/lib/Tk/pTk/img.h C:/Perl/site/lib/Tk/pTk/imgInt.h \ C:/Perl/site/lib/Tk/pTk/imgInt.m C:/Perl/site/lib/Tk/pTk/imgInt.t \ C:/Perl/site/lib/Tk/pTk/imgInt_f.h C:/Perl/site/lib/Tk/pTk/tk.h \ C:/Perl/site/lib/Tk/pTk/tk.m C:/Perl/site/lib/Tk/pTk/tk.t \ C:/Perl/site/lib/Tk/pTk/tkConfig.h C:/Perl/site/lib/Tk/pTk/tkEvent.h +\ C:/Perl/site/lib/Tk/pTk/tkEvent.m C:/Perl/site/lib/Tk/pTk/tkEvent.t \ C:/Perl/site/lib/Tk/pTk/tkEvent_f.h C:/Perl/site/lib/Tk/pTk/tkInt.h \ C:/Perl/site/lib/Tk/pTk/tkInt.m C:/Perl/site/lib/Tk/pTk/tkInt.t \ C:/Perl/site/lib/Tk/pTk/tkInt_f.h C:/Perl/site/lib/Tk/pTk/tkPort.h \ C:/Perl/site/lib/Tk/pTk/tkVMacro.h C:/Perl/site/lib/Tk/pTk/tkWinPort. +h \ C:/Perl/site/lib/Tk/pTk/tk_f.h png.h
I change C:/Perl/site/lib/Tk/pTk/tk_f.h png.h to C:/Perl/site/lib/Tk/pTk/tk_f.h libpng/png.h
That don't help much so I crack open imgPNG.c and find
#ifdef MAC_TCL #include "libpng:png.h" #else #ifdef HAVE_IMG_H # include <png.h> #else # include "png.h" #endif #endif
SO I change the include "png.h" to include "libpng/png.h" and proceed from there.

And I get

Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. cl -c -IC:/Perl/site/lib/Tk -I/usr/local/include -IC:/Perl/sit +e/lib/Tk/pTk/mTk/xlib -nologo -O1 -MD -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DPE +RL_IMPLICIT_CONTEXT -DPERL_IMP LICIT_SYS -DPERL_MSVCRT_READFIX -O1 -MD -DNDEBUG -DVERSION=\"2.005\ +" -DXS_VERSION=\"800.023\" - IC:\Perl\lib\CORE imgPNG.c imgPNG.c libpng/png.h(324) : fatal error C1083: Cannot open include file: 'zlib +.h': No such file or directory NMAKE : fatal error U1077: 'cl' : return code '0x2' Stop. E:\dev\new\Tk-PNG-2.005>nmake Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. cl -c -IC:/Perl/site/lib/Tk -I/usr/local/include -IC:/Perl/sit +e/lib/Tk/pTk/mTk/xlib -nologo -O1 -MD -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DPE +RL_IMPLICIT_CONTEXT -DPERL_IMP LICIT_SYS -DPERL_MSVCRT_READFIX -O1 -MD -DNDEBUG -DVERSION=\"2.005\ +" -DXS_VERSION=\"800.023\" - IC:\Perl\lib\CORE imgPNG.c imgPNG.c imgPNG.c(472) : warning C4550: expression evaluates to a function whic +h is missing an argument list imgPNG.c(661) : warning C4550: expression evaluates to a function whic +h is missing an argument list "Running Mkbootstrap for Tk::PNG ()" C:\Perl\bin\perl.exe -IC:\Perl\lib -IC:\Perl\lib -MExtUtils::C +ommand -e chmod 644 PNG.bs C:\Perl\bin\perl.exe "-IC:\Perl\lib" "-IC:\Perl\lib" -MExtUtil +s::Mksymlists -e "Mksymlists( 'NAME' => 'Tk::PNG', 'DLBASE' => 'PNG', 'DL_FUNCS' => { }, 'FUNCLIST' + => [], 'IMPORTS' => { }, 'DL _VARS' => []);" link -out:blib\arch\auto\Tk\PNG\PNG.dll -dll -nologo -nodefaul +tlib -release -libpath:"C:/Pe rl\lib\CORE" -machine:x86 PNG.obj imgPNG.obj C:\Perl\lib\CORE\perl +56.lib "C:\Program Files\Micro soft Visual Studio\VC98\lib\oldnames.lib" "C:\Program Files\Microsoft +Visual Studio\VC98\lib\kernel3 2.lib" "C:\Program Files\Microsoft Visual Studio\VC98\lib\user32.lib" +"C:\Program Files\Microsoft Vi sual Studio\VC98\lib\gdi32.lib" "C:\Program Files\Microsoft Visual Stu +dio\VC98\lib\winspool.lib" "C: \Program Files\Microsoft Visual Studio\VC98\lib\comdlg32.lib" "C:\Prog +ram Files\Microsoft Visual Stu dio\VC98\lib\advapi32.lib" "C:\Program Files\Microsoft Visual Studio\V +C98\lib\shell32.lib" "C:\Progr am Files\Microsoft Visual Studio\VC98\lib\ole32.lib" "C:\Program Files +\Microsoft Visual Studio\VC98\ lib\oleaut32.lib" "C:\Program Files\Microsoft Visual Studio\VC98\lib\n +etapi32.lib" "C:\Program Files \Microsoft Visual Studio\VC98\lib\uuid.lib" "C:\Program Files\Microsof +t Visual Studio\VC98\lib\wsock 32.lib" "C:\Program Files\Microsoft Visual Studio\VC98\lib\mpr.lib" "C +:\Program Files\Microsoft Visu al Studio\VC98\lib\winmm.lib" "C:\Program Files\Microsoft Visual Studi +o\VC98\lib\version.lib" "C:\Pr ogram Files\Microsoft Visual Studio\VC98\lib\odbc32.lib" "C:\Program F +iles\Microsoft Visual Studio\V C98\lib\odbccp32.lib" "C:\Program Files\Microsoft Visual Studio\VC98\l +ib\msvcrt.lib" -def:PNG.def Creating library blib\arch\auto\Tk\PNG\PNG.lib and object blib\arch +\auto\Tk\PNG\PNG.exp imgPNG.obj : error LNK2001: unresolved external symbol _png_set_read_f +n imgPNG.obj : error LNK2001: unresolved external symbol _png_create_rea +d_struct imgPNG.obj : error LNK2001: unresolved external symbol _png_get_error_ +ptr imgPNG.obj : error LNK2001: unresolved external symbol _png_error imgPNG.obj : error LNK2001: unresolved external symbol _png_get_progre +ssive_ptr imgPNG.obj : error LNK2001: unresolved external symbol _png_read_image imgPNG.obj : error LNK2001: unresolved external symbol _png_set_gamma imgPNG.obj : error LNK2001: unresolved external symbol _png_get_gAMA imgPNG.obj : error LNK2001: unresolved external symbol _png_set_sRGB imgPNG.obj : error LNK2001: unresolved external symbol _png_get_sRGB imgPNG.obj : error LNK2001: unresolved external symbol _png_get_valid imgPNG.obj : error LNK2001: unresolved external symbol _png_get_rowbyt +es imgPNG.obj : error LNK2001: unresolved external symbol _png_get_channe +ls imgPNG.obj : error LNK2001: unresolved external symbol _png_read_updat +e_info imgPNG.obj : error LNK2001: unresolved external symbol _png_set_expand imgPNG.obj : error LNK2001: unresolved external symbol _png_set_strip_ +16 imgPNG.obj : error LNK2001: unresolved external symbol _png_get_IHDR imgPNG.obj : error LNK2001: unresolved external symbol _png_read_info imgPNG.obj : error LNK2001: unresolved external symbol _png_destroy_re +ad_struct imgPNG.obj : error LNK2001: unresolved external symbol _png_create_inf +o_struct imgPNG.obj : error LNK2001: unresolved external symbol _png_init_io imgPNG.obj : error LNK2001: unresolved external symbol _png_destroy_wr +ite_struct imgPNG.obj : error LNK2001: unresolved external symbol _png_create_wri +te_struct imgPNG.obj : error LNK2001: unresolved external symbol _png_set_write_ +fn imgPNG.obj : error LNK2001: unresolved external symbol _png_write_end imgPNG.obj : error LNK2001: unresolved external symbol _png_write_row imgPNG.obj : error LNK2001: unresolved external symbol _png_set_interl +ace_handling imgPNG.obj : error LNK2001: unresolved external symbol _png_write_info imgPNG.obj : error LNK2001: unresolved external symbol _png_set_text imgPNG.obj : error LNK2001: unresolved external symbol _png_set_gAMA imgPNG.obj : error LNK2001: unresolved external symbol _png_set_IHDR blib\arch\auto\Tk\PNG\PNG.dll : fatal error LNK1120: 31 unresolved ext +ernals NMAKE : fatal error U1077: 'link' : return code '0x460' Stop.
What the heck am I doing? Do I have uncompatible versions of libpng and zlib? This is outside of my scope of knowledge.

 
______crazyinsomniac_____________________________
Of all the things I've lost, I miss my mind the most.
perl -e "$q=$_;map({chr unpack qq;H*;,$_}split(q;;,q*H*));print;$q/$q;"


In reply to Compiling Tk::PNG on win32 (complications, more c/xs than perl) by crazyinsomniac

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-04-18 07:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found