Problem compiling

  • Big

    Big - 2009-03-04


    First, thanx for TinyXML! I'm using it for different projects.

    I'm using TinyXML in a C++ library (called "mylib" here) which is then used by another project.

    I can compile and create shared/static version of my library. There is a test main() included in the lib tree so I can test the library: it also works.

    I cannot _compile_ a project file calling a function from the library which uses tinyxml...

    My library has headers installed to /usr/mylib/ionization. I have put tinyxml headers in /usr/include/mylib/tinyxml

    Here is the error:
    g++ -O0 -g -DYDEBUG -Wno-write-strings -Wall -Wfatal-errors -I/usr/include/mylib -I./src -c src/treecode.c -o build/treecode.o
    In file included from /usr/include/mylib/ReadXML.hpp:6,
                     from /usr/include/mylib/Ionization.hpp:10,
                     from src/treecode.c:79:
    /usr/include/mylib/tinyxml/tinyxml.h:687: error: expected `)' before ‘->’token
    compilation terminated due to -Wfatal-errors.

    In my project source, I have:
    #include "mylibrary.hpp" // Include everything from the lib
    Read_XML_Inputfile([...], filename);

    Thank you for your help.

    • Big

      Big - 2009-03-06

      No problem with tinyxml after all.

      It was a header dependency problem. Working on a big project you never know what others will include... Doing some #include cleanups corrected the problem.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks