libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libmicrohttpd] Trying to get the hellobrowser example to work


From: Christian Grothoff
Subject: Re: [libmicrohttpd] Trying to get the hellobrowser example to work
Date: Wed, 27 May 2009 09:34:20 -0600
User-agent: KMail/1.11.2 (Linux/2.6.26-1-686; KDE/4.2.2; i686; ; )

On Monday 25 May 2009 06:13:14 pm Lance Lefebure wrote:
> > Uh uh.  There's a bunch of problems right here.  You're not supposed to
> > directly use platform.h or MHD_config.h.  The idea is that you use your
> > build system to generate files that produce the right #include's for your
> > target platform.  Now, if you're not worried about broad portability, you
> > can likely just copy (some) of the #include's from platform.h and have
> > them in your code before you #include <microhttpd.h>.  Using
> > MHD_config.h.in is wrong in any case since that file needs to be
> > processed by configure.ac (if you take the resutling MHD_config.h, it
> > should work -- for the specific platform where you compiled MHD, which is
> > not necessarily what you want).
>
> Ah, that makes more sense now. I re-read the tutorial, ran ./configure,
> make, and make install, and then built the examples via command line.
>
> Then I tried the examples in Kdevelop, but it wasn't finding the library to
> link. I found this can be resolved by adding "yourappname_LDADD =
> /usr/local/lib/libmicrohttpd.so.5" to the /src/Makefile.am file. I now have
> the examples working as a C++ project in Kdevelop.
>
> The only other thing that is confusing me is that when I built the examples
> from command line with cc, the executables are all about 800KB. When I
> build it with Kdevelop, the application is about 90KB. Is the microhttpd
> library being put in the executable when built with cc, but just being
> referenced when built in C++?

You can use "ldd" on the generated binary to see if it links against the 
library or if (somehow) a static version was compiled into your binary.  
However, I suspect what's really going on is that one of your binaries has 
debug symbols (compiled with -g) and the other does not (and both are linked 
against the shared library).

Best,

Christian
-- 
Christian Grothoff
Assistant Professor
Department of Computer Science
University of Denver




reply via email to

[Prev in Thread] Current Thread [Next in Thread]