views:

34

answers:

2

I know this is a very stupid question and I'm very new to C++.

I'm developing Starcraft AI, it is DLL file. I'm trying to use XML to gather some data to the bot, however whenever I build the DLL with /clr option. The bot doesn't load properly. So, my question is what is CLR and is there a way to read/write XML without using /clr build option.

Thanks so much.

+1  A: 

The /clr flag means that you're building it as a C++/CLI app which means that it'll be managed code (using the the .Net framework etc). See here for more information.

You probably want to do native code so I'd suggest that you use something like MSXml or Xerces XML library to read the XML and make sure that you don't use any .Net classes. There's probably other XML libraries, but those are the only two I've used from C++.

ho1
+2  A: 

If you want to use Microsoft's solution and you are familiar with COM interfaces, you can try MSXML. As an easy to use open-source alternative I'd recommend libxml2 (I use it in some of my Windows apps and find it satisfying).

AOI Karasu