Thread: Compilation on Windows
Dear all, I am trying to build 1.2.0 beta1 on Windows XP with MSVC++ 6.0 and after a while am almost there (I think). Everything compiles fine, but linking fails with the following error pgAdmin3.obj : error LNK2001: unresolved external symbol _SSL_version_str Unicode_SSL_Release/pgAdmin3.exe : fatal error LNK1120: 1 unresolved externals The SSL_version_str is defined in ssl/ssl_lib.c in the OpenSSL (0.9.7d) source, but it apparently does not get exported in ssleay32.lib or in libeay32.lib by the OpenSSL VC-WIN32 build process. So my question is: Am I missing something or is there anything special I need to take care of when building OpenSSL for use with pgAdmin III? Cheers, Alex
> -----Original Message----- > From: pgadmin-hackers-owner@postgresql.org > [mailto:pgadmin-hackers-owner@postgresql.org] On Behalf Of > Alexander Borkowski > Sent: 22 September 2004 04:53 > To: pgadmin-hackers@postgresql.org > Subject: [pgadmin-hackers] Compilation on Windows > > Dear all, > > I am trying to build 1.2.0 beta1 on Windows XP with MSVC++ > 6.0 and after a while am almost there (I think). Everything > compiles fine, but linking fails with the following error > > pgAdmin3.obj : error LNK2001: unresolved external symbol > _SSL_version_str Unicode_SSL_Release/pgAdmin3.exe : fatal > error LNK1120: 1 unresolved externals > > The SSL_version_str is defined in ssl/ssl_lib.c in the > OpenSSL (0.9.7d) source, but it apparently does not get > exported in ssleay32.lib or in libeay32.lib by the OpenSSL > VC-WIN32 build process. So my question is: > Am I missing something or is there anything special I need to > take care of when building OpenSSL for use with pgAdmin III? I've run into that before - you need to use the static SSL libs, not the import libs for the dll. They do (should) contain that symbol. You can download the precompiled versions of the SSL and libpq libs from http://www.pgadmin.org/snapshots/postgresql/libs-win32-20040906.zip if you don't want to build them yourself. Regards, Dave.
Dave Page wrote: [SSL_version_str symbol missing] > I've run into that before - you need to use the static SSL libs, not the > import libs for the dll. They do (should) contain that symbol. Ah, so one has to use ms/nt.mak instead of ms/ntdll.mak to build the static version of the libraries (which in my case too contain that symbol and hence solve the problem). I should have read the build instructions for OpenSSL more thoroughly. Thank you very much for that hint. > You can download the precompiled versions of the SSL and libpq libs from > http://www.pgadmin.org/snapshots/postgresql/libs-win32-20040906.zip if > you don't want to build them yourself. A look at that file solves another one of my pitfalls: Only two of the PostgreSQL headers are really being used. In the VC project file you provide, "c:/postgresql/include" comes before the pgAdmin "include/" in the include path. I had a full PostgreSQL source tree in that place and compilation of src/db/keywords.c failed because nodes/parsenodes.h and parser/keywords.h from the PostgreSQL source and not the ones from the pgAdmin source were found first. I resolved the issue by rearranging the include path, but with only the two headers from that ZIP archive in place this would never have happened. I am currently writing a "How to build pgAdmin III from source on Windows"-like document for in house use. Are you interested in something like that and if so what is the best way for me to contribute this to the pgAdmin documentation? Thanks again, Alex
> -----Original Message----- > From: Alexander Borkowski > [mailto:alexander.borkowski@abri.une.edu.au] > Sent: 23 September 2004 09:36 > To: pgadmin-hackers@postgresql.org; Dave Page > Subject: Re: [pgadmin-hackers] Compilation on Windows > > I am currently writing a "How to build pgAdmin III from > source on Windows"-like document for in house use. Are you > interested in something like that and if so what is the best > way for me to contribute this to the pgAdmin documentation? Always interested in more docs - plain text or HTML formatted to match the rest of the pgAdmin docs would be great. Regards, Dave.