communi / libcommuni

A cross-platform IRC framework for Qt
https://communi.github.io
BSD 3-Clause "New" or "Revised" License
83 stars 37 forks source link

"invalid use of incomplete type 'class IrcConnectionPrivate'" #50

Closed ghost closed 8 years ago

ghost commented 8 years ago

I have a weird bug trying to use it on Qt Windows. On linux, everything works fine, but on Windows I get the following 16 (and almost exact) errors.

Screen of the compilation output: http://imgur.com/ZUIhDGx

Code pastes: .pro http://pastebin.com/sEN8DipD

Since in my main code I don't use the library (for now, but it's just a compilation error), I don't think it's important to paste it.

Neraeh commented 8 years ago

I am having the exact same problem and I can't find a solution... I don't know if it is a problem with moc or with my code I'm using Qt 5.6.0 on Gentoo Linux

jpnurmi commented 8 years ago

Hi @TheNofx68, the problem could be that you have both

CONFIG += communi
COMMUNI += core model util

and

include("libcommuni/src/src.pri")

in the .pro file. The former sets up the compiler and linker flags for the libcommuni shared library, whereas the latter embeds ie. builds the whole libcommuni into your application. Choose one of the options, whichever suits you better, but not both. :)

Neraeh commented 8 years ago

Hi @jpnurmi and thank you for your answer :) But I only have the latter (include($$_PRO_FILE_PWD_/../libcommuni/src/core/core.pri in my project) and it is still happening :/

EDIT: Here is my pro file http://pastebin.com/Nqej3esA

Neraeh commented 8 years ago

Switched to the CONFIG += communi way, had to rework my git repo.. Still don't know where does this error came from, but I managed to dodge it

jpnurmi commented 8 years ago

@TheShayy ok, good to hear. @TheNofx68, feel free to re-open the issue if the problem persists.