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

Jeff Waller jeffw at cnxntech.com
Thu Jan 19 18:36:33 UTC 2012


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<mailto:ameen.shajahan at wipro.com>> <ameen.shajahan at wipro.com<mailto: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<http://www.wipro.com>

_______________________________________________
dhcp-users mailing list
dhcp-users at lists.isc.org<mailto: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/20120119/ebb6a708/attachment.html>


More information about the dhcp-users mailing list