C Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesC Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 10th, 2002, 05:59 PM
gamgee gamgee is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: Ireland
Posts: 26 gamgee User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
using libxml2

Is anyone familiar with the libxml2 library?
I want to use it in a c++ program but I believe there are some problems with that. I think the libxml2 library uses words that are reserved in c++, it even uses new as a variable.
Any advice at all is greatly appreciated.

Reply With Quote
  #2  
Old December 16th, 2002, 02:30 PM
ClayDowling ClayDowling is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: Flint, MI
Posts: 328 ClayDowling User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 19 m 25 sec
Reputation Power: 11
Gamgee,

So long as your library is compiled with a C compiler (which it will have to be), you won't have any problems. libxml2 is perfectly content with C, even though the xml movement seems hell bent on using python for everything.
__________________
Clay Dowling
Lazarus Notes
Articles and commentary on web development
http://www.lazarusid.com/notes/

Reply With Quote
  #3  
Old December 30th, 2002, 10:32 AM
gamgee gamgee is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: Ireland
Posts: 26 gamgee User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
but...

doesnt libxml2 use "new" as a variable?
though this is reserved in c++.

Reply With Quote
  #4  
Old January 1st, 2003, 08:56 AM
ClayDowling ClayDowling is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: Flint, MI
Posts: 328 ClayDowling User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 19 m 25 sec
Reputation Power: 11
If it does, it is used internally, so won't affect your C++ program. In the event that it's declared in one of the header files, wrap it in:

Code:
extern "C" {
  #include <xml.h>
}


That should keep your C code from irritating your C++ compiler. I think that this wrapping is already done internally by the header file though.

Reply With Quote
  #5  
Old January 2nd, 2003, 07:25 AM
gamgee gamgee is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: Ireland
Posts: 26 gamgee User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
cool, cheers for the help Clay.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesC Programming > using libxml2

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap