I solved the problem by compiling the DIME library on my windows machine with msys. Here I'd like to share what steps I had, which mistakes: I hope it helps someone else.
-Firstly I had a .lib file from a friend, he was using Visual Studio however I observed that is not wokring with minwg g++ at all.
-So if you compile the library with Visual C++, then you get a .lib file. However when I compiled it with g++ with mingw on msys console, I got an .a file which is worked well with QT creator
-Also under ubuntu there is an already compiled version of that library libdime, the file is libdime.so, however don't try to get it run on windows :))
For Compiling Dime Library,
1-) Download all Source project from https://bitbucket.org/Coin3D/dime
2-) Install Mingw + msys, and be sure u added "C:\MinGW\bin" to your Path, because msys will need it, anyway then with msys console. CD to your dime folder.
3-) firstly need to configure it,
./configure --prefix=c:/yourDestinationForCompiledDIME
4-) you can check whether make can work correctly. Do not have any space on the dime folder where you are running those make, configure etc commands, otherwise it may fail.
make check
5-) make it
make
6-) now installing it,.
make install
Those are the steps for compiling Dime, now to add it to QT project
Now, Copy /lib/ and /include/ folders from c:/yourDestinationForCompiledDIME to your project folder. Lib folder should have .a libraries, and include has the header files. Those all you need to add a library to QT.
in .pro file:
win32: LIBS += -L$$PWD/lib/ -ldime
INCLUDEPATH += $$PWD/lib
DEPENDPATH += $$PWD/lib
win32-g++: PRE_TARGETDEPS += $$PWD/lib/libdime.a
INCLUDEPATH += $$PWD/include
in your cpp code, Important points are.
#define DIME_NOT_DLL
and your header of course, whatever you need..
#include <dime/entities/Line.h>
All cpp code something like:
#include "mainwindow.h"
#include <QApplication>
#define DIME_NOT_DLL
#include <dime/entities/Line.h>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
w.show();
dimeLine line; //please help!! :)
return a.exec();
}
I hope it will be helpful to someone who need to sue Dime in QT project.
All best,..