Building pgadmin3 on Windows 7

From: Adam Scott <adam(dot)c(dot)scott(at)gmail(dot)com>
To: pgadmin-hackers(at)postgresql(dot)org
Subject: Building pgadmin3 on Windows 7
Date: 2010-11-08 05:21:52
Message-ID: AANLkTikBCXaCu2aax3qy7Xa=P4YNxX6R0uiqfssbLsW2@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Building pgAdmin3 on Windows Corrections and Help Needed

Newbie here trying to build pgAdmin3 using wxWidgets 2.8.11 using Visual
Studio Express 2008. (The INSTALL file indicates Microsoft Visual C++ 2008
is required; in keeping with the spirit of open source I'm trying to get
this working using VSE 2008). I also have a 64-bit system if that's
relevant.

Corrections
Using the instructions found in the INSTALL file at the root of pgadmin3
source I noticed a step is required after step 2:

" Next, from within Visual C++, open %WXWIN%\build\msw\wx.dsw and select
"Batch Build" from the "Build" menu. Click on "Configuration" to sort by
that column, and check off all projects with configuration "Unicode
Debug"
and "Unicode Release". Click "Build"."

* Correction extra step required: You also need to build contrib/build/stc
and contrib/build/ogl

* Also, to get pgAdmin3 to compile i had to change the Additional Library
Directories by
- right-click on pgAdmin3 in Solution tree
- Under Configuration Properties, Link, General, I had to rename
$(PGDIR)/libxml/lib to $(PGDIR)/libxml2/lib

Need Help

That said, I'm fully down the rabbit hole; everything's compiling. But when
I get to linking pgAdmin3 I encounter 558 errors which all look related to
183 unresolved externals to wxWidgets.

First Error: wxbase28ud.lib(strconv.obj) : error LNK2005: "class
wxMBConvUTF32BE wxConvUTF32BE" (?wxConvUTF32BE@@3VwxMBConvUTF32BE@@A)
already defined in utffile.obj

Any thoughts? This looks like a wxWidgets issue. If you have suggestion
that would be great. Otherwise let's get to the next set of errors. :)

Other Errors:
It looks like it's trying to find a DLL as shown by the first of the many
unresolved external errors:

dlgRepSubscription.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport) public: static int __cdecl
wxXmlResource::GetXRCID(wchar_t const *,int)"

The INSTALL file in the pgAdmin3 source indicated to use Unicode Release and
Debug configurations when building wxWidgets. These configurations output
.lib files not .dll files.

I'm guessing we want pgAdmin3 to statically link, so this error for an
unresolved external to dll is strange. Now, I know the symbol is in the
.lib and the .lib is in the pgAdmin3 build path. Here's the command line
for the linker that Visual Studio 2008

/OUT:".\Debug/pgAdmin3.exe" /INCREMENTAL /NOLOGO
/LIBPATH:"C:\wxWidgets-2.8.11/lib/vc_lib" /LIBPATH:"C:\Program Files
(x86)\PostgreSQL\8.4/lib" /LIBPATH:"C:\pgbuild/libxml2/lib"
/LIBPATH:"C:\pgbuild/libxslt/lib" /LIBPATH:"C:\pgbuild/iconv/lib" /MANIFEST
/MANIFESTFILE:".\Debug\pgAdmin3.exe.intermediate.manifest"
/MANIFESTUAC:"level='asInvoker' uiAccess='false'" /NODEFAULTLIB:"libcd.lib"
/NODEFAULTLIB:"libcid.lib" /NODEFAULTLIB:"msvcrt.lib" /DEBUG
/PDB:".\Debug/pgAdmin3.pdb" /MAP:".\Debug/pgAdmin3.map" /SUBSYSTEM:WINDOWS
/DYNAMICBASE:NO /MACHINE:X86 /ERRORREPORT:PROMPT wxbase28ud.lib
wxbase28ud_xml.lib wxbase28ud_net.lib wxmsw28ud_adv.lib wxmsw28ud_core.lib
wxmsw28ud_html.lib wxmsw28ud_aui.lib wxregexud.lib wxpngd.lib wxzlibd.lib
wxjpegd.lib wxtiffd.lib wxmsw28ud_stc.lib wxmsw28ud_ogl.lib
wxmsw28ud_xrc.lib wxexpatd.lib libpq.lib libxml2.lib libxslt.lib iconv_a.lib
comctl32.lib rpcrt4.lib wsock32.lib winmm.lib kernel32.lib user32.lib
gdi32.lib winspool.lib comdlg32.lib advapi32.lib oleaut32.lib ole32.lib
shell32.lib odbc32.lib kernel32.lib user32.lib gdi32.lib winspool.lib
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib
odbc32.lib odbccp32.lib

The GetXRCID is in the library wxmsw28ud_xrc.lib which does exist. I'm
focusing on the GetXRCID as it looks like something to do with resources
which I'm guessing is a parent dependency for everything and may be will
clear up other errors once fixed.

Any help is appreciated.

Thanks,
Adam

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message pgAdmin Trac 2010-11-08 15:14:43 [pgAdmin III] #275: Review of the export dialog
Previous Message pgAdmin Trac 2010-11-07 19:50:58 Re: [pgAdmin III] #256: Add triggers on views support