CGAL Linking Error QT Creator Project for Windows and Linux



  • Hi,
    i have Problems Creating Project on QT with CGAL and Boost on Windows 10. In this project there are a few .pro Files and all project without CGAL would be compiled. Boost also works without problems. If i would compile the CGAL Project i got Linking Errors: alt text

    Here is my .pro file

    win32:INCLUDEPATH += C:/CGAL32/include/
    win32:INCLUDEPATH += C:/CGAL32/build/include/
    win32:INCLUDEPATH += C:/boost_lib_inc/include/
    win32:INCLUDEPATH += C:/boost/boost_1_68_0/
    
    win32:CONFIG(release, debug|release): LIBS += -LC:/CGAL32/auxiliary/gmp/lib -lgmp-10 -lmpfr-4 -LC:/CGAL32/build/lib/Release  -lCGAL-vc140-mt-4.12.1 -lCGAL_Core-vc140-mt-4.12.1
    else:win32:CONFIG(debug, debug|release): LIBS += -LC:/CGAL32/auxiliary/gmp/lib -lgmp-10 -lmpfr-4 -LC:/CGAL32/build/lib/Debug -lCGAL-vc140-mt-gd-4.12.1 -lCGAL_Core-vc140-mt-gd-4.12.1
    else:unix:!macx: LIBS += -L$$PWD/../../../../../../usr/lib/x86_64-linux-gnu/ -lCGAL
    

    On Linux all works fine.


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    What compiler are you using ?
    What version of Qt are you using ?



  • @SGaist said in CGAL Linking Error QT Creator Project for Windows and Linux:

    What compiler are you using ?
    Desktop QT 5.9.5 MingW 32Bit (CGAL is installed with 32Bit)
    What version of Qt are you using ?
    5.9.5


  • Lifetime Qt Champion

    Might be a silly question but is CGAL compiled also with MinGW ?



  • Nope. CMake with Visual Studio because it did not work with MingW.
    If i start the programm in QT with Visual Studio Compiler it also failed.


  • Lifetime Qt Champion

    Do you have a Visual Studio built 32bit Qt installed on your system ?

    [edit: added missing compiler SGaist]



  • Qt Creator 4.7.0
    Based on Qt 5.11.1 (MSVC 2015, 32 bit)

    Erstellt am Jul 17 2018 04:27:33

    Revision dedbb40f57

    Copyright 2008-2018 The Qt Company Ltd. All rights reserved.

    The program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.


  • Lifetime Qt Champion

    That's the Qt Creator version, I'm asking about the Qt version(s) you installed.



  • Sorry for the late answer.
    I have just installed 5.9.5


  • Lifetime Qt Champion

    The MinGW version of the Visual Studio version ?



  • MingW 5.3.0 (Thats the Version in Startmenu -> QT
    Dont know were to find the MinGW Version of Visual Studio.

    CMake 3.12.2

    And here some Visual Studio Infos
    Microsoft Visual Studio Community 2017
    Version 15.8.3
    VisualStudio.15.Release/15.8.3+28010.2019
    Microsoft .NET Framework
    Version 4.7.03056

    Installierte Version: Community

    Visual C++ 2017 00369-60000-00001-AA878
    Microsoft Visual C++ 2017

    Allgemeine Azure-Tools 1.10
    Bietet allgemeine Dienste für die Verwendung durch Azure Mobile Services und Microsoft Azure-Tools.

    Application Insights-Tools für Visual Studio-Paket 8.13.10627.1
    Application Insights-Tools für Visual Studio

    ASP.NET and Web Tools 2017 15.8.05077.0
    ASP.NET and Web Tools 2017

    ASP.NET Core Razor Language Services 15.8.31590
    Provides languages services for ASP.NET Core Razor.

    Azure App Service Tools v3.0.0 15.8.05023.0
    Azure App Service Tools v3.0.0

    C#-Tools 2.9.0-beta8-63208-01
    C#-Komponenten, die in der IDE verwendet werden. Je nach Projekttyp und Einstellungen kann eine andere Compilerversion verwendet werden.

    Cookiecutter 15.8.18241.1
    Stellt Tools zum Suchen, Instanziieren und Anpassen von Vorlagen im Cookiecutter-Format bereit.

    JavaScript-Sprachdienst 2.0
    JavaScript-Sprachdienst

    JavaScript Project System 2.0
    JavaScript Project System

    Microsoft Azure-Tools 2.9
    Microsoft Azure-Tools für Microsoft Visual Studio 2017 – v2.9.10730.2

    Microsoft JVM Debugger 1.0
    Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

    Microsoft MI-Based Debugger 1.0
    Provides support for connecting Visual Studio to MI compatible debuggers

    Microsoft Visual C++-Assistenten 1.0
    Microsoft Visual C++-Assistenten

    MLGen Package Extension 1.0
    MLGen Package Visual Studio Extension Detailed Info

    NuGet-Paket-Manager 4.6.0
    NuGet-Paket-Manager in Visual Studio. Weitere Informationen zu NuGet finden Sie unter "http://docs.nuget.org/".

    ProjectServicesPackage Extension 1.0
    ProjectServicesPackage Visual Studio Extension Detailed Info

    Python 15.8.18241.1
    Stellt IntelliSense, Projekte, Vorlagen, Debuggen, interaktive Fenster und weitere Unterstützung für Python-Entwickler bereit.

    Python – Django-Unterstützung 15.8.18241.1
    Stellt Vorlagen und Integration für das Django-Webframework bereit.

    Python – IronPython-Unterstützung 15.8.18241.1
    Stellt Vorlagen und Integration für IronPython-basierte Projekte bereit.

    Python – Unterstützung für die Profilerstellung 15.8.18241.1
    Profilerstellungsunterstützung für Python-Projekte.

    ResourcePackage-Erweiterung 1.0
    Detaillierte Informationen zur ResourcePackage-Erweiterung von Visual Studio

    ResourcePackage-Erweiterung 1.0
    Detaillierte Informationen zur ResourcePackage-Erweiterung von Visual Studio

    Test Adapter for Boost.Test 1.0
    Enables Visual Studio's testing tools with unit tests written for Boost.Test. The use terms and Third Party Notices are available in the extension installation directory.

    TypeScript-Tools 15.8.20801.2001
    TypeScript-Tools für Microsoft Visual Studio

    VC-Paket für Microsoft Visual Studio 1.0
    VC-Paket für Microsoft Visual Studio

    Visual Basic-Tools 2.9.0-beta8-63208-01
    Visual Basic-Komponenten, die in der IDE verwendet werden. Je nach Projekttyp und Einstellungen kann eine andere Version des Compilers verwendet werden.

    Visual C++ für Linux-Entwicklung 1.0.9.27924
    Visual C++ für Linux-Entwicklung

    Visual Studio-Tools für CMake 1.0
    Visual Studio-Tools für CMake

    Visual Studio Code-Debugadapter-Hostpaket 1.0
    Interopebene zum Hosten der Visual Studio Code-Adapter in Visual Studio

    Visual Studio Tools für universelle Windows-Apps 15.0.28010.00
    Mit den Visual Studio Tools für universelle Windows-Apps können Sie eine universelle App-Erfahrung erstellen, die auf jedem Gerät genutzt werden kann, das Windows 10 ausführt: Smartphone, Tablet, PC und viele weitere Geräte. Das Microsoft Windows 10 SDK ist in den Tools enthalten.


  • Lifetime Qt Champion

    You can't mix and match C++ compilers like that. Either you do go full Visual Studio or full MinGW but both are not compatible one with the other. Neither are the Visual Studio versions between except for VS2017 which is compatible with VS2015.



  • Our project is realized with QT but i can build CGAL only with Visual Studio in CMake.

    Thats how the instruction of CGAL tells me:
    I open CMake set the paths and click configure. Now i choose MingW and got a error "Error in configuration process, project files may be invalid"
    I only can build CGAL with Visual Studio.
    If i do that i get a .sln file which should be build in Debug and Realease mode in Visual Studio.

    And now i have the salad :D zefix


  • Moderators

    @username1

    if you compiled CGAL yourself, than you already have a MSVC Compiler on your system.

    Find out what version you used (2012, 2015, 2017, 32bit or 64 bit, etc.) and use the MaintenanceTool of your QtCreator to download the precompiled MSVC Qt-libary.

    QtCreator should auto setup a new kit for you.
    Select the new kit, compile, and you're done.



  • I used Visual Studio 15 2017 in CMake.
    In QT it was already installed.
    New Kit selected. Compiled. Error.
    Some errors qalgorithms.h
    "...\qalgorithms.h:847: error: C3615: Die constexpr-Funktion "qCountLeadingZeroBits" darf keinen konstanten Ausdruck ergeben."


  • Lifetime Qt Champion

    Did you install the 32bit Visual Studio build of Qt ?



  • All Tools and Programs i used are installed in 32Bit


  • Lifetime Qt Champion

    But again: Did you build everything using the same compiler ? And are you sure you are using the correct version of everything to build your application ?



  • Jep i did


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.