My experience with buliding 2.6.3 on XP with MSVC++ Express
63q2o4i02 at sneakemail.com
63q2o4i02 at sneakemail.com
Sun Aug 13 12:55:19 PDT 2006
wxWidgets 2.6.3, XP SP2, MSVC++ Express
I wanted to post my recent experiences with trying to build wxWidgets
2.6.3. I'm not actually done yet, but I wanted to write stuff down in
case I forgot, and in case this might help someone in a similar
predicament.
Actually I started trying to build 2.7.0 but i was having lots of
trouble with libraries linking and sql.h missing, so I went to 2.6.3,
thinking maybe the projects and stuff were set up differently or
something. I'm delibrately trying to make as FEW changes to the
projects as possible. With 18 projects, each with 16 configurations,
that's a LOT of options to make sure are consistent from one to the
other. I have some faith the projcets are set up "enough" that I don't
need to mess with them.
Anyway, I installed MSVC++ Express, then the SDK, and followed the
instructions to make sure VC++ Express saw the SDK directories. I
installed wx 2.6.3 exe file and opened up the .dsw file from build/msw.
I also tried upgrading my SDK installation to add everything
available, thinking maybe sql.h was included, but it got hung up on the
install with some 3MB file and I killed it.
With my prior bad experience with trying to build 2.7.0, I decided to
try building the projects one at a time, initally using just the Debug
configuration, and after realizing what was going on, building the
solution entirely, using a specific configuration. Previously I'd had
trouble with odbc.lib (I found it someplace on my drive from a
different app and placed it in with the other libs somplace) and with
sql.h not being present. I don't plan on doing any sql apps, so I
figured out that I could disable ODBC in a few of the setup.h files.
Turns out ODBC was enabled in some setup.h files and disabled in
others. This would explain why some of the 2.7.0 configurations DID
build, but others did not.
I also realized as I was building the projects one by one that (duh)
some are dependent on others. Previously with 2.7.0 I'd tried doing a
batch build, expecting it to go smoothly like when I tried it a few
years ago with 2.1 or something, and it really did just work out of the
box. Also, I did manage to find a sql.h file somewhere online, but I
didn't add it in, figuring there's probably other systemic stuff
that'll prevent the odbc project from building. Can someone tell me
what's the "correct" way to get the ODBC stuff to compile?
Also, what is the Universal configuration? I didn't see that described
anywhere.
Anyway, another thing I found is the project dependencies and/or
ordering in MSVC++ Express either doesn't work right, or it's not set
up right, or I just don't know how to use it. Not unlike trying to
build a TeX document, for any given configuration, I had to build the
solution several times, with each iteration finding the previous
iteration's .lib files, and one or more additional projects thus
linking properly. I think if I could get the dependency checking
and/or build ordering to work, I'd only have to build it once. I would
have thought this would be already setup in the distribution. Who
knows, maybe it works properly in the full-commercial version of MSVC.
At any rate, since I didn't remove the odbc project from the solution,
and since I'd disabled wxUSE_ODBC in all my setup.h files, the
iterative process converged on having odbc...lib missing each time.
Will the wx libraries compile without odbc.lib in place? Seems I'm
getting the main wx libraries built, so I don't get it...
I got tired of selecting each configuration manually, and after finally
figuring out the pattern, decided to go through with a batch build,
with everything selected. I figured the first pass should get all the
.obj files in place, and the sebsequent passes should eventually
converge on just missing the odbc library for each configuration.
What I've never quite understood is how the .libs from each projects
come together to form "the" wx library for any given configuration.
Are the projects (eg adv, base, core, etc) all individual libraries
that are linked to form a single super-library? Or are the individual
projects linked in as needed when you build your app? Is there a way
to reduce the size of your app by removing unused classes, functions,
etc?
Anyway, I'd appreciate any comments on this. I also hope this was able
to help someone.
thanks
Michael
-------
A few minutes go by while writing this, and all the batch build
iterations converge with the followng (summarized) errors:
------ Build started: Project: dbgrid, Configuration: DLL Universal
Debug Win32 ------
LINK : fatal error LNK1104: cannot open file
'..\..\lib\vc_dll\wxbase26d_odbc.lib'
LINK : fatal error LNK1181: cannot open input file
'..\..\lib\vc_dll\wxbase26u_odbc.lib'
LINK : fatal error LNK1104: cannot open file
'..\..\lib\vc_dll\wxbase26ud_odbc.lib'
LINK : fatal error LNK1104: cannot open file
'..\..\lib\vc_dll\wxbase26d_odbc.lib'
LINK : fatal error LNK1181: cannot open input file
'..\..\lib\vc_dll\wxbase26u_odbc.lib'
LINK : fatal error LNK1104: cannot open file
'..\..\lib\vc_dll\wxbase26ud_odbc.lib'
LINK : fatal error LNK1181: cannot open input file
'..\..\lib\vc_dll\wxbase26_odbc.lib'
LINK : fatal error LNK1181: cannot open input file
'..\..\lib\vc_dll\wxbase26_odbc.lib'
------ Build started: Project: qa, Configuration: DLL Unicode Debug
Win32 ------
Creating library ..\..\lib\vc_dll\wxmsw26ud_qa.lib and object
..\..\lib\vc_dll\wxmsw26ud_qa.exp
debugrpt.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: unsigned int __thiscall
wxStackFrameBase::GetLine(void)const "
(__imp_?GetLine at wxStackFrameBase@@QBEIXZ) referenced in function
"protected: virtual void __thiscall XmlStackWalker::OnStackFrame(class
wxStackFrame const &)"
(?OnStackFrame at XmlStackWalker@@MAEXABVwxStackFrame@@@Z)
debugrpt.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: class wxString __thisc
debugrpt.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: bool __thiscall wxStac
debugrpt.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: unsigned int __thiscal
debugrpt.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: class wxString __thisc
debugrpt.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: unsigned int __thiscal
debugrpt.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: virtual void __thiscal
debugrpt.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: virtual void __thiscal
debugrpt.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: __thiscall wxStackWalk
debugrpt.obj : error LNK2001: unresolved external symbol "public:
virtual void __thiscall wxStackWalker::Walk(
debugrpt.obj : error LNK2001: unresolved external symbol "public:
virtual void __thiscall wxStackWalker::WalkF
debugrpt.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: virtual __thiscall wxS
..\..\lib\vc_dll\wxmsw26ud_qa_vc_custom.dll : fatal error LNK1120: 12
unresolved externals
Build log was saved at
"file://c:\wxWidgets-2.6.3\build\msw\vc_mswuddll\qa\BuildLog.htm"
qa - 13 error(s), 0 warning(s)
------ Build started: Project: qa, Configuration: DLL Debug Win32
------
Creating library ..\..\lib\vc_dll\wxmsw26d_qa.lib and object
..\..\lib\vc_dll\wxmsw26d_qa.exp
debugrpt.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: unsigned int __thiscall
wxStackFrameBase::GetLine(void)const "
(__imp_?GetLine at wxStackFrameBase@@QBEIXZ) referenced in function
"protected: virtual void __thiscall XmlStackWalker::OnStackFrame(class
wxStackFrame const &)"
(?OnStackFrame at XmlStackWalker@@MAEXABVwxStackFrame@@@Z)
debugrpt.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: class wxString __thisc)
debugrpt.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: bool __thiscall wxStac
debugrpt.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: unsigned int __thiscal
debugrpt.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: class wxString __thisc
debugrpt.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: unsigned int __thiscal
debugrpt.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: virtual void __thiscal
debugrpt.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: virtual void __thiscal
debugrpt.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: __thiscall wxStackWalk
debugrpt.obj : error LNK2001: unresolved external symbol "public:
virtual void __thiscall wxStackWalker::Walk(
debugrpt.obj : error LNK2001: unresolved external symbol "public:
virtual void __thiscall wxStackWalker::WalkF
debugrpt.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: virtual __thiscall wxS
..\..\lib\vc_dll\wxmsw26d_qa_vc_custom.dll : fatal error LNK1120: 12
unresolved externals
Build log was saved at
"file://c:\wxWidgets-2.6.3\build\msw\vc_mswddll\qa\BuildLog.htm"
qa - 13 error(s), 0 warning(s)
========== Build: 0 succeeded, 10 failed, 278 up-to-date, 0 skipped
==========
More information about the wx-users
mailing list