开发者

How do I setup libxml in Eclipse Indigo CDT C++

This all is under Mac OS X 10.6 and the libxml librar开发者_Python百科ies seem to be in /usr/local/libxml2/libxml, I added this to the GNU C++ support but still I get errors for the code that uses libxml. I couldn't find anything that explains what to do to get it working and my project to compile.

edit: Example errors

void printElementNames(xmlNode * a_node) {

}

This would give "Type xmlNode could not be resolved".


I got this here: forum

  1. Right-click your CDT project and select Properties.
  2. Expand C/C++ General and select Paths and Symbols.
  3. Select GNU C++ under Languages
  4. Click Add to define new element
  5. Write in the Directory field /usr/local/libxml2/libxml
  6. Re-build


I'm working in the Cygwin environment, on Windows 7 (64bit), using Eclipse Kepler CDT for C++.

In Eclipse, goto

Project --> Properties --> C++ Builder --> Settings --> Tool Settings Tab

Cygwin C++ Linker --> Libraries

In the Libraries (-l) add the file: xml2.dll

In the Library search path (-L) add the path: "C:\cygwin64\lib"

Cygwin C++ Compiler --> Includes

In the Include paths (-I) add the path: "C:\cygwin64\usr\include\libxml2"

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜