Thanks Dave. I figured out how to do this. I first built a static version of
libeay32 and ssleay32 using ms\nt.mak (added /Zi and removed /Wx in CFLAGS).
I then created an empty VS2005 project and added apps\req.c apps\apps.c
apps\app_rand.c to the project (I had to look into req utility, similar
would be the procedure for other tools). I then linked libeay and ssleay to
the project. Now everything built fine. But as you said, I am able to
break/stepinto/display but cannot do a go-to-defn of any OpenSSL API from my
project. When I say go-to-def, it always points to the prototype declaration
in a .h file.
Thanks,
Sandeep


On Tue, Oct 20, 2009 at 6:21 PM, Dave Thompson <
dave.thomp...@princetonpayments.com> wrote:

> >       From: owner-openssl-us...@openssl.org On Behalf Of sandeep kiran p
> >       Sent: Saturday, 17 October, 2009 02:12
>
> >       Can someone point me to the instructions that are needed to build
> > and debug OpenSSL using Visual Studio on windows? I want to navigate
> > through the code for the 'openssl req' command using VS. I've built a
> > debug version (both static and dynamic) of OpenSSL as per the instruction
> > in INSTALL.W32 doc. I have found an earlier post on a similar topic
> > http://www.mail-archive.com/openssl-users@openssl.org/msg56791.html .
> > But it just describes building a debug variant.
>
> >       The question here is, do I need to create a new VS project
> comprising
> > of apps/openssl.c and link libeay32.lib and ssleay32.lib libraries that
> > I have built earlier? When I did this, I see a lot of unresolved external
> > symbols (_prime_main, _ocsp_main etc) when building  the solution. Is
> there
> > any documented procedure for accomplishing what I intend to?
>
> I don't know about documented.
>
> If you want to compile the apps/* code in VS, I think you need to
> do the whole directory; openssl.c is just a dispatcher that calls
> the other 'commands'. If you're using dynamic, I think you need
> (a copy of?) ms\applink.c also. But remember the 'apps' mostly just
> wrap the -lcrypto and/or -lssl routines, so if you need to look at
> much of what is going on, you'll probably need to debug them too.
> Unless you only want to look at API-level results.
>
> The last time I did this, 0.9.8g on VC++6.0 (yes, a while ago),
> I did commandline (nmake) build of everything including apps,
> except I manually added /Zi /Yd to cflags in nt*.mak (they used to
> be in util/pl/VC-32.pl but seem to have gotten lost somewhere);
> then I created a VS console-exe project with nothing in it, but
> in ProjectSettings Debug specified my executable (from the dir
> which also contains the .pdb, and the .dll and .pdb if not static).
> I could break/step/display fine, but go-to-defn etc. didn't work.
>
>
>
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> User Support Mailing List                    openssl-users@openssl.org
> Automated List Manager                           majord...@openssl.org
>

Reply via email to