Problems linking with DOM on Linux

I downloaded, compiled and installed COLLADA DOM 2.2 succesfully on Kubuntu 8.10. Now I’m trying to use it with my own programs, but I don’t know how to link with it properly. Currently I have these includes in my source file:


#include <dae.h>
#include <dom/domCOLLADA.h>
#include <dom/domConstants.h>

My Makefile looks like this:


COLLADAINC = -I/usr/local/include/colladadom -I/usr/local/include/colladadom/1.4
COLLADALIBS = -lcollada14dom -lxml2 -lpcre -lpcrecpp -lboost_filesystem -lminizip
all:
    g++ $(COLLADAINC) program.cpp $(COLLADALIBS) -o program

When I run make, it complains a lot. A snippet:


In file included from /usr/local/include/colladadom/1.4/dom/domCOLLADA.h:13,                                    
                 from program.cpp:5:                                                                             
/usr/local/include/colladadom/1.4/dom/domTypes.h:1078: error: expected unqualified-id before ‘=’ token          
In file included from /usr/local/include/colladadom/1.4/dom/domCOLLADA.h:16,                                    
                 from program.cpp:5:                                                                             
/usr/local/include/colladadom/1.4/dom/domAsset.h: In member function ‘virtual COLLADA_TYPE::TypeEnum domAsset::getElementType() const’:                                                                                         
/usr/local/include/colladadom/1.4/dom/domAsset.h:25: error: ‘ASSET’ is not a member of ‘COLLADA_TYPE’           

I got the problem solved. I hadn’t copied minizip library to /usr/local/lib and there seemed to be something wrong with my program’s source code. I later made a very simple file and that worked!


#include <dae.h>
#include <dom/domCOLLADA.h>
#include <iostream>

int main() {

    DAE dae;

    daeElement* root = dae.open("cube.dae");
    if (!root) {
        std::cout << "Document import failed.
";
        return 0;
    }
}