Thanks for your help.
Here were my procedure:

cd c:\mysql\lib\opt
reimp libmysql.lib
rename LIBMYSQL.def libmysql.def
dlltool --input-def libmysql.def --dllname libmysql.dll --output-lib mysql.a rename liblibmysql.a libmysql.a
I added this parameter to the perl makefile.pl
-LC:\Programs\mysql-4.1.12-win32\lib\opt
-lmysql
Nevertheless I still get the following error:
D:\TMP\DBD-mysql-4.007>dmake gcc -c -IC:\perl\site\lib\auto\DBI -IC:\mysql\include -DDBD_MYSQL_INS +ERT_ID_IS_GOOD -g -s -O2 -DWIN32 -DHAVE_DES_FCRYPT -DPERL _IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -DPERL_MSVC +RT_READFIX -s -O2 -DVERSION=\"4.007\" -DXS_VERSION=\" 4.007\" "-IC:\perl\lib\CORE" dbdimp.c gcc -c -IC:\perl\site\lib\auto\DBI -IC:\mysql\include -DDBD_MYSQL_INS +ERT_ID_IS_GOOD -g -s -O2 -DWIN32 -DHAVE_DES_FCRYPT -DPERL _IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -DPERL_MSVC +RT_READFIX -s -O2 -DVERSION=\"4.007\" -DXS_VERSION=\" 4.007\" "-IC:\perl\lib\CORE" mysql.c Running Mkbootstrap for DBD::mysql () C:\perl\bin\perl.exe -MExtUtils::Command -e chmod 644 mysql.bs dlltool --def mysql.def --output-exp dll.exp C:\perl\bin\perl.exe myld g++ -o blib\arch\auto\DBD\mysql\mysql.dll -W +l,--base-file -Wl,dll.base -mdll -s -L"c:\perl\lib\CORE" -L"C:\Mi nGW\lib" dbdimp.o mysql.o -Wl,--image-base,0x1570000 C:\perl\li +b\CORE\libperl58.a C:\MinGW\lib\libmysql.a C:\MinGW\lib\libmsvcrt .a C:\MinGW\lib\libmoldname.a C:\MinGW\lib\libkernel32.a C:\MinGW\lib\ +libuser32.a C:\MinGW\lib\libgdi32.a C:\MinGW\lib\libwinspool.a C: \MinGW\lib\libcomdlg32.a C:\MinGW\lib\libadvapi32.a C:\MinGW\lib\libsh +ell32.a C:\MinGW\lib\libole32.a C:\MinGW\lib\liboleaut32.a C:\Min GW\lib\libnetapi32.a C:\MinGW\lib\libuuid.a C:\MinGW\lib\libws2_32.a C +:\MinGW\lib\libmpr.a C:\MinGW\lib\libwinmm.a C:\MinGW\lib\libvers ion.a C:\MinGW\lib\libodbc32.a C:\MinGW\lib\libodbccp32.a dll.exp dbdimp.o: In function `dbd_discon_all': D:/TMP/DBD-mysql-4.007/dbdimp.c:1972: undefined reference to `mysql_se +rver_end@0' collect2: ld returned 1 exit status dmake: Error code 129, while making 'blib\arch\auto\DBD\mysql\mysql.d +ll'

In reply to Re^2: How to build DBD::MySQL by fredo2906
in thread How to build DBD::MySQL by fredo2906

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.