Amos, Thank you for the idea, I will look into that, how would you however import the files' content into the Makefile 'automatically' without to actually add it to it?
Do you use a perl script to also modify the Makefile? On Monday 19 January 2009 14:39:28 Amos Shapira wrote: > 2009/1/19 Noam Rathaus <[email protected]>: > > Hi, > > > > I would like to import into an existing project external XML files which > > will be used as internal data by the program I am compiling. > > You mean you'd like to see the XML file converted into a C++ string > compiled as part of the program? > > Probably a simple Perl script + Strwaberry Perl > (http://strawberryperl.com/) to cover the Windows side of things will > do that for you? > > (Python Phanatics will probably suggest that other language :) > > Just write a script which adds something like > '#include <string> > static const string xml_data(' > > then reads the XML file line by line, suround the input lines with > '"''s in front and back (the C++ compiler will append them all into > one large string constant) then finish with ");" after the input. > Write all this into some .cpp file and link that with the rest of the > program. > > Makes sens? > > --Amos > > ================================================================= > To unsubscribe, send mail to [email protected] with > the word "unsubscribe" in the message body, e.g., run the command > echo unsubscribe | mail [email protected] -- Noam Rathaus CTO [email protected] http://www.beyondsecurity.com "Know that you are safe." Beyond Security Finalist for the "Red Herring 100 Global" Awards 2007 ================================================================= To unsubscribe, send mail to [email protected] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [email protected]
