Registered Member
|
Hi,
I installed KDE on Windows 8 x64 and Qt5. I am using the MSVC2012 compiler. I am currently developing an application on Qt and for that I'm using the Calligra library along with the KDE dependencies. For now, I am including header from Calligra Sheets and regarding the <Doc.h> file, I face an compiler issue due to the mode_t type in the kglobal.h file. On google, I found that mode_t might be in <sys/stat.h> library, but it is not. So, I created the structure in my main header:
But when I recompile the code, I have 8 unresolved external linkages 2001 followed by LNK 2019. main.obj:-1: error: LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __cdecl KUndo2QStack::metaObject(void)const " (?metaObject@KUndo2QStack@@UEBAPEBUQMetaObject@@XZ) main.obj:-1: error: LNK2001: unresolved external symbol "public: virtual void * __cdecl KUndo2QStack::qt_metacast(char const *)" (?qt_metacast@KUndo2QStack@@UEAAPEAXPEBD@Z) main.obj:-1: error: LNK2001: unresolved external symbol "public: virtual int __cdecl KUndo2QStack::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@KUndo2QStack@@UEAAHW4Call@QMetaObject@@HPEAPEAX@Z) main.obj:-1: error: LNK2001: unresolved external symbol "public: virtual void __cdecl KUndo2QStack::setIndex(int)" (?setIndex@KUndo2QStack@@UEAAXH@Z) main.obj:-1: error: LNK2001: unresolved external symbol "public: virtual void __cdecl KUndo2QStack::undo(void)" (?undo@KUndo2QStack@@UEAAXXZ) main.obj:-1: error: LNK2001: unresolved external symbol "public: virtual void __cdecl KUndo2QStack::redo(void)" (?redo@KUndo2QStack@@UEAAXXZ) main.obj:-1: error: LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl KUndo2Stack::~KUndo2Stack(void)" (__imp_??1KUndo2Stack@@UEAA@XZ) referenced in function "public: virtual void * __cdecl KUndo2Stack::`scalar deleting destructor'(unsigned int)" (??_GKUndo2Stack@@UEAAPEAXI@Z) I could not find the reason of that issue. I tried to delete the debug folder and recompile but it did not help. Is there a solution to that issue? thanks. |
Administrator
|
You likely need to link to the KUndo2 library, which is included as part of Calligra according to LXR: http://lxr.kde.org/ident?_i=KUndo2QStack
Also - which Windows build are you using? You might also want to reach out to the Calligra developers through their mailing list: calligra-devel@kde.org.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
Hi, the path to the KUndo2 library is already part of the INCLUDEPATH in my project file. I just do not know why it does not link. Is there an extra linking I need to do? Regarding my Windows build, I am using a Windows 8 Pro on an AMD 64bits computer. |
Administrator
|
You need to set more than just the include path - you also need to instruct the compiler to link your application against the KUndo library.
I'm not sure how this is done with QMake unfortunately.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
Usually mode_t is defined with a typedef. For example, from calligra2.8.6\winquirks\unistd.h:
typedef int mode_t; |
Registered Member
|
Yes @Stephen Leibowitz, I actually changed to a typedef. |
Registered users: bartoloni, Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]