tags:

views:

251

answers:

2

including the maya ( 3d application ) classes in qt program gives lot of errors..... i have added all required include paths and libs...the same problem persists ....

this is pro file for my qt project

TARGET = FileCon
TEMPLATE = app
SOURCES += main.cpp \
    dialog.cpp
HEADERS += dialog.h \
    ConvertFunction.h
FORMS += dialog.ui
LIBS += "C:/Program Files/Autodesk/Maya2008/lib" \
        -lOpenMaya.lib  \
        -lFoundation.lib \
        -lOpenMayalib

INCLUDEPATH += "C:/Program Files/Autodesk/Maya2008/include"

DEFINES = _BOOL \
         WIN32 \
        REQUIRE_IOSTREAM

///////////////////////////////////////////

How is it possible to use maya classes with qt.

A: 

Try something like this

LIBS += $$quote(-LC:/Program Files/Autodesk/Maya2008/lib) \
        -lOpenMaya \
        -lFoundation

qmake LIBS variable

kemiisto
need some place to attach error and code. linux qt 64 bit - fine. windows qt 32 bit - get error. difference : linux .pro - fontconfig windows .pro no fontconfig-------g++ -c -g -frtti -fexceptions -mthreads -Wall -D_BOOL -DREQUIRE_IOSTREAM -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"..\..\..\Qt\2009.04\qt\include\QtCore" -I"..\..\..\Qt\2009.04\qt\include\QtGui" -I"..\..\..\Qt\2009.04\qt\include" -I"..\..\..\Program Files\Autodesk\Maya2008\include" -I"..\..\..\Qt\2009.04\qt\include\ActiveQt" -I"debug" -I"." -I"..\..\..\Qt\2009.04\qt\mkspecs\win32-g++" -o debug\main.o main.cpp
knishua
in windows, qt when compiling does not recognise following in .pro fileLIBS += $$quote(-LC:/Program Files/Autodesk/Maya2008/lib) \-lFoundation \-lOpenMaya \-lOpenMayalib \-lOpenMayaRenderwhat change will make it successful
knishua
@knishua: you can edit your first message by adding this information in more well-organized form. What do you mean by "does not recognize"? Which error and on which step do you receive?
kemiisto
how do i edit the post to include code on a new line.btw. By does not recognize, I mean, removing or adding the lines, the errors still occur. Where can i attach a file, so u can see.
knishua
A: 

If you are using QtCreator with the included compiler on Windows, it expects ".a" style libraries, rather than Visual Studio ".lib" style libraries.

You still haven't given enough infromation about eaxctly what you are doing. (How are you building, what compiler, etc.) or what is going wrong (exact error messages) to know for sure if that's the issue. But, if my crystal ball is working well today, I'd recommend checking the library format.

wrosecrans