[Top][All Lists]

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

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

From: Lance Lefebure
Subject: RE: [libmicrohttpd] Trying to get the hellobrowser example to work
Date: Mon, 25 May 2009 19:13:14 -0500

> 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 is wrong in any 
> case since that file needs to be processed by (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/" to the /src/ 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++?


reply via email to

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