Menu

Build problems with VS.NET 2003 on XP

Help
rainy-code
2005-05-22
2013-02-10
  • rainy-code

    rainy-code - 2005-05-22

    I tried to build gnuplot-4.0.0 with VS.NET,but I couldn't.
    I got libpng-1.2.8,zlib-1.2.2 and PDFlib-Lite-6.0.1.
    and I build them as Win32_LIB_Release.
    copy.
    I edit makefile.nt to change library path and include path.
    and I go to command prompt.

    copy ../config/makefile.nt makefile
    nmake
     
    But,I have error LNK 2019
    (unresolved external symbol  referenced in function
    ) in plot.obj,term.obj,set.obj,winmain.obj,unset.obj
    ,command.obj,wgraph.obj.

     
    • Hans-Bernhard Broeker

      You've erased the single most important piece of information from that LNK2019 message: the actual symbol names being reported as "unreferenced".  Without those, it's close to impossible to help you, for anyone who doesn't happen to have VS.NET on his machine.  Which seems to include all the gnuplot team.

       
      • rainy-code

        rainy-code - 2005-05-23

        Thank you for replying.
        These are the message translated to English.
                link /subsystem:windows /nologo /MACHINE:IX86 /MAP:GNUPLOT /libpath:..\\ src\libpng-1.2.8\projects\visualc71\Win32_LIB_Release\Zlib /libpath:..\\src\libp
        ng-1.2.8\projects\visualc71\Win32_LIB_Release /libpath:..\\src\pdflib /NODEFAULT
        LIB LIBCMTD.lib /out:wgnuplot.exe @linkopt1.msw

        libpng.lib(pngwrite.obj) :Warning LNK4217
        locally defined symbol '_gmtimel' imported in function '_png_convert_from_time_t'.
        libpng.lib(pngwrite.obj) :warning LNK4217
        locally defined symbol '_abort' imported in function '_png_create_write_struct_2'.
        libpng.lib(pngwrite.obj) :warning LNK4217
        locally defined symbol '_sprintf' imported in function '_png_create_write_struct_2'.
        libpng.lib(png.obj):warning LNK4049
        exported symbol "_sprintf" also imported.
        libpng.lib(pngwutil.obj):warning LNK4049
        exported symbol "_sprintf" also imported.
        libpng.lib(pngwutil.obj) : warning LNK4217:
        locally defined symbol '_fprintf' imported in function '_png_write_cHRM '.
        libpng.lib(pngerror.obj) : warning LNK4049:
        exported symbol '_fprintf' also imported.
        libpng.lib(pngwutil.obj) : warning LNK4217:
        locally defined symbol '__iob' imported in function _png_write_cHRM.
        libpng.lib(pngerror.obj) : warning LNK4049:
        exported symbol  ' __iob' also imported.
        libpng.lib(pngerror.obj) : warning LNK4217:
        locally defined symbol '_strncpy' imported in function '_png_format_buffer'.
        libpng.lib(pngerror.obj) : warning LNK4217:
        locally defined symbol ' _longjmp' imported in function '_png_default_error'
        libpng.lib(pngmem.obj) : warning LNK4217:
        locally defined symbol ' _malloc' imported in function '_png_create_struct_2'
        libpng.lib(zutil.obj) : warning LNK4049:
        exported symbol  ' _malloc' also imported.
        libpng.lib(pngmem.obj) : warning LNK4217:
        locally defined symbol '_free' imported in function '_png_destroy_struct_2 '.
        libpng.lib(zutil.obj) : warning LNK4049:
        exported symbo l '_free' also imported.
        libpng.lib(pngwio.obj) : warning LNK4217:
        locally defined symbol '_fwrite' imported in function '_png_default_write_data'.
        libpng.lib(pngwio.obj) : warning LNK4217:
        locally defined symbol '_fflush' imported in function  '_png_default_flush'.

        command.obj : error LNK2019:unresolved external symbol '_getcwd' referenced in function  '_pwd_command'.
        plot.obj : error LNK2019: unresolved external symbol '_stricmp' referenced in function  '_gnu_main'.
        term.obj : error LNK2001: unresolved external symbol  "_stricmp" .
        winmain.obj : error LNK2001: unresolved external symbol  "_stricmp".
        set.obj : error LNK2019: unresolved external symbol ' _strdup' referenced in function  '_set_datafile_commentschars'.
        unset.obj : error LNK2019:unresolved external symbol' _strdup'  referenced in function  '_reset_command'.
        wgraph.obj : error LNK2019: unresolved external symbol '_strdup' referenced in function   '_WndGraphProc@16'.
        term.obj : error LNK2019: unresolved external symbol ' _setmode' referenced in function '_term_init'.
        term.obj : error LNK2019: unresolved external symbol '_fileno' referenced in function '_term_init'.
        term.obj : error LNK2019:unresolved external symbol '_PDF_open_fp' referenced in function'_PDF_init'.
        winmain.obj : error LNK2019: unresolved external symbol '_fcloseall' referenced in function' _WinExit '
        winmain.obj : error LNK2019: unresolved external symbol ' _mktemp' referenced in function '_open_printer'.
        wgnuplot.exe : fatal error LNK1120:
        8 unresolved externals
        NMAKE : fatal error U1077: 'link' :
        return code '0x460'

         
        • Hans-Bernhard Broeker

          PDF_open_fp is because the version of PDFlib you used is too new (newer than gnuplot-4.0.0, and PDFlib removed functions since then).

          The others are weird --- according to the knowledge encoded in the gnuplot build files (config/makefile.nt, config/config.nt), MSVC used to have, e.g., a getcwd() in its C standard library.  Maybe VS.NET is too new and flashy to consider "nasty old C" a worthwile thing to still support...?

          I have two suggestions: either use an older version of MVSC, or try to dig up information about C library functions stricmp, getcwd, fileno, ...

           
          • rainy-code

            rainy-code - 2005-05-28

            Thank you for kind help!!
            I understand the problems.
            I gave up gnuplot-4.0.0.
            At last, I successfully built gnuplot cvs version with VS.NET.

             

Log in to post a comment.