Code::Blocks Forums

User forums => Help => Topic started by: aurquiel on March 05, 2017, 03:16:37 am

Title: Daily branch Linux path to QT5
Post by: aurquiel on March 05, 2017, 03:16:37 am
I have notice the include for star projects of QT5 in the daily branch development, but i don't know it's already ready.

I have installed QT creator 5.8 and my QT folder is at /opt/QT

In the location of QT5 i introduced /opt/Qt/5.8/Src/qtbase but the wizard returned the error

Code
The path you entered seems valid, but this wizard
can't locate the following Qt's library file:
Qt5Core in it.
(Also tried prepending lib and appending .a and .lib).

Maybe is too early to use this wizard tool for QT5 or ia m doing something wrong.

Title: Re: Daily branch Linux path to QT5
Post by: oBFusCATed on March 05, 2017, 09:48:13 am
Probably the wizard is just broken for this version.
You can right click on the wizard's icon and choose edit script.
Then you can inspect what is trying to do and why it is failing.

Qt project have done some file restructuring between 4 and 5 and probably the wizard is not fully aware of them.
Title: Re: Daily branch Linux path to QT5
Post by: aurquiel on March 07, 2017, 01:02:51 am
The problem was i choose the wrong file path

The correct one is
Code
/opt/Qt/5.8/gcc_64

Then the wizard create the main file as follow

Code
#include <QApplication>
#include <QFont>
#include <QPushButton>

int main(int argc, char* argv[])
{
    QApplication app(argc, argv);

    QPushButton quit("Quit");

    quit.resize(75, 30);
    quit.setFont(QFont("Times", 18, QFont::Bold));

    QObject::connect(&quit, SIGNAL(clicked()), &app, SLOT(quit()));

    quit.show();

    return app.exec();
}

But when i compile give the error

Code
||=== Build: Debug in ee (compiler: GNU GCC Compiler) ===|
/opt/Qt/5.8/gcc_64/include/QtCore/qglobal.h|1097|error: #error "You must build your code with position independent code if Qt was built with -reduce-relocations. " "Compile your code with -fPIC (-fPIE is not enough)."|
||=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 1 second(s)) ===|
Title: Re: Daily branch Linux path to QT5
Post by: stahta01 on March 07, 2017, 02:42:52 am
Did you try adding the suggested option?

Project -> Build Options...
Tab Compiler Settings
In either tab "Compiler Flags" or "Other Compiler Options"

Tim S.
Title: Re: Daily branch Linux path to QT5
Post by: aurquiel on March 08, 2017, 12:34:33 am
I did, but a bunch warnings shows up

Code
||=== Build: Debug in ee (compiler: GNU GCC Compiler) ===|
||warning: libicui18n.so.56, needed by /opt/Qt/5.8/gcc_64/lib/libQt5Core.so, not found (try using -rpath or -rpath-link)|
||warning: libicuuc.so.56, needed by /opt/Qt/5.8/gcc_64/lib/libQt5Core.so, not found (try using -rpath or -rpath-link)|
||warning: libicudata.so.56, needed by /opt/Qt/5.8/gcc_64/lib/libQt5Core.so, not found (try using -rpath or -rpath-link)|
/opt/Qt/5.8/gcc_64/lib/libQt5Core.so||undefined reference to `ucol_open_56'|
/opt/Qt/5.8/gcc_64/lib/libQt5Core.so||undefined reference to `u_strToLower_56'|
/opt/Qt/5.8/gcc_64/lib/libQt5Core.so||undefined reference to `ucnv_getStandardName_56'|
/opt/Qt/5.8/gcc_64/lib/libQt5Core.so||undefined reference to `ucnv_compareNames_56'|
/opt/Qt/5.8/gcc_64/lib/libQt5Core.so||undefined reference to `ucal_clone_56'|
/opt/Qt/5.8/gcc_64/lib/libQt5Core.so||undefined reference to `ucnv_getAlias_56'|
/opt/Qt/5.8/gcc_64/lib/libQt5Core.so||undefined reference to `uenum_next_56'|
/opt/Qt/5.8/gcc_64/lib/libQt5Core.so||undefined reference to `ucal_open_56'|
/opt/Qt/5.8/gcc_64/lib/libQt5Core.so||undefined reference to `ucol_setAttribute_56'|
/opt/Qt/5.8/gcc_64/lib/libQt5Core.so||undefined reference to `u_strToUpper_56'|
/opt/Qt/5.8/gcc_64/lib/libQt5Core.so||undefined reference to `ucnv_setSubstChars_56'|
/opt/Qt/5.8/gcc_64/lib/libQt5Core.so||undefined reference to `ucal_getTimeZoneDisplayName_56'|
/opt/Qt/5.8/gcc_64/lib/libQt5Core.so||undefined reference to `ucal_openCountryTimeZones_56'|
/opt/Qt/5.8/gcc_64/lib/libQt5Core.so||undefined reference to `ucnv_fromUnicode_56'|
/opt/Qt/5.8/gcc_64/lib/libQt5Core.so||undefined reference to `ucnv_open_56'|
/opt/Qt/5.8/gcc_64/lib/libQt5Core.so||undefined reference to `ucal_openTimeZones_56'|
/opt/Qt/5.8/gcc_64/lib/libQt5Core.so||undefined reference to `ucnv_countAliases_56'|
/opt/Qt/5.8/gcc_64/lib/libQt5Core.so||undefined reference to `u_errorName_56'|
/opt/Qt/5.8/gcc_64/lib/libQt5Core.so||undefined reference to `ucal_inDaylightTime_56'|
/opt/Qt/5.8/gcc_64/lib/libQt5Core.so||undefined reference to `uenum_close_56'|
/opt/Qt/5.8/gcc_64/lib/libQt5Core.so||undefined reference to `ucnv_getAvailableName_56'|
/opt/Qt/5.8/gcc_64/lib/libQt5Core.so||undefined reference to `ucal_close_56'|
/opt/Qt/5.8/gcc_64/lib/libQt5Core.so||undefined reference to `ucal_openTimeZoneIDEnumeration_56'|
/opt/Qt/5.8/gcc_64/lib/libQt5Core.so||undefined reference to `ucnv_getDefaultName_56'|
/opt/Qt/5.8/gcc_64/lib/libQt5Core.so||undefined reference to `ucal_getDSTSavings_56'|
/opt/Qt/5.8/gcc_64/lib/libQt5Core.so||undefined reference to `ucal_getDefaultTimeZone_56'|
/opt/Qt/5.8/gcc_64/lib/libQt5Core.so||undefined reference to `ucnv_toUnicode_56'|
/opt/Qt/5.8/gcc_64/lib/libQt5Core.so||undefined reference to `ucal_setMillis_56'|
/opt/Qt/5.8/gcc_64/lib/libQt5Core.so||undefined reference to `ucol_strcoll_56'|
/opt/Qt/5.8/gcc_64/lib/libQt5Core.so||undefined reference to `ucnv_close_56'|
/opt/Qt/5.8/gcc_64/lib/libQt5Core.so||undefined reference to `ucol_close_56'|
/opt/Qt/5.8/gcc_64/lib/libQt5Core.so||undefined reference to `ucol_getSortKey_56'|
/opt/Qt/5.8/gcc_64/lib/libQt5Core.so||undefined reference to `ucnv_countAvailable_56'|
/opt/Qt/5.8/gcc_64/lib/libQt5Core.so||undefined reference to `ucnv_getMaxCharSize_56'|
/opt/Qt/5.8/gcc_64/lib/libQt5Core.so||undefined reference to `ucal_get_56'|
||error: ld returned 1 exit status|
||=== Build failed: 36 error(s), 3 warning(s) (0 minute(s), 0 second(s)) ===|
Title: Re: Daily branch Linux path to QT5
Post by: stahta01 on March 08, 2017, 01:14:53 am
Please read this site rules http://forums.codeblocks.org/index.php/topic,9996.0.html (http://forums.codeblocks.org/index.php/topic,9996.0.html)

Then, find a programming site like https://cboard.cprogramming.com/forum.php (https://cboard.cprogramming.com/forum.php)
To ask programming questions on and also learn programming on sites like that.

This site does NOT teach programming.

FYI: Those are linker errors you posted.

And, thank you for using code tags in your post.

Tim S.
Title: Re: Daily branch Linux path to QT5
Post by: stahta01 on March 08, 2017, 01:18:21 am
The programming site will likely need a build log output to help you.

Edit: The link says how to get a full/complete build log; many newbies do NOT know this.

http://wiki.codeblocks.org/index.php/FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F (http://wiki.codeblocks.org/index.php/FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F)

Tim S.