I've recently compiled and installed Perl on my windows2000 worktation, now I want to get DBD::mysql working (Update: I'm not using ActivePerl, so no PPM for me). So I downloaded mysql source, compiled it, installed it, it runs fine and dandy. Now I download DBD::mysql, extract it and try to make. After several configuration attempts, I finally end up with:
perl Makefile.PL --cflags=-I"C:\Progra~1\MySQL\include" "--libs=-LC:\P +rogra~1\MySQL\lib\opt -lmysqlclient"
which is where I happened to install the various libraries.
This is the "install" file I used to copy the files from where I compiled them to the final directory:
mkdir C:\progra~1\mysql\bin mkdir C:\progra~1\mysql\data mkdir C:\progra~1\mysql\share mkdir C:\progra~1\mysql\scripts mkdir C:\progra~1\mysql\include mkdir C:\progra~1\mysql\lib mkdir C:\progra~1\mysql\lib\debug mkdir C:\progra~1\mysql\lib\opt copy client_release\*.exe C:\progra~1\mysql\bin copy client_debug\mysqld.exe C:\progra~1\mysql\bin\mysqld-debug.exe xcopy scripts\*.* C:\progra~1\mysql\scripts /E xcopy share\*.* C:\progra~1\mysql\share /E copy lib_debug\mysqlclient.lib C:\progra~1\mysql\lib\debug copy lib_debug\libmysql.* C:\progra~1\mysql\lib\debug copy lib_debug\zlib.* C:\progra~1\mysql\lib\debug copy lib_release\mysqlclient.lib C:\progra~1\mysql\lib\opt copy lib_release\libmysql.* C:\progra~1\mysql\lib\opt copy lib_release\zlib.* C:\progra~1\mysql\lib\opt copy include\*.h C:\progra~1\mysql\include copy libmysql\libmysql.def C:\progra~1\mysql\include
And this is the output of the above perl Makefile / nmake:
C:\.cpan\build\DBD-mysql-2.9004>perl Makefile.PL --cflags=-I"C:\Progra +~1\MySQL\i nclude" "--libs=-LC:\Progra~1\MySQL\lib\opt -lmysqlclient" 'mysql_config' is not recognized as an internal or external command, operable program or batch file. 'mysql_config' is not recognized as an internal or external command, operable program or batch file. 'mysql_config' is not recognized as an internal or external command, operable program or batch file. 'mysql_config' is not recognized as an internal or external command, operable program or batch file. 'mysql_config' is not recognized as an internal or external command, operable program or batch file. 'mysql_config' is not recognized as an internal or external command, operable program or batch file. 'mysql_config' is not recognized as an internal or external command, operable program or batch file. I will use the following settings for compiling and testing: cflags (Users choice) = -IC:\Progra~1\MySQL\include libs (Users choice) = -LC:\Progra~1\MySQL\lib\opt -lmysqlcl +ient nocatchstderr (default ) = 0 nofoundrows (default ) = 0 ssl (guessed ) = 0 testdb (default ) = test testhost (default ) = testpassword (default ) = testuser (default ) = To change these settings, see 'perl Makefile.PL --help' and 'perldoc INSTALL'. Argument "6.21_02" isn't numeric in numeric ge (>=) at Makefile.PL lin +e 89. Using DBI 1.46 (for perl 5.009001 on MSWin32-x86-multi-thread) install +ed in c:/p erl/site/lib/auto/DBI/ Writing Makefile for DBD::mysql C:\.cpan\build\DBD-mysql-2.9004>nmake Microsoft (R) Program Maintenance Utility Version 6.00.9782.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. cl -c -Ic:/perl/site/lib/auto/DBI/ -IC:\Progra~1\MySQL\includ +e -nologo -Gf -W3 -MD -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FC +RYPT -DPER L_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READ +FIX -MD -D NDEBUG -O1 -DVERSION=\"2.9004\" -DXS_VERSION=\"2.9004\" "-IC:\per +l\lib\CORE " dbdimp.c dbdimp.c dbdimp.c(1373) : warning C4244: '=' : conversion from 'unsigned __int6 +4 ' to 'ch ar ', possible loss of data dbdimp.c(1636) : warning C4244: 'return' : conversion from 'unsigned _ +_int64 ' t o 'int ', possible loss of data dbdimp.c(1638) : warning C4244: 'return' : conversion from 'unsigned _ +_int64 ' t o 'int ', possible loss of data dbdimp.c(1699) : warning C4244: '=' : conversion from 'unsigned __int6 +4 ' to 'un signed long ', possible loss of data cl -c -Ic:/perl/site/lib/auto/DBI/ -IC:\Progra~1\MySQL\includ +e -nologo -Gf -W3 -MD -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FC +RYPT -DPER L_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READ +FIX -MD -D NDEBUG -O1 -DVERSION=\"2.9004\" -DXS_VERSION=\"2.9004\" "-IC:\per +l\lib\CORE " mysql.c mysql.c mysql.xs(355) : warning C4013: 'is_prefix' undefined; assuming extern +returning int Running Mkbootstrap for DBD::mysql () C:\perl\bin\perl.exe -MExtUtils::Command -e chmod 644 mysql.bs C:\perl\bin\perl.exe myld link -out:blib\arch\auto\DBD\mysql\m +ysql.dll - dll -nologo -nodefaultlib -release -libpath:"c:\perl\lib\CORE" -mach +ine:x86 db dimp.obj mysql.obj C:\perl\lib\CORE\perl59.lib C:\Progra~1\MySQL\li +b\opt\mysq lclient.lib "C:\Program Files\Microsoft Visual Studio\VC98\lib\oldname +s.lib" "C: \Program Files\Microsoft Visual Studio\VC98\lib\kernel32.lib" "C:\Prog +ram Files\ Microsoft Visual Studio\VC98\lib\user32.lib" "C:\Program Files\Microso +ft Visual Studio\VC98\lib\gdi32.lib" "C:\Program Files\Microsoft Visual Studio\V +C98\lib\wi nspool.lib" "C:\Program Files\Microsoft Visual Studio\VC98\lib\comdlg3 +2.lib" "C: \Program Files\Microsoft Visual Studio\VC98\lib\advapi32.lib" "C:\Prog +ram Files\ Microsoft Visual Studio\VC98\lib\shell32.lib" "C:\Program Files\Micros +oft Visual Studio\VC98\lib\ole32.lib" "C:\Program Files\Microsoft Visual Studio\ +VC98\lib\o leaut32.lib" "C:\Program Files\Microsoft Visual Studio\VC98\lib\netapi +32.lib" "C :\Program Files\Microsoft Visual Studio\VC98\lib\uuid.lib" "C:\Program + Files\Mic rosoft Visual Studio\VC98\lib\wsock32.lib" "C:\Program Files\Microsoft + Visual St udio\VC98\lib\mpr.lib" "C:\Program Files\Microsoft Visual Studio\VC98\ +lib\winmm. lib" "C:\Program Files\Microsoft Visual Studio\VC98\lib\version.lib" " +C:\Program Files\Microsoft Visual Studio\VC98\lib\odbc32.lib" "C:\Program Files\ +Microsoft Visual Studio\VC98\lib\odbccp32.lib" "C:\Program Files\Microsoft Visua +l Studio\V C98\lib\msvcrt.lib" -def:mysql.def Creating library blib\arch\auto\DBD\mysql\mysql.lib and object blib +\arch\auto \DBD\mysql\mysql.exp mysqlclient.lib(mf_pack.obj) : error LNK2001: unresolved external symb +ol __pctyp e mysqlclient.lib(mf_pack.obj) : error LNK2001: unresolved external symb +ol ___mb_c ur_max blib\arch\auto\DBD\mysql\mysql.dll : fatal error LNK1120: 2 unresolved + externals NMAKE : fatal error U1077: 'C:\perl\bin\perl.exe' : return code '0x600 +0' Stop.
I googled for a while and found various references to linking to the 'release version', but as far as I can tell, thats what I'm doing. So I don't know. Anyone have a vague idea whaat I could try next?

In reply to Win32 installing DBD::mysql, unresolved external symbol by BUU

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.