error while including header file(dhcp.h) of ISC dhcp-4.2.3 to a C file.

Hans Liss Hans at Liss.pp.se
Fri Jan 20 05:59:35 UTC 2012


Those 'â' characters are not from any of your files; they are *brackets* around the expression that causes trouble, 'u_int8_t'. You need to include a header file that defines those integer types, like types.h or inttypes.h or whatever is needed in your environment. You will probably have to include other stuff too.

Whenever you encounter an error like this (and they can be pretty obscurely worded), search through your system's header file for ideas. If you can't figure out what to look for, google on part of the error message! Usually you can find lots people who have encountered the exact same error.

Best regards,

Hans

On 20 Jan 2012, at 06:45 , <ameen.shajahan at wipro.com> wrote:

> Line no 53 in dhcp.h
>  
> From: dhcp-users-bounces+ameen.shajahan=wipro.com at lists.isc.org [mailto:dhcp-users-bounces+ameen.shajahan=wipro.com at lists.isc.org] On Behalf Of Jeff Waller
> Sent: 20 January 2012 00:07
> To: Users of ISC DHCP
> Cc: dhcp-workers at lists.isc.org
> Subject: Re: error while including header file(dhcp.h) of ISC dhcp-4.2.3 to a C file.
>  
> Well that is strange.  Having apparently extraneous UTF-8? characters in header files
> seems wrong to me.  Could you provide that line in dhcp.h?
>  
> BTW my includes are slightly different, here's the whole list, the 2 at the bottom are most
> relevant.
>  
>  
> #include <string.h>
> #include <time.h>
> #include <stdarg.h>
> #include <stdlib.h>
> #include <sys/time.h>
> #include <sys/socket.h>
> #include <stdio.h>
> #include <netinet/in.h>
> #include <arpa/inet.h>
> #include <isc-dhcp/dst.h>
> #include <dhcpctl/dhcpctl.h>
>  
>  
>  
> On Jan 19, 2012, at 9:50 AM, <ameen.shajahan at wipro.com> <ameen.shajahan at wipro.com> wrote:
> 
> 
> Hi,
>                 I have written one C file called test.c and I have included header file(dhcp.h) of  ISC dhcp-4.2.3
>  
>  
> vi test.c
> #include<stdio.h>
> #include "dhcp.h”
>  int main(int argc, char** argv)
>   {
>      printf("test\n");
>       return 0;
>   }
>  
> I have written one makefile.
>  
> Vi Makefile
>  
> C_SRCS := $(wildcard *.c)
> DHCP_ROOT := home/user/dhcp-4.2.3
> CPPFLAGS +=  -I$(DHCP_ROOT)/includes \
>                              -I$(DHCP_ROOT)/common \
>                             -I$(DHCP_ROOT)/dhcpctl \
>                             -I$(DHCP_ROOT)/omapip \
>                            -I$(DHCP_ROOT)/includes/omapip \
>                            -I$(DHCP_ROOT)/dhcp-output/include \
>                             -I$(DHCP_ROOT)/bind \
>                              -I$(DHCP_ROOT)/bind/include \
>                              -I$(DHCP_ROOT)/bind/bind-9.8.1/contrib/query-loc-0.4.0
>  
>  
>  
> And I have compiled using make command.
>  
> [user at new dhcpd_test]$ make
> ----- Updating test.d
> ----- Compiling test.c
> In file included from test..c:14:
> /home/user/dhcp-4.2.3/includes/dhcp.h:52: error: expected specifier-qualifier-list before âu_int8_tâ
>  
> What would be the problem??
> Please provide the solution.
>  
> Please do not print this email unless it is absolutely necessary.
> 
> The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments..
> 
> WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
> 
> www.wipro.com
> 
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users
>  
> Please do not print this email unless it is absolutely necessary.
> 
> The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
> 
> WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
> 
> www.wipro.com
> 
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20120120/cf13a029/attachment.html>


More information about the dhcp-users mailing list