Older versions versus new



  • Hello!

    I have a general question, if I have files and projects previously done on Qt Creator software 4.1.0 and Qt version 5.7 for MSVC2015, will I be able to run and build these on the most new versions? (Qt Creator software 4.81 and Qt Version 5.12 with MSVC2017)

    Thank you!


  • Lifetime Qt Champion

    Hi,

    Yes you will.



  • @SGaist are there any modifications that you now of that must be made in order to make this transition? I am currently working on some old files and trying to set up Qt creator to build and run these but no luck so far.


  • Qt Champions 2018

    @yuliana a version jump from 5.7 to 5.12 should be unproblematic.

    Please tell us your specific problems/error messages so e can help you.

    Regards



  • @aha_1980 I have setup my build and run settings but continue to receive this error.

    0_1557020906118_build settings.PNG

    0_1557020923269_image.png

    I am following the steps my coworker did for his Qt version, but I am not quite sure where I went wrong.


  • Qt Champions 2018

    @yuliana sorry, I'm still not sure which error you are referring to.


  • Lifetime Qt Champion

    Did you point your kit to your installed version of CMake ?



  • @aha_1980 I am referring to the warning I am receiving.


  • Qt Champions 2018

    @yuliana

    I am referring to the warning I am receiving.

    The CMake warning? Do you use CMake at all? Have you installed it? And as @SGaist already asked:

    Did you point your kit to your installed version of CMake ?

    Regards



  • @aha_1980 @SGaist Yes this is what I have applied thus far.

    0_1557430834606_image (1).png

    0_1557430850477_image (2).png


  • Lifetime Qt Champion

    Are you setting the build type anywhere in your own project ?



  • @SGaist not sure what you mean by that so I am going to go ahead and say no!


  • Lifetime Qt Champion

    Then check in CMakeList.txt.user



  • @SGaist what exactly should I check in that file?


  • Lifetime Qt Champion

    Whether it contains anything related to the build type.



  • @SGaist I'm not quite sure where to find that file, this is all I have for the CMake folder.

    0_1557514705853_01.PNG

    And this is the CMakeLists.txt file I have in my projects folder.
    0_1557514787732_002.PNG


  • Lifetime Qt Champion

    That file should be generated when you configured your project in Qt Creator.

    Can you show your CMakeLists.txt file content ?



  • @SGaist is it okay if I send you this file over chat? It might be too big to post. Also regarding the file that should be generated when configuring the project, I believe it has not been created yet.



  • @SGaist I wasn't able to send it to you so here it is:

    #  Software License Agreement (BSD License)
    #  Copyright (c) 2003-2015, CHAI3D.
    #  (www.chai3d.org)
    #
    #  All rights reserved.
    #
    #  Redistribution and use in source and binary forms, with or without
    #  modification, are permitted provided that the following conditions
    #  are met:
    #
    #  * Redistributions of source code must retain the above copyright
    #  notice, this list of conditions and the following disclaimer.
    #
    #  * Redistributions in binary form must reproduce the above
    #  copyright notice, this list of conditions and the following
    #  disclaimer in the documentation and/or other materials provided
    #  with the distribution.
    #
    #  * Neither the name of CHAI3D nor the names of its contributors may
    #  be used to endorse or promote products derived from this software
    #  without specific prior written permission.
    #
    #  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    #  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    #  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
    #  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
    #  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
    #  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
    #  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
    #  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
    #  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
    #  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
    #  ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
    #  POSSIBILITY OF SUCH DAMAGE.
    #
    #  $Author: seb $
    #  $Date: 2015-06-16 14:08:43 +1200 (Tue, 16 Jun 2015) $
    #  $Rev: 1734 $
    #
    # configuration
    #
    cmake_minimum_required (VERSION 2.8.12)
    project (SGL-MOM)
    # version info
    file (READ ${PROJECT_SOURCE_DIR}/src/version VERSION)
    STRING(REGEX REPLACE ".*MAJOR=([0-9]+).*" "\\1" MAJOR_VERSION "${VERSION}")
    STRING(REGEX REPLACE ".*MINOR=([0-9]+).*" "\\1" MINOR_VERSION "${VERSION}")
    STRING(REGEX REPLACE ".*RELEASE=([0-9]+).*" "\\1" RELEASE_VERSION "${VERSION}")
    set(PROJECT_VERSION ${MAJOR_VERSION}.${MINOR_VERSION}.${RELEASE_VERSION})
    # platform detection
    if (CMAKE_SYSTEM_NAME MATCHES Windows)
      set (OS "win")
      if (CMAKE_CL_64)
        set (ARCH "x64")
      else ()
        set (ARCH "x86")
      endif ()
    elseif (CMAKE_SYSTEM_NAME MATCHES Darwin)
      set (OS "mac")
      if (CMAKE_SIZEOF_VOID_P EQUAL 8)
        set (ARCH "x86_64")
      else ()
        set (ARCH "i386")
      endif ()
    elseif (CMAKE_SYSTEM_NAME MATCHES Linux) 
      set (OS "lin")
      if (CMAKE_SIZEOF_VOID_P EQUAL 8)
        set (ARCH "x86_64")
      else ()
        set (ARCH "i686")
      endif ()
    endif ()
    # output location
    set (CMAKE_RUNTIME_OUTPUT_DIRECTORY                ${PROJECT_SOURCE_DIR}/bin)
    set (CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG          ${PROJECT_SOURCE_DIR}/bin)
    set (CMAKE_RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL     ${PROJECT_SOURCE_DIR}/bin)
    set (CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE        ${PROJECT_SOURCE_DIR}/bin)
    set (CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${PROJECT_SOURCE_DIR}/bin)
    # on Windows, freeglut dependency
    if (CMAKE_SYSTEM_NAME MATCHES Windows)
      add_subdirectory (${PROJECT_SOURCE_DIR}/extras/freeglut)
    # on non-Windows, DHD dependency
    else ()
      include_directories (${PROJECT_SOURCE_DIR}/external/DHD/include)
      set (DHD_LIBRARY_DIRS ${PROJECT_SOURCE_DIR}/external/DHD/lib/${OS}-${ARCH})
      link_directories (${DHD_LIBRARY_DIRS})
    endif ()
    # Windows global build options
    if (CMAKE_SYSTEM_NAME MATCHES Windows)
      # VisualStudio compiler
      if (MSVC)
        add_definitions (-D_CRT_SECURE_NO_DEPRECATE)
        if (CMAKE_CL_64)
          add_definitions (-DWIN64)
        else ()
          add_definitions (-DWIN32)
        endif ()
        
      # MinGW compiler
      elseif (MINGW)
        add_definitions (-DWIN32)
        set (CMAKE_CXX_FLAGS                "${CMAKE_CXX_FLAGS}                -march=native -std=c++0x")
        set (CMAKE_CXX_FLAGS_DEBUG          "${CMAKE_CXX_FLAGS_DEBUG}          -march=native -std=c++0x")
        set (CMAKE_CXX_FLAGS_MINSIZEREL     "${CMAKE_CXX_FLAGS_MINSIZEREL}     -march=native -std=c++0x")
        set (CMAKE_CXX_FLAGS_RELEASE        "${CMAKE_CXX_FLAGS_RELEASE}        -march=native -std=c++0x")
        set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -march=native -std=c++0x")
        set (CMAKE_C_FLAGS                  "${CMAKE_C_FLAGS}                  -march=native")
        set (CMAKE_C_FLAGS_DEBUG            "${CMAKE_C_FLAGS_DEBUG}            -march=native")
        set (CMAKE_C_FLAGS_MINSIZEREL       "${CMAKE_C_FLAGS_MINSIZEREL}       -march=native")
        set (CMAKE_C_FLAGS_RELEASE          "${CMAKE_C_FLAGS_RELEASE}          -march=native")
        set (CMAKE_C_FLAGS_RELWITHDEBINFO   "${CMAKE_C_FLAGS_RELWITHDEBINFO}   -march=native")
      endif ()
    # Linux global build options
    elseif (CMAKE_SYSTEM_NAME MATCHES Linux)
      add_definitions (-DLINUX)
      set (CMAKE_CXX_FLAGS                "${CMAKE_CXX_FLAGS}                -fPIC -march=native -std=c++0x")
      set (CMAKE_CXX_FLAGS_DEBUG          "${CMAKE_CXX_FLAGS_DEBUG}          -fPIC -march=native -std=c++0x")
      set (CMAKE_CXX_FLAGS_MINSIZEREL     "${CMAKE_CXX_FLAGS_MINSIZEREL}     -fPIC -march=native -std=c++0x")
      set (CMAKE_CXX_FLAGS_RELEASE        "${CMAKE_CXX_FLAGS_RELEASE}        -fPIC -march=native -std=c++0x")
      set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -fPIC -march=native -std=c++0x")
      set (CMAKE_C_FLAGS                  "${CMAKE_C_FLAGS}                  -fPIC -march=native")
      set (CMAKE_C_FLAGS_DEBUG            "${CMAKE_C_FLAGS_DEBUG}            -fPIC -march=native")
      set (CMAKE_C_FLAGS_MINSIZEREL       "${CMAKE_C_FLAGS_MINSIZEREL}       -fPIC -march=native")
      set (CMAKE_C_FLAGS_RELEASE          "${CMAKE_C_FLAGS_RELEASE}          -fPIC -march=native")
      set (CMAKE_C_FLAGS_RELWITHDEBINFO   "${CMAKE_C_FLAGS_RELWITHDEBINFO}   -fPIC -march=native")
    # Mac OS X global build options
    elseif (CMAKE_SYSTEM_NAME MATCHES Darwin)
      add_definitions (-DMACOSX)
      set (CMAKE_CXX_FLAGS                "${CMAKE_CXX_FLAGS}                -Qunused-arguments -Wno-deprecated -std=c++0x -stdlib=libc++")
      set (CMAKE_CXX_FLAGS_DEBUG          "${CMAKE_CXX_FLAGS_DEBUG}          -Qunused-arguments -Wno-deprecated -std=c++0x -stdlib=libc++")
      set (CMAKE_CXX_FLAGS_MINSIZEREL     "${CMAKE_CXX_FLAGS_MINSIZEREL}     -Qunused-arguments -Wno-deprecated -std=c++0x -stdlib=libc++")
      set (CMAKE_CXX_FLAGS_RELEASE        "${CMAKE_CXX_FLAGS_RELEASE}        -Qunused-arguments -Wno-deprecated -std=c++0x -stdlib=libc++")
      set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -Qunused-arguments -Wno-deprecated -std=c++0x -stdlib=libc++")
      set (CMAKE_C_FLAGS                  "${CMAKE_C_FLAGS}                  -Qunused-arguments -Wno-deprecated")
      set (CMAKE_C_FLAGS_DEBUG            "${CMAKE_C_FLAGS_DEBUG}            -Qunused-arguments -Wno-deprecated")
      set (CMAKE_C_FLAGS_MINSIZEREL       "${CMAKE_C_FLAGS_MINSIZEREL}       -Qunused-arguments -Wno-deprecated")
      set (CMAKE_C_FLAGS_RELEASE          "${CMAKE_C_FLAGS_RELEASE}          -Qunused-arguments -Wno-deprecated")
      set (CMAKE_C_FLAGS_RELWITHDEBINFO   "${CMAKE_C_FLAGS_RELWITHDEBINFO}   -Qunused-arguments -Wno-deprecated")
    endif ()
    # 
    # static library
    # 
    # header search path
    include_directories (${PROJECT_SOURCE_DIR}/src)
    include_directories (${PROJECT_SOURCE_DIR}/external/Eigen)
    include_directories (${PROJECT_SOURCE_DIR}/external/glew/include)
    include_directories (${PROJECT_SOURCE_DIR}/external/giflib/include)
    include_directories (${PROJECT_SOURCE_DIR}/external/lib3ds/include)
    include_directories (${PROJECT_SOURCE_DIR}/external/libjpeg/include)
    include_directories (${PROJECT_SOURCE_DIR}/external/libpng/include)
    include_directories (${PROJECT_SOURCE_DIR}/external/openal/include)
    include_directories (${PROJECT_SOURCE_DIR}/external/openal/OpenAL32/Include)
    include_directories (${PROJECT_SOURCE_DIR}/external/openal/Alc)
    include_directories (${PROJECT_SOURCE_DIR}/external/theoraplayer/include/theoraplayer)
    include_directories (${PROJECT_SOURCE_DIR}/external/theoraplayer/external/ogg/include)
    include_directories (${PROJECT_SOURCE_DIR}/external/theoraplayer/external/theora/include)
    include_directories (${PROJECT_SOURCE_DIR}/external/theoraplayer/external/vorbis/include)
    include_directories (${PROJECT_SOURCE_DIR}/external/theoraplayer/external/vorbis/lib)
    include_directories (${PROJECT_SOURCE_DIR}/external/theoraplayer/src/Theora)
    # static library source files
    file (GLOB_RECURSE source ${CHAI3D_SOURCE_DIR}/src/*.cpp)
    # static library external dependencies source files
    file (GLOB_RECURSE source_gif       ${PROJECT_SOURCE_DIR}/external/giflib/src/*.c)
    file (GLOB_RECURSE source_glew      ${PROJECT_SOURCE_DIR}/external/glew/src/*.c)
    file (GLOB_RECURSE source_3ds       ${PROJECT_SOURCE_DIR}/external/lib3ds/src/*.c)
    file (GLOB_RECURSE source_jpeg      ${PROJECT_SOURCE_DIR}/external/libjpeg/src/*.c)
    file (GLOB_RECURSE source_png       ${PROJECT_SOURCE_DIR}/external/libpng/src/*.c)
    file (GLOB_RECURSE source_openal    ${PROJECT_SOURCE_DIR}/external/openal/*.c)
    file (GLOB_RECURSE source_theorac   ${PROJECT_SOURCE_DIR}/external/theoraplayer/*.c)
    file (GLOB_RECURSE source_theoracpp ${PROJECT_SOURCE_DIR}/external/theoraplayer/*.cpp)
    # platform-specific source files adjustments
    if (CMAKE_SYSTEM_NAME MATCHES Windows)
      file (GLOB_RECURSE source_theora_exclude ${PROJECT_SOURCE_DIR}/external/theoraplayer/external/theora/lib/x86/*.c)
    else ()
      file (GLOB_RECURSE source_theora_exclude ${PROJECT_SOURCE_DIR}/external/theoraplayer/external/theora/lib/x86_vc/*.c)
    endif ()
    list (REMOVE_ITEM source_theorac ${source_theora_exclude})
    # build flags
    add_definitions (${PROJECT_DEFINITIONS} -DGLEW_STATIC -DAL_ALEXT_PROTOTYPES -DAL_BUILD_LIBRARY -DAL_LIBTYPE_STATIC -D__THEORA -D_LIB)
    # static library
    add_library (chai3d STATIC ${source} ${source_gif} ${source_glew} ${source_3ds} ${source_jpeg} ${source_png} ${source_openal} ${source_theorac} ${source_theoracpp} ${source_dcmdata} ${source_libi2d} ${source_dcmimage} ${source_dcmimgle} ${source_oflog} ${source_ofstd})
    # library exports
    set (CHAI3D_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/src" "${PROJECT_SOURCE_DIR}/external/Eigen" "${PROJECT_SOURCE_DIR}/external/glew/include")
    set (CHAI3D_LIBRARIES chai3d)
    set (CHAI3D_DEFINITIONS ${PROJECT_DEFINITIONS})
    if (NOT CMAKE_SYSTEM_NAME MATCHES Windows)
      set (CHAI3D_LIBRARIES ${CHAI3D_LIBRARIES} drd)
      set (CHAI3D_LIBRARY_DIRS ${CHAI3D_LIBRARY_DIRS} ${DHD_LIBRARY_DIRS})
    endif ()
    if (${OS} MATCHES lin)
      set (CHAI3D_LIBRARIES ${CHAI3D_LIBRARIES} usb-1.0 rt pthread dl)
    elseif (${OS} MATCHES mac)
      set (CHAI3D_LIBRARIES ${CHAI3D_LIBRARIES} "-framework CoreFoundation" "-framework IOKit" "-framework OpenGL" "-framework CoreServices" "-framework CoreAudio" "-framework AudioToolbox" "-framework AudioUnit")
    endif ()
    set (CHAI3D_SOURCE_DIR ${PROJECT_SOURCE_DIR})
    # 
    # executables
    # 
    # examples
    add_subdirectory(${PROJECT_SOURCE_DIR}/examples)
    # utilities
    if (EXISTS ${PROJECT_SOURCE_DIR}/utils)
      add_subdirectory (${PROJECT_SOURCE_DIR}/utils)
    endif ()
    # 
    # export package
    # 
    # export package for use from the build tree
    export (TARGETS chai3d FILE ${PROJECT_BINARY_DIR}/CHAI3DTargets.cmake)
    export (PACKAGE CHAI3D)
    # package definitions
    set (CONF_INCLUDE_DIRS ${CHAI3D_INCLUDE_DIRS})
    set (CONF_LIBRARIES    ${CHAI3D_LIBRARIES})
    set (CONF_LIBRARY_DIRS ${CHAI3D_LIBRARY_DIRS})
    set (CONF_DEFINITIONS  ${CHAI3D_DEFINITIONS})
    set (CONF_SOURCE_DIR   ${CHAI3D_SOURCE_DIR})
    # package configuration and version files
    configure_file(CHAI3DConfig.cmake.in "${PROJECT_BINARY_DIR}/CHAI3DConfig.cmake" @ONLY)
    configure_file(CHAI3DConfigVersion.cmake.in "${PROJECT_BINARY_DIR}/CHAI3DConfigVersion.cmake" @ONLY)
    

    [edit: Added code tags SGaist]


  • Lifetime Qt Champion

    Looks fine.

    What do you have in C:/Files/Applications/SGL-MOM/3.2.0/ ?



  • @yuliana said in Older versions versus new:

    @SGaist I'm not quite sure where to find that file, this is all I have for the CMake folder.

    0_1557514705853_01.PNG

    And this is the CMakeLists.txt file I have in my projects folder.
    0_1557514787732_002.PNG

    The second image here shows!


  • Lifetime Qt Champion

    One thing I would do is to search through all the content of these folder to find out what defines the build type.


Log in to reply
 

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