libmicrohttpd
[Top][All Lists]
Advanced

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

[libmicrohttpd] Re: Trouble using microhttpd [compiling]


From: Shahor
Subject: [libmicrohttpd] Re: Trouble using microhttpd [compiling]
Date: Thu, 06 May 2010 10:29:30 +0200
User-agent: Thunderbird 2.0.0.23 (X11/20091202)

Hi !

Thanks a lot, it helped me a lot !

Best,
Alexandre.

address@hidden wrote:
Send libmicrohttpd mailing list submissions to
	address@hidden

To subscribe or unsubscribe via the World Wide Web, visit
	http://lists.gnu.org/mailman/listinfo/libmicrohttpd
or, via email, send a message with subject or body 'help' to
	address@hidden

You can reach the person managing the list at
	address@hidden

When replying, please edit your Subject line so it is more specific
than "Re: Contents of libmicrohttpd digest..."


Today's Topics:

   1. Re: Trouble using microhttpd [compiling] (Christian Grothoff)


----------------------------------------------------------------------

Message: 1
Date: Wed, 5 May 2010 12:54:39 +0200
From: Christian Grothoff <address@hidden>
Subject: Re: [libmicrohttpd] Trouble using microhttpd [compiling]
To: libmicrohttpd development and user mailinglist
	<address@hidden>
Message-ID: <address@hidden>
Content-Type: Text/Plain;  charset="utf-8"

Hi!

You need to include certain standard headers (depending on your platform) 
before you #include "microhttpd.h".  Which one depends on your system, a good 
start is something like this from platform.h (many of these are not actually 
required on most platforms, so if your system doesn't have one of these, 
remove the #include line and try without):

#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <unistd.h>
#include <stdarg.h>
#include <errno.h>
#include <fcntl.h>
#include <signal.h>
#include <stddef.h>
#include <pthread.h>
#include <sys/select.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <sys/msg.h>
#include <sys/mman.h>
#include <netdb.h>
#include <netinet/in.h>
#include <time.h>
#include <sys/socket.h>
#include <arpa/inet.h>

Best,

Christian


On Tuesday 04 May 2010 12:43:58 am Alexandre gaudencio wrote:
  
Hello,
I'm mailing asking for some help.

I've been trying to use libmicrohttpd for 2 days now and I can't get it to
work and don't understand why ... I'm a not an expert so please forgive me
if I say something silly.

Here's what I've done :

- Downloaded the latest sources (
ftp://sunsite.cnlab-switch.ch/mirror/gnu/libmicrohttpd/libmicrohttpd-0.4.6.
tar.gz )
- Runned :
tar -xvzf libmicrohttpd-0.4.6.tar.gz
cd libmicrohttpd-0.4.6
mkdir /tmp/glibmicrohttpd
./configure --prefix=/tmp/microhttpdTest
make
make install

- I copied the sample code found here (
http://www.gnu.org/software/libmicrohttpd/)
[http://pastebin.org/199897just so I'm sure everyone get's the same
sample]
into a plop.c file and then tried to compile like this :

address@hidden:/tmp/test $ gcc plop.c -I/tmp/glibmicrohttpd/include/
-L/tmp/glibmicrohttpd/lib/ -lmicrohttpd
In file included from plop.c:4:
/tmp/glibmicrohttpd/include/microhttpd.h:497: error: expected
specifier-qualifier-list before ‘intptr_t’
/tmp/glibmicrohttpd/include/microhttpd.h:830: error: expected declaration
specifiers or ‘...’ before ‘uint64_t’
/tmp/glibmicrohttpd/include/microhttpd.h:868: error: expected declaration
specifiers or ‘...’ before ‘uint64_t’
/tmp/glibmicrohttpd/include/microhttpd.h:893: error: expected declaration
specifiers or ‘...’ before ‘va_list’
/tmp/glibmicrohttpd/include/microhttpd.h:1085: error: expected ‘)’ before
‘size’

So here I don't get it =/
Maybe this is something I did wrong but isn't this header supposed to be
generated automatically by the configure/make/make install thing and be
usable directly ?

I'm using (right now for the tests) the latest Ubuntu release (10.04) but I
get the same problem (with much more errors though) on Mac OS X Snow
Leopard.

Does someone know what to do to get this right ?

Thanks a lot for any further help !

Alexandre Gaudencio.

    




------------------------------

_______________________________________________
libmicrohttpd mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/libmicrohttpd


End of libmicrohttpd Digest, Vol 14, Issue 2
********************************************
  


reply via email to

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