Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22079

How to add MInGW to Clion IDE on Linux environmnet [duplicate]

$
0
0

I have two files in one folder.

a.cc

b.cc

everyone have:

int main(int argc, char *argv[]) {
    QCoreApplication application(argc, argv);

    return 0;
}

One Cmake file with:

find_package(Qt5 COMPONENTS Core REQUIRED)
add_executable(a a.cc)
add_executable(b b.cc)

The problem is: In a.cc my #include <QCoreApplication> is fine and everything okay. I can even change it to #include <QtCore/QCoreApplication> which is more convenient. But In b.cc my IDE "says" that #include <QCoreApplication> not exists and I should change it to #include <QtCore/QCoreApplication>. During compile I get those errors:

b.cc undefined reference to `_imp___ZN16QCoreApplicationC1ERiPPci'
b.cc undefined reference to `_imp___ZN16QCoreApplicationD1Ev'
b.cc undefined reference to `_imp___ZN16QCoreApplicationD1Ev'

Project is much bigger but I can't find anything that can relative with this problem.

Addition:

I know what is "undefined reference to" and I'm not a new to this problem


Viewing all articles
Browse latest Browse all 22079

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>