On 14/02/11 21.53, John Towers wrote:

  Hi,
sorry for the delay; I wanted to try a full build before answering, and I lost some time by not following my own build instructions...

I apologize for being such a bother, but the link problems remain.

Since this process is usually so painful, I typically make copies of
my perl tree as it is being constructed.

I started this session with a perl tree that was not touched by any
Wx modules at all. I got new versions of Alien::wxWidgets and Wx.
I recompiled wxWidgets using 'DLL Release' in Visual Studio 2008.

================================================================

Following art the settings of some environment variables that I
think are pertinent:

PERL5LIB=c:\perl\lib;c:\perl\site\lib
Path=c:\perl\bin;C:\Program Files\Microsoft Visual Studio
9.0\Common7\IDE;C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN;...
WXDIR=c:\wxWidgets-2.9.1
WXWIN=c:\wxWidgets-2.9.1
WX_DIR=c:\wxWidgets-2.9.1

No other PERL variables are set.

==============================================================

Following is the result of perl -V:

D:\users\john_towers\.cpan\build\Wx-0.98-JrW6pN>perl -V
Summary of my perl5 (revision 5 version 12 subversion 3) configuration:

   Platform:
     osname=MSWin32, osvers=5.1, archname=MSWin32-x86-multi-thread
     uname=''
     config_args='undef'
     hint=recommended, useposix=true, d_sigaction=undef
     useithreads=define, usemultiplicity=define
     useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
     use64bitint=undef, use64bitall=undef, uselongdouble=undef
     usemymalloc=n, bincompat5005=undef
   Compiler:
     cc='cl', ccflags
='-nologo -GF -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_STRICT 
-DHAVE_DES_FCRYPT
  -D_CRT_SECU
RE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE  -DPERL_IMPLICIT_CONTEXT 
-DPERL_IMPLICIT_SYS
  -DUSE_PERLIO',
     optimize='-MD -Zi -DNDEBUG -O1',
     cppflags='-DWIN32'
     ccversion='15.00.21022.08', gccversion='', gccosandvers=''
     intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
     d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=8
     ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='__int64',
lseeksize=8
     alignbytes=8, prototype=define
   Linker and Libraries:
     ld='link', ldflags
'-nologo -nodefaultlib -debug -opt:ref,icf  -libpath:"c:\perl\lib\CORE"  
-machine:x86
"/manifest
dependency:type='Win32' name='Microsoft.Windows.Common-Controls'
version='6.0.0.0' processorArchitecture='*' publicKeyTo
ken='6595b64144ccf1df' language='*'"'
     libpth="C:\Program Files\Microsoft Visual Studio 9.0\VC\lib"
     libs=  oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib
comdlg32.lib advapi32.lib shell32.lib ole32.lib
oleaut32.lib  netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib
version.lib odbc32.lib odbccp32.lib comctl32.lib msvcr
t.lib
     perllibs=  oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib
comdlg32.lib advapi32.lib shell32.lib ole32.
lib oleaut32.lib  netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib
version.lib odbc32.lib odbccp32.lib comctl32.lib m
svcrt.lib
     libc=msvcrt.lib, so=dll, useshrplib=true, libperl=perl512.lib
     gnulibc_version=''
   Dynamic Linking:
     dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
     cccdlflags=' ',
lddlflags='-dll -nologo -nodefaultlib -debug -opt:ref,icf  
-libpath:"c:\perl\lib\CORE"
   -machine:x86
  "/manifestdependency:type='Win32' name='Microsoft.Windows.Common-Controls'
version='6.0.0.0' processorArchitecture='*'
publicKeyToken='6595b64144ccf1df' language='*'"'


Characteristics of this binary (from libperl):
   Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV
                         PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS
                         PERL_MALLOC_WRAP PL_OP_SLAB_ALLOC USE_ITHREADS
                         USE_LARGE_FILES USE_PERLIO USE_PERL_ATOF
   Built under MSWin32
   Compiled at Feb  3 2011 18:02:30
   %ENV:
     PERL5LIB="c:\perl\lib;c:\perl\site\lib"
   @INC:
     c:\perl\lib
     c:\perl\site\lib
     c:/perl/site/lib
     c:/perl/lib
     .

D:\users\john_towers\.cpan\build\Wx-0.98-JrW6pN>

=======================================================================

Following is my transcript:

C:\Documents and Settings\john_towers>d:

D:\>cd users\john_towers\.cpan\build

D:\users\john_towers\.cpan\build>dir
  Volume in drive D is Working
  Volume Serial Number is 4846-9A7A

  Directory of D:\users\john_towers\.cpan\build

02/14/2011  03:17  PM<DIR>           .
02/14/2011  03:17  PM<DIR>           ..
02/14/2011  03:19  PM<DIR>           Alien-wxWidgets-0.51-8imsli
02/14/2011  03:17  PM<DIR>           Wx-0.98-JrW6pN
                0 File(s)              0 bytes
                4 Dir(s)  159,736,279,040 bytes free

D:\users\john_towers\.cpan\build>cd Alien-wxWidgets-0.51-8imsli

D:\users\john_towers\.cpan\build\Alien-wxWidgets-0.51-8imsli>dir
  Volume in drive D is Working
  Volume Serial Number is 4846-9A7A

  Directory of D:\users\john_towers\.cpan\build\Alien-wxWidgets-0.51-8imsli

02/14/2011  03:19  PM<DIR>           .
02/14/2011  03:19  PM<DIR>           ..
02/14/2011  03:19  PM<DIR>           blib
                                      ^^^^^^
02/14/2011  03:19  PM             1,668 Build
02/14/2011  03:19  PM             2,110 Build.bat
03/30/2010  04:32  PM             9,488 Build.PL
03/30/2010  04:32  PM             8,707 Changes
02/14/2011  03:17  PM<DIR>           inc
02/14/2011  03:17  PM<DIR>           lib
03/30/2010  04:32  PM             1,287 Makefile.PL
03/30/2010  04:32  PM             1,923 MANIFEST
03/30/2010  04:32  PM               428 MANIFEST.SKIP
03/30/2010  04:32  PM               913 META.yml
02/14/2011  03:19  PM               964 MYMETA.yml
02/14/2011  03:17  PM<DIR>           patches
03/30/2010  04:32  PM             1,481 README.txt
02/14/2011  03:17  PM<DIR>           script
02/14/2011  03:17  PM<DIR>           t
02/14/2011  03:19  PM<DIR>           _build
                                      ^^^^^^^^
               10 File(s)         28,969 bytes
                9 Dir(s)  159,736,279,040 bytes free

This is not a clean build directory; I asked you to perform a Build distclean first, because starting with a dirty build directory can cause a lot of grief, if you changed wxWidgets configuration between builds (just mentioning it, it is not the cause of the linking problem).

FWIW I just completed a build (ActivePerl, MSVC 2008 64 bit, wxWidgets trunk); there was a problem with the debug build (rather, the fact that since wxWidgets 2.9.1 there is no separate debug build anymore) but it should not affect you; the real problem (and fix) is described below.

D:\users\john_towers\.cpan\build\Alien-wxWidgets-0.51-8imsli>perl
Build.PL --wxWidgets-unicode --wxWidgets-mslu
A wxWidgets build seems to be in 'c:\wxWidgets-2.9.1', so it should be safe
to answer
'no' to the following question

Do you want to fetch and build wxWidgets from sources? [no ]
no
Creating new 'MYMETA.yml' with configuration results
Creating new 'Build' script for 'Alien-wxWidgets' version '0.51'

D:\users\john_towers\.cpan\build\Alien-wxWidgets-0.51-8imsli>perl Build
Building Alien-wxWidgets
compilet-1407254528.c
    Creating library C:\Tmp\compilet.lib and object C:\Tmp\compilet.exp
Build: blib\lib\Alien\wxWidgets.pm: cannot resolve L<Alien>  in paragraph 8.

D:\users\john_towers\.cpan\build\Alien-wxWidgets-0.51-8imsli>perl Build test
t\01_load.t .......... ok
t\zy_pod_coverage.t .. skipped: Test::Pod::Coverage 1.00 required for
testing POD coverage
t\zz_pod.t ........... ok
All tests successful.
Files=3, Tests=14,  1 wallclock secs ( 0.02 usr +  0.00 sys =  0.02 CPU)
Result: PASS

D:\users\john_towers\.cpan\build\Alien-wxWidgets-0.51-8imsli>perl Build
install
Building Alien-wxWidgets
compilet-1607925760.c
    Creating library C:\Tmp\compilet.lib and object C:\Tmp\compilet.exp
Files found in blib\arch: installing files in blib\lib into architecture
dependent library tree
Installing
C:\perl\site\lib\Alien\wxWidgets\Config\msw_2_9_0_uni_mslu_cl_8.pm
Installing
C:\perl\site\lib\Alien\wxWidgets\msw_2_9_0_uni_mslu_cl_8\include\wx\aboutdlg.h

<snip>

Installing
C:\perl\site\lib\Alien\wxWidgets\msw_2_9_0_uni_mslu_cl_8\lib\wxmsw29u_xrc.lib
Installing
C:\perl\site\lib\Alien\wxWidgets\msw_2_9_0_uni_mslu_cl_8\lib\wx\setup.h
Installing C:\perl\site\lib\Alien\wxWidgets.pm
Installing C:\perl\site\lib\Alien\wxWidgets\Utility.pm
Installing C:\perl\man\man3\Alien.wxWidgets.3
Installing C:\perl\man\man3\Alien.wxWidgets.Utility.3
Installing C:\perl\html\site\lib\Alien\wxWidgets.html
Installing C:\perl\html\site\lib\Alien\wxWidgets\Utility.html

D:\users\john_towers\.cpan\build\Alien-wxWidgets-0.51-8imsli>cd ..

D:\users\john_towers\.cpan\build>dir
  Volume in drive D is Working
  Volume Serial Number is 4846-9A7A

  Directory of D:\users\john_towers\.cpan\build

02/14/2011  03:17  PM<DIR>           .
02/14/2011  03:17  PM<DIR>           ..
02/14/2011  03:35  PM<DIR>           Alien-wxWidgets-0.51-8imsli
02/14/2011  03:17  PM<DIR>           Wx-0.98-JrW6pN
                0 File(s)              0 bytes
                4 Dir(s)  159,701,880,832 bytes free

D:\users\john_towers\.cpan\build>cd Wx-0.98-JrW6pN

D:\users\john_towers\.cpan\build\Wx-0.98-JrW6pN>perl
Makefile.PL --disable-stc --wx-unicode
compilet-686030848.c
    Creating library C:\Tmp\compilet.lib and object C:\Tmp\compilet.exp
Checking if your kit is complete...
Looks good
'WX' is not a known MakeMaker parameter name.
Writing Makefile for Wx::RichText
Writing Makefile for Wx::Print
Writing Makefile for Wx::DateTime
Writing Makefile for Wx::Html
Writing Makefile for Wx::Media

<snip>

cp Wx.pm blib\lib\Wx.pm
         C:\perl\bin\perl.exe script/wxperl_overload cpp\ovl_const.cpp
cpp\ovl_const.h overload.lst
Writing 'cpp\ovl_const.h'.
Writing 'cpp\ovl_const.cpp'.
         C:\perl\bin\perl.exe -MExtUtils::Command -e "touch" -- wxt_overload
         nmake -f Makefile all -nologo
         nmake -f Makefile all -nologo
cp lib/Wx/RichText.pm ..\..\blib\lib\Wx\RichText.pm
         C:\perl\bin\perl.exe
C:\perl\lib\ExtUtils\xsubpp  -noprototypes -nolinenumbers  -typemap
C:\perl\lib\ExtUtils\ty
pemap -typemap ..\..\typemap -typemap typemap  RichText.xs>  RichText.xsc&&
C:\perl\bin\perl.exe -MExtUtils::Command -e
  "mv" -- RichText.xsc RichText.c
         cl  -GF -TP /c /nologo /TP /MD /Zi /O2 /W4 /GR
/EHsc -c  -I. -I..\.. -Ic:\perl\site\lib\Alien\wxWidgets\msw_2_9_
0_uni_mslu_cl_8\lib 
-Ic:\perl\site\lib\Alien\wxWidgets\msw_2_9_0_uni_mslu_cl_8\include
   -nologo -GF -W3 -MD -Zi -DNDEBUG
  -O1 -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT 
-D_CRT_SECURE_NO_DEPRECATE
  -D_CRT_NONSTDC_NO_DEPRECATE -DPERL_IMPL
ICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -MD -Zi -DNDEBUG -O1    
-DVERSION=\"0.01\"
   -DXS_VERSION=\"0.01\"  "-IC:\p
erl\lib\CORE"  -DWXPL_EXT -DWIN32 -D__NO_VC_CRTDBG__ -D__WXMSW__ -DNDEBUG 
-D_UNICODE
  -DwxUSE_UNICODE_MSLU=1 -DWXUSINGDLL
  -D_WINDOWS -DNOPCH  -D_CRT_SECURE_NO_DEPRECATE RichText.c
cl : Command line warning D9025 : overriding '/W4' with '/W3'
cl : Command line warning D9025 : overriding '/O2' with '/O1'
RichText.c
Running Mkbootstrap for Wx::RichText ()
         C:\perl\bin\perl.exe -MExtUtils::Command -e "chmod" -- 644
RichText.bs
         C:\perl\bin\perl.exe -MExtUtils::Mksymlists  -e
"Mksymlists('NAME'=>\"Wx::RichText\", 'DLBASE' =>  'RichText', 'D
L_FUNCS' =>  {  }, 'FUNCLIST' =>  [], 'IMPORTS' =>  {  }, 'DL_VARS' =>  []);"
         link -out:..\..\blib\arch\auto\Wx\RichText\RichText.dll -dll -nologo
  -nodefaultlib -debug -opt:ref,icf  -libpath
:"c:\perl\lib\CORE"  -machine:x86 "/manifestdependency:type='Win32'
name='Microsoft.Windows.Common-Controls' version='6.
0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df'
language='*'" RichText.obj   C:\perl\lib\CORE\perl512
.lib
c:\perl\site\lib\Alien\wxWidgets\msw_2_9_0_uni_mslu_cl_8\lib\wxmsw29u_core.lib
c:\perl\site\lib\Alien\wxWidgets\msw
_2_9_0_uni_mslu_cl_8\lib\wxbase29u.lib "C:\Program Files\\Microsoft
SDKs\Windows\v6.0A\lib\unicows.lib" "C:\Program File
s\Microsoft Visual Studio 9.0\VC\lib\msvcprt.lib"
c:\perl\site\lib\Alien\wxWidgets\msw_2_9_0_uni_mslu_cl_8\lib\wxmsw29u_
richtext.lib
c:\perl\site\lib\Alien\wxWidgets\msw_2_9_0_uni_mslu_cl_8\lib\wxmsw29u_html.lib
c:\perl\site\lib\Alien\wxWid
gets\msw_2_9_0_uni_mslu_cl_8\lib\wxmsw29u_adv.lib
c:\perl\site\lib\Alien\wxWidgets\msw_2_9_0_uni_mslu_cl_8\lib\wxmsw29u_
core.lib
c:\perl\site\lib\Alien\wxWidgets\msw_2_9_0_uni_mslu_cl_8\lib\wxbase29u.lib
"C:\Program Files\Microsoft Visual S
tudio 9.0\VC\lib\oldnames.lib" "C:\Program Files\\Microsoft
SDKs\Windows\v6.0A\lib\kernel32.lib" "C:\Program Files\\Micr
osoft SDKs\Windows\v6.0A\lib\user32.lib" "C:\Program Files\\Microsoft
SDKs\Windows\v6.0A\lib\gdi32.lib" "C:\Program File
s\\Microsoft SDKs\Windows\v6.0A\lib\winspool.lib" "C:\Program
Files\\Microsoft SDKs\Windows\v6.0A\lib\comdlg32.lib" "C:\
Program Files\\Microsoft SDKs\Windows\v6.0A\lib\advapi32.lib" "C:\Program
Files\\Microsoft SDKs\Windows\v6.0A\lib\shell3
2.lib" "C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib\ole32.lib"
"C:\Program Files\\Microsoft SDKs\Windows\v6.0A\li
b\oleaut32.lib" "C:\Program Files\\Microsoft
SDKs\Windows\v6.0A\lib\netapi32.lib" "C:\Program Files\\Microsoft SDKs\Wind
ows\v6.0A\lib\uuid.lib" "C:\Program Files\\Microsoft
SDKs\Windows\v6.0A\lib\ws2_32.lib" "C:\Program Files\\Microsoft SDK
s\Windows\v6.0A\lib\mpr.lib" "C:\Program Files\\Microsoft
SDKs\Windows\v6.0A\lib\winmm.lib" "C:\Program Files\\Microsoft
  SDKs\Windows\v6.0A\lib\version.lib" "C:\Program Files\\Microsoft
SDKs\Windows\v6.0A\lib\odbc32.lib" "C:\Program Files\\
Microsoft SDKs\Windows\v6.0A\lib\odbccp32.lib" "C:\Program Files\\Microsoft
SDKs\Windows\v6.0A\lib\comctl32.lib" "C:\Pro
gram Files\Microsoft Visual Studio 9.0\VC\lib\msvcrt.lib" -def:RichText.def
RichText.obj : warning LNK4197: export '_boot_Wx__RichText' specified
multiple times; using first specification
    Creating library ..\..\blib\arch\auto\Wx\RichText\RichText.lib and object
..\..\blib\arch\auto\Wx\RichText\RichText.e
xp
RichText.obj : error LNK2001: unresolved external symbol "public: virtual
void * __thiscall wxWindow::GetHandle(void)con
st " (?GetHandle@wxWindow@@UBEPAXXZ)
RichText.obj : error LNK2001: unresolved external symbol "public: virtual
void __thiscall wxWindow::AssociateHandle(void
  *)" (?AssociateHandle@wxWindow@@UAEXPAX@Z)
RichText.obj : error LNK2001: unresolved external symbol "public: virtual
bool __thiscall wxWindow::ContainsHWND(void *)
const " (?ContainsHWND@wxWindow@@UBE_NPAX@Z)
RichText.obj : error LNK2001: unresolved external symbol "public: virtual
void * __thiscall wxWindow::MSWGetParent(void)
const " (?MSWGetParent@wxWindow@@UBEPAXXZ)
RichText.obj : error LNK2001: unresolved external symbol "public: virtual
class wxWindow * __thiscall wxWindow::CreateWi
ndowFromHWND(class wxWindow *,void *)"
(?CreateWindowFromHWND@wxWindow@@UAEPAV1@PAV1@PAX@Z)
RichText.obj : error LNK2001: unresolved external symbol "public: virtual
bool __thiscall wxWindow::MSWOnScroll(int,unsi
gned short,unsigned short,void *)" (?MSWOnScroll@wxWindow@@UAE_NHGGPAX@Z)
RichText.obj : error LNK2001: unresolved external symbol "public: virtual
void * __thiscall wxWindow::MSWGetBgBrushForCh
ild(void *,class wxWindow *)"
(?MSWGetBgBrushForChild@wxWindow@@UAEPAXPAXPAV1@@Z)
RichText.obj : error LNK2001: unresolved external symbol "public: virtual
bool __thiscall wxWindow::MSWPrintChild(void *
,class wxWindow *)" (?MSWPrintChild@wxWindow@@UAE_NPAXPAV1@@Z)
RichText.obj : error LNK2001: unresolved external symbol "public: virtual
bool __thiscall wxWindow::MSWEraseBgHook(void
*)" (?MSWEraseBgHook@wxWindow@@UAE_NPAX@Z)
RichText.obj : error LNK2001: unresolved external symbol "public: virtual
void * __thiscall wxControl::MSWControlColor(v
oid *,void *)" (?MSWControlColor@wxControl@@UAEPAXPAX0@Z)
RichText.obj : error LNK2001: unresolved external symbol "protected: virtual
void * __thiscall wxControl::DoMSWControlCo
lor(void *,class wxColour,void *)"
(?DoMSWControlColor@wxControl@@MAEPAXPAXVwxColour@@0@Z)
RichText.obj : error LNK2001: unresolved external symbol "protected: virtual
void * __thiscall wxRichTextCtrl::GetEditHW
ND(void)const " (?GetEditHWND@wxRichTextCtrl@@MBEPAXXZ)
RichText.obj : error LNK2001: unresolved external symbol "public: virtual
void * __thiscall wxTopLevelWindowMSW::MSWGetP
arent(void)const " (?MSWGetParent@wxTopLevelWindowMSW@@UBEPAXXZ)
..\..\blib\arch\auto\Wx\RichText\RichText.dll : fatal error LNK1120: 13
unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio
9.0\VC\BIN\link.EXE"' : return code '0x460'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio
9.0\VC\BIN\nmake.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio
9.0\VC\BIN\nmake.EXE"' : return code '0x2'
Stop.

To fix this, add #undef NO_STRICT ad the top of cpp/wxapi.h (together with the #define STRICT).

D:\users\john_towers\.cpan\build\Wx-0.98-JrW6pN>

========================================================

As you can see, I didn't get the message about copying the header files,
but the link error persists.

Note: I misremembered that building Alien::wxWidgets against an already build wxWidgets did not copy headers/libraries inside the Perl directory; Alien::wxWidgets always copies headers/libraries to blib, and then installs them to the Perl directory during install.

Since the build directory is dirty, you don't see the copy to blib, but only see the copy during install:

> Files found in blib\arch: installing files in blib\lib into architecture
> dependent library tree
> Installing
> C:\perl\site\lib\Alien\wxWidgets\Config\msw_2_9_0_uni_mslu_cl_8.pm
> Installing
> C:\perl\site\lib\Alien\wxWidgets\msw_2_9_0_uni_mslu_cl_8\include\wx\aboutdlg.h
> Installing
> C:\perl\site\lib\Alien\wxWidgets\msw_2_9_0_uni_mslu_cl_8\include\wx\accel.h

Regards,
Mattia

Reply via email to