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

ameen.shajahan at wipro.com ameen.shajahan at wipro.com
Mon Jan 23 05:22:45 UTC 2012


Yeah u are right.
We already change that dhcp_server.cpp file to a dhcp_server.c file , and compiled successfully .
But if you change it to dhcp_server.cpp it shows that the same parse error which i mentioned below.
U have mentioned that
Be sure about where the
extern "C" directives are placed.
How to implement that one to make it to work.Please let me know.

Thanks,
Ameen S

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 19:48
To: Users of ISC DHCP
Subject: Re: error while including header file(dhcp.h) of ISC dhcp-4.2.3 to Cpp file.

This is C++ stuff versus C-only stuff, I'd guess.  Be sure about where the
extern "C" directives are placed.

But you're a programmer, right? Please be less retarded.

As mentioned earlier I'd agree use the installed location of the header files,
not server build source tree.



On Jan 20, 2012, at 6:01 AM, <ameen.shajahan at wipro.com<mailto:ameen.shajahan at wipro.com>> wrote:




From: Ameen Shajahan (WT01 - GMT-Telecom Equipment)
Sent: 20 January 2012 12:25
To: Users of ISC DHCP; dhcp-workers at lists.isc.org<mailto:dhcp-workers at lists.isc.org>
Subject: Re: error while including header file(dhcp.h) of ISC dhcp-4.2.3 to Cpp file.


Hi,
                I have one framework already, i want to include ISC dhcp-4.2.3 to the framework. For that i  wrote cpp file and header file , when i including dhcpd.h
Its throwing the below error.
                When i remove the header file dhcpd.h, its working fine.



I have dhcp_server.h , dhcp_server.cpp and one Makefile.


consider
--------------------------
vi dhcp_server.h
#include "dhcpd.h"
.
.
.
.
.
My Framework part
---------------------------------


Consider
------------------------

vi dhcp_server.cpp
 #include <string.h>
 #include <stdlib.h>
 #include "dhcp_server.h"
.
.
.
.
.
.
My framework part
-----------------------


[ameen at csc dhcpd]$ make
----- Updating dhcp_server.d
----- Compiling dhcp_server.cpp
In file included from /home/ameen/dhcp-4.2.3/bind/include/dns/tsec.h:50,
                 from /home/ameen/dhcp-4.2.3/includes/omapip/omapip.h:40,
                 from /home/ameen/dhcp-4.2.3/dhcpctl/dhcpctl.h:38,
                 from dhcp_server.h:16,
                 from dhcp_server.cpp:3:
/home/ameen/dhcp-4.2.3/bind/include/dst/dst.h:71:1: warning: "DST_MAX_ALGS" redefined
In file included from dhcp_server.h:15,
                 from dhcp_server.cpp:3:
/home/ameen/dhcp-4.2.3/includes/isc-dhcp/dst.h:119:1: warning: this is the location of the previous definition
In file included from /home/ameen/dhcp-4.2.3/includes/omapip/isclib.h:64,
                 from /home/ameen/dhcp-4.2.3/includes/dhcpd.h:95,
                 from dhcp_server.h:17,
                 from dhcp_server.cpp:3:
/home/ameen/dhcp-4.2.3/bind/include/dns/client.h:204: error: parse
   error before `namespace'
/home/ameen/dhcp-4.2.3/bind/include/dns/client.h:232: error: parse
   error before `namespace'
In file included from /home/ameen/dhcp-4.2.3/includes/dhcpd.h:100,
                 from dhcp_server.h:17,
                 from dhcp_server.cpp:3:
/home/ameen/dhcp-4.2.3/includes/statement.h:69: error: no
   body nor ';' separates two class, struct or union declarations
/home/ameen/dhcp-4.2.3/includes/statement.h:69: error: parse
   error before `add'
In file included from /home/ameen/dhcp-4.2.3/includes/dhcpd.h:101,
                 from dhcp_server.h:17,
                 from dhcp_server.cpp:3:
/home/ameen/dhcp-4.2.3/includes/tree.h:215: error: parse
   error before `&&' token
/home/ameen/dhcp-4.2.3/includes/tree.h:216: error: parse
   error before `||' token
/home/ameen/dhcp-4.2.3/includes/tree.h:217: error: parse
   error before `!' token
In file included from dhcp_server.h:17,
                 from dhcp_server.cpp:3:
/home/ameen/dhcp-4.2.3/includes/dhcpd.h:417: error: no
   body nor ';' separates two class, struct or union declarations
/home/ameen/dhcp-4.2.3/includes/dhcpd.h:417: error: parse
   error before `classes'
/home/ameen/dhcp-4.2.3/includes/dhcpd.h:507: error: no
   body nor ';' separates two class, struct or union declarations
/home/ameen/dhcp-4.2.3/includes/dhcpd.h:507: error: parse
   error before `billing_class'
/home/ameen/dhcp-4.2.3/includes/dhcpd.h:898: error: no
   body nor ';' separates two class, struct or union declarations
/home/ameen/dhcp-4.2.3/includes/dhcpd.h:898: error: parse
   error before `class'
/home/ameen/dhcp-4.2.3/includes/dhcpd.h:965: error: no
   body nor ';' separates two class, struct or union declarations
/home/ameen/dhcp-4.2.3/includes/dhcpd.h:965: error: parse
   error before `classes'
/home/ameen/dhcp-4.2.3/includes/dhcpd.h:975: error: no
   body nor ';' separates two class, struct or union declarations
/home/ameen/dhcp-4.2.3/includes/dhcpd.h:977: error: no
   body nor ';' separates two






What would be the problem
Please provide the solution.

Its throwing an error called parse error ...
What are all the other files to be included in dhcp_server.h


Please let me know

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


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20120123/4c47d450/attachment.html>


More information about the dhcp-users mailing list