unresolved external symbol using msvc tools

I can’t seem to get the wxwidgets core dll to link no matter what. Compiling goes fine up until a certain point, then the call to link that is supposed to produce wxmsw28uh_core_vc.dll fails with an unresolved external symbol error:

link /DLL /NOLOGO /OUT:…\lib\vc_dll\wxmsw28uh_core_vc.dll /pdb:"…

…\lib\vc_dll\wxmsw28uh_core_vc.pdb" /LIBPATH:…\lib\vc_dll @C:\Users\mike

\AppData\Local\Temp\nmB37A.tmp

Creating library …\lib\vc_dll\wxmsw28uh_core.lib and object …\lib\vc_

dll\wxmsw28uh_core.exp

coredll_dcpsg.obj : error LNK2019: unresolved external symbol "public: __thiscal

l wxGenericPageSetupDialog::wxGenericPageSetupDialog(class wxWindow *,class wxPa

geSetupDialogData *)" (??0wxGenericPageSetupDialog@@QAE@PAVwxWindow@@PAVwxPageSe

tupDialogData@@@Z) referenced in function "public: void __thiscall wxGenericPage

SetupDialog::`default constructor closure’(void)" (??_FwxGenericPageSetupDialog@

@QAEXXZ)

…\lib\vc_dll\wxmsw28uh_core_vc.dll : fatal error LNK1120: 1 unresolved exter

nals

NMAKE : fatal error U1077: ‘link’ : return code ‘0x460’

Stop.

For reference, my INCLUDE, LIB, and PATH variables look like this:

LIB = %WXWIN%\lib\vc_dll;%WXWIN%\contrib\lib;%WXWIN%\build\msw\vc_mswuhdll;C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib;C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\lib;C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE

INCLUDE = %WXWIN%\lib\vc_dll\mswuh;%WXWIN%\include;%WXWIN%\contrib\include;C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include;C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\include

PATH = C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin;C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\bin;C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE;%WXWIN%\lib\vc_dll;C:\Windows\system32;C:\Windows…

Any help would be greatly appreciated.

-Mike

Michael Haimes wrote:

I can't seem to get the wxwidgets core dll to link no matter what. Compiling goes fine up until a certain point, then the call to link that is supposed to produce wxmsw28uh_core_vc.dll fails with an unresolved external symbol error:

        link /DLL /NOLOGO /OUT:..\..\lib\vc_dll\wxmsw28uh_core_vc.dll /pdb:"..
\..\lib\vc_dll\wxmsw28uh_core_vc.pdb" /LIBPATH:..\..\lib\vc_dll @C:\Users\mike
\AppData\Local\Temp\nmB37A.tmp
   Creating library ..\..\lib\vc_dll\wxmsw28uh_core.lib and object ..\..\lib\vc_
dll\wxmsw28uh_core.exp
coredll_dcpsg.obj : error LNK2019: unresolved external symbol "public: __thiscal
l wxGenericPageSetupDialog::wxGenericPageSetupDialog(class wxWindow *,class wxPa
geSetupDialogData *)" (??0wxGenericPageSetupDialog@@QAE@PAVwxWindow@@PAVwxPageSe
tupDialogData@@@Z) referenced in function "public: void __thiscall wxGenericPage
SetupDialog::`default constructor closure'(void)" (??_FwxGenericPageSetupDialog@
@QAEXXZ)
..\..\lib\vc_dll\wxmsw28uh_core_vc.dll : fatal error LNK1120: 1 unresolved exter
nals

Did you copy and edit the include/wx/msw/setup.h file as described here: http://wxpython.org/builddoc.php? If so did you do a full clean and rebuild afterwards?

···

--
Robin Dunn
Software Craftsman

yeah, been reading that page over and over again to see if i missed something, and anytime i make changes i do a clean and rebuild… as far as I can tell I’m following the “do it manually from the windows shell” instructions exactly, except I had to beef out my LIB/INCLUDE environment variables quite a bit more than described just to get the compiling steps to go forward. That’s why I included them in case they were wrong.

-Mike

···

On Mon, May 11, 2009 at 8:18 PM, Robin Dunn robin@alldunn.com wrote:

Michael Haimes wrote:

I can’t seem to get the wxwidgets core dll to link no matter what. Compiling goes fine up until a certain point, then the call to link that is supposed to produce wxmsw28uh_core_vc.dll fails with an unresolved external symbol error:

    link /DLL /NOLOGO /OUT:..\..\lib\vc_dll\wxmsw28uh_core_vc.dll   /pdb:"..

..\lib\vc_dll\wxmsw28uh_core_vc.pdb" /LIBPATH:…..\lib\vc_dll @C:\Users\mike

\AppData\Local\Temp\nmB37A.tmp

Creating library …..\lib\vc_dll\wxmsw28uh_core.lib and object …..\lib\vc_

dll\wxmsw28uh_core.exp

coredll_dcpsg.obj : error LNK2019: unresolved external symbol "public: __thiscal

l wxGenericPageSetupDialog::wxGenericPageSetupDialog(class wxWindow *,class wxPa

geSetupDialogData *)" (??0wxGenericPageSetupDialog@@QAE@PAVwxWindow@@PAVwxPageSe

tupDialogData@@@Z) referenced in function "public: void __thiscall wxGenericPage

SetupDialog::`default constructor closure’(void)" (??_FwxGenericPageSetupDialog@

@QAEXXZ)

…..\lib\vc_dll\wxmsw28uh_core_vc.dll : fatal error LNK1120: 1 unresolved exter

nals

Did you copy and edit the include/wx/msw/setup.h file as described here: http://wxpython.org/builddoc.php? If so did you do a full clean and rebuild afterwards?

Robin Dunn

Software Craftsman

http://wxPython.org


wxpython-users mailing list

wxpython-users@lists.wxwidgets.org

http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

As an exercise in trying to figure out the msw build system, I’ve been trying to write my own build script in python. I’m essentially copying the “by hand” instructions into a python script. you should be able to reproduce what I’m doing by sticking this right at the root (“%WXWIN%”), and running python build-win.py. This script produces that failure on my machine (note you can do a full clean by running python build-win.py clean)

http://dl.getdropbox.com/u/100516/build-win.py

-Mike

···

On Mon, May 11, 2009 at 10:04 PM, Michael Haimes michael.haimes@gmail.com wrote:

yeah, been reading that page over and over again to see if i missed something, and anytime i make changes i do a clean and rebuild… as far as I can tell I’m following the “do it manually from the windows shell” instructions exactly, except I had to beef out my LIB/INCLUDE environment variables quite a bit more than described just to get the compiling steps to go forward. That’s why I included them in case they were wrong.

-Mike

On Mon, May 11, 2009 at 8:18 PM, Robin Dunn robin@alldunn.com wrote:

Michael Haimes wrote:

I can’t seem to get the wxwidgets core dll to link no matter what. Compiling goes fine up until a certain point, then the call to link that is supposed to produce wxmsw28uh_core_vc.dll fails with an unresolved external symbol error:

    link /DLL /NOLOGO /OUT:..\..\lib\vc_dll\wxmsw28uh_core_vc.dll   /pdb:"..

..\lib\vc_dll\wxmsw28uh_core_vc.pdb" /LIBPATH:…..\lib\vc_dll @C:\Users\mike

\AppData\Local\Temp\nmB37A.tmp

Creating library …..\lib\vc_dll\wxmsw28uh_core.lib and object …..\lib\vc_

dll\wxmsw28uh_core.exp

coredll_dcpsg.obj : error LNK2019: unresolved external symbol "public: __thiscal

l wxGenericPageSetupDialog::wxGenericPageSetupDialog(class wxWindow *,class wxPa

geSetupDialogData *)" (??0wxGenericPageSetupDialog@@QAE@PAVwxWindow@@PAVwxPageSe

tupDialogData@@@Z) referenced in function "public: void __thiscall wxGenericPage

SetupDialog::`default constructor closure’(void)" (??_FwxGenericPageSetupDialog@

@QAEXXZ)

…..\lib\vc_dll\wxmsw28uh_core_vc.dll : fatal error LNK1120: 1 unresolved exter

nals

Did you copy and edit the include/wx/msw/setup.h file as described here: http://wxpython.org/builddoc.php? If so did you do a full clean and rebuild afterwards?

Robin Dunn

Software Craftsman

http://wxPython.org


wxpython-users mailing list

wxpython-users@lists.wxwidgets.org

http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

Michael Haimes wrote:

yeah, been reading that page over and over again to see if i missed something, and anytime i make changes i do a clean and rebuild... as far as I can tell I'm following the "do it manually from the windows shell" instructions exactly, except I had to beef out my LIB/INCLUDE environment variables quite a bit more than described just to get the compiling steps to go forward. That's why I included them in case they were wrong.

Sorry I didn't even pay attention to them in the last mail... It shouldn't hurt to have them set like that but I don't need any wx folders in my INCLUDE and LIB vars at all so maybe that is another symptom of whatever the problem is... IOW, the fact that you needed to add the wx folders to INCLUDE and LIB is a clue to whatever the real problem is.

Anyway, if wxUSE_POSTSCRIPT and wxUSE_PRINTING_ARCHITECTURE are set to 1 in your setup.h then those symbols that are reported as missing really should be there.

Here are my INCLUDE and LIB in case it helps. I don't think I've done anything with them since I installed VisStudio, other than add them to the script I use to switch the environment between different versions of the compiler.

LIB='C:\Tools\VisStudio7\VC7\ATLMFC\LIB;C:\Tools\VisStudio7\VC7\LIB;C:\Tools\VisStudio7\VC7\PlatformSDK\lib\prerelease;C:\Tools\VisStudio7\VC7\PlatformSDK\lib;C:\Tools\VisStudio7\SDK\v1.1\lib;'
INCLUDE='C:\Tools\VisStudio7\VC7\ATLMFC\INCLUDE;C:\Tools\VisStudio7\VC7\INCLUDE;C:\Tools\VisStudio7\VC7\PlatformSDK\include\prerelease;C:\Tools\VisStudio7\VC7\PlatformSDK\include;C:\Tools\VisStudio7\SDK\v1.1\include;'

···

--
Robin Dunn
Software Craftsman

Michael Haimes wrote:

As an exercise in trying to figure out the msw build system, I've been trying to write my own build script in python. I'm essentially copying the "by hand" instructions into a python script. you should be able to reproduce what I'm doing by sticking this right at the root ("%WXWIN%"), and running python build-win.py. This script produces that failure on my machine (note you can do a full clean by running python build-win.py clean)

http://dl.getdropbox.com/u/100516/build-win.py

As a side note: Kevin and I (mostly Kevin) have done something similar in 2.9 and the build of both wxWidgets and wxPython is now done there by a pair of python scripts. I haven't tried running it in 2.8 however so there are probably some things that won't work quite right.

Take a look at how your script is editing setup.h, it ends up changing the names of some values where there is overlap. For example you are changing "wxUSE_UNICODE_MSLU 0" to "wxUSE_UNICODE 1" and "wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW 1" to " wxUSE_POSTSCRIPT 1"

···

--
Robin Dunn
Software Craftsman

ah of course that’s what it is. that’s what I get for being too lazy to install a diff tool on windows!! sorry to make you debug that one , things are working great now.

I’d be curious to see the script you guys are working on. I’m working on getting a lighter weight wxpython built on all platforms, so I’m trying to make a place where i can configure the parts of wxwidgets/wxpython i need in one place and have each platform respect it (i.e. the mac/linux one picks the appropriate configure flags and the windows will pick the appropriate defines)

-Mike

···

On Tue, May 12, 2009 at 11:43 AM, Robin Dunn robin@alldunn.com wrote:

Michael Haimes wrote:

As an exercise in trying to figure out the msw build system, I’ve been trying to write my own build script in python. I’m essentially copying the “by hand” instructions into a python script. you should be able to reproduce what I’m doing by sticking this right at the root (“%WXWIN%”), and running python build-win.py. This script produces that failure on my machine (note you can do a full clean by running python build-win.py clean)

http://dl.getdropbox.com/u/100516/build-win.py

As a side note: Kevin and I (mostly Kevin) have done something similar in 2.9 and the build of both wxWidgets and wxPython is now done there by a pair of python scripts. I haven’t tried running it in 2.8 however so there are probably some things that won’t work quite right.

Take a look at how your script is editing setup.h, it ends up changing the names of some values where there is overlap. For example you are changing “wxUSE_UNICODE_MSLU 0” to “wxUSE_UNICODE 1” and “wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW 1” to " wxUSE_POSTSCRIPT 1"

Robin Dunn

Software Craftsman

http://wxPython.org


wxpython-users mailing list

wxpython-users@lists.wxwidgets.org

http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

Michael Haimes wrote:

ah of course that's what it is. that's what I get for being too lazy to install a diff tool on windows!! sorry to make you debug that one , things are working great now.

I'd be curious to see the script you guys are working on. I'm working on getting a lighter weight wxpython built on all platforms, so I'm trying to make a place where i can configure the parts of wxwidgets/wxpython i need in one place and have each platform respect it (i.e. the mac/linux one picks the appropriate configure flags and the windows will pick the appropriate defines)

It's in the svn repository in the trunk. There is a script for wxPython and another for wxWidgets.

···

--
Robin Dunn
Software Craftsman