Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. lrelease can't find files
Qt 6.11 is out! See what's new in the release blog

lrelease can't find files

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 2.0k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    coding-qt
    wrote on last edited by
    #1

    Greetings,

    I'm trying to compile a Qt project in Xcode.

    My project structure is as follows:
    Tutorial
    | - Common
    | | - src
    | | | - *.cxx
    | | | - *.h
    | | | - Common-icon.ts
    | | | - Common-string.ts
    | | - res
    | - src
    | | - Main.cxx
    | | - *.cxx
    | - Tutorial.pro

    Tutorial.pro is defined as follows.

    TEMPLATE = app
    CONFIG += debug_and_release qt
    
    TARGET = Tutorial
    
    # SAMPLESROOT = $$quote($$(CSF_OCCTSamplesPath)/qt)
    SAMPLESROOT = "Desktop/Tutorial/"
    
    HEADERS   = src/*.h \
                $${SAMPLESROOT}/Common/src/*.h \
                $${SAMPLESROOT}/Interface/src/*.h
    
    SOURCES   = src/*.cxx \
                $${SAMPLESROOT}/Common/src/*.cxx \
                $${SAMPLESROOT}/Interface/src/*.cxx
    
    TS_FILES  = $${SAMPLESROOT}/Common/src/Common-icon.ts \
                $${SAMPLESROOT}/Common/src/Common-string.ts \
                ./src/Tutorial-icon.ts \
                ./src/Tutorial-string.ts
    
    RES_FILES = $${SAMPLESROOT}/Common/res/* \
                ./res/*
    
    RES_DIR   = $$quote($$(RES_DIR))
    
    INCLUDEPATH += $$quote($${SAMPLESROOT}/Common/src)
    INCLUDEPATH += $$quote($${SAMPLESROOT}/Interface/src)
    INCLUDEPATH += $$quote($$(CSF_OCCTIncludePath))
    
    OCCT_DEFINES = $$(CSF_DEFINES)
    
    DEFINES = $$split(OCCT_DEFINES, ;)
    
    unix {
        UNAME = $$system(uname -s)
        LIBLIST = $$(LD_LIBRARY_PATH)
        LIBPATHS = $$split(LIBLIST,":")
        for(lib, LIBPATHS):LIBS += -L$${lib}
    
        CONFIG(debug, debug|release) {
            DESTDIR = ./$$UNAME/bind
            OBJECTS_DIR = ./$$UNAME/objd
            MOC_DIR = ./$$UNAME/mocd
        } else {
            DESTDIR = ./$$UNAME/bin
            OBJECTS_DIR = ./$$UNAME/obj
            MOC_DIR = ./$$UNAME/moc
        }
    
        MACOSX_USE_GLX = $$(MACOSX_USE_GLX)
    
        !macx | equals(MACOSX_USE_GLX, true): INCLUDEPATH += $$QMAKE_INCDIR_X11 $$QMAKE_INCDIR_OPENGL $$QMAKE_INCDIR_THREAD
        equals(MACOSX_USE_GLX, true): DEFINES += MACOSX_USE_GLX
        DEFINES += OCC_CONVERT_SIGNALS QT_NO_STL
        !macx | equals(MACOSX_USE_GLX, true): LIBS += -L$$QMAKE_LIBDIR_X11 $$QMAKE_LIBS_X11 -L$$QMAKE_LIBDIR_OPENGL $$QMAKE_LIBS_OPENGL $$QMAKE_LIBS_THREAD
        LIBS += -lfreeimageplus
        LIBS += -ltbb -ltbbmalloc
        QMAKE_CXXFLAGS += -std=gnu++11
    }
    
    win32 {
        CONFIG(debug, debug|release) {
            DEFINES += _DEBUG
            DESTDIR = ./win$(ARCH)/$(VCVER)/bind
            OBJECTS_DIR = ./win$(ARCH)/$(VCVER)/objd
            MOC_DIR = ./win$(ARCH)/$(VCVER)/mocd
        } else {
            DEFINES += NDEBUG
            DESTDIR = ./win$(ARCH)/$(VCVER)/bin
            OBJECTS_DIR = ./win$(ARCH)/$(VCVER)/obj
            MOC_DIR = ./win$(ARCH)/$(VCVER)/moc
        }
        LIBS = -L$$(QTDIR)/lib;$$(CSF_OCCTLibPath)
        DEFINES += NO_COMMONSAMPLE_EXPORTS NO_IESAMPLE_EXPORTS
    }
    
    LIBS += -lTKernel -lTKMath -lTKService -lTKV3d -lTKOpenGl \
            -lTKBRep -lTKIGES -lTKSTL -lTKVRML -lTKSTEP -lTKSTEPAttr -lTKSTEP209 \
            -lTKSTEPBase -lTKGeomBase -lTKGeomAlgo -lTKG3d -lTKG2d \
            -lTKXSBase -lTKShHealing -lTKHLR -lTKTopAlgo -lTKMesh -lTKPrim \
            -lTKCDF -lTKBool -lTKBO -lTKFillet -lTKOffset \
    
    !exists($${RES_DIR}) {
        win32 {
            system(mkdir $${RES_DIR})
        } else {
            system(mkdir -p $${RES_DIR})
        }
    }
    
    lrelease.name = LRELEASE ${QMAKE_FILE_IN}
    lrelease.commands = lrelease ${QMAKE_FILE_IN} -qm $${RES_DIR}/${QMAKE_FILE_BASE}.qm
    lrelease.output = ${QMAKE_FILE_BASE}.qm
    lrelease.input = TS_FILES
    lrelease.clean = $${RES_DIR}/${QMAKE_FILE_BASE}.qm
    lrelease.CONFIG += no_link target_predeps
    QMAKE_EXTRA_COMPILERS += lrelease
    
    copy_res.name = Copy resource ${QMAKE_FILE_IN}
    copy_res.output = ${QMAKE_FILE_BASE}${QMAKE_FILE_EXT}
    copy_res.clean = $${RES_DIR}/${QMAKE_FILE_BASE}${QMAKE_FILE_EXT}
    copy_res.input = RES_FILES
    copy_res.CONFIG += no_link target_predeps
    win32: copy_res.commands = type ${QMAKE_FILE_IN} > $${RES_DIR}/${QMAKE_FILE_BASE}${QMAKE_FILE_EXT}
    unix:  copy_res.commands = cp -f ${QMAKE_FILE_IN} $${RES_DIR}
    QMAKE_EXTRA_COMPILERS += copy_res
    #QMAKE_CXXFLAGS += /wd4996
    
    greaterThan(QT_MAJOR_VERSION, 4) {
        QT += widgets
    } 
    
    

    I run to generate the Xcode project file.

    qmake -spec macx-xcode Tutorial.pro
    

    However, on trying to build Main.cxx, I get the error

    lrelease Common/src/Common-icon.ts -qm /Common-icon.qm
    make: lrelease: No such file or directory
    make: *** [Common-icon.qm] Error 1
    

    How could I proceed to resolve this error?

    Thanks!

    PS: I'm new to Qt but a quick learner :)

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      How did you install Qt ?
      Which version ?
      Which version of macOS ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • C Offline
        C Offline
        coding-qt
        wrote on last edited by
        #3

        I installed Qt using the online installer.

        $ qmake --version
        QMake version 3.1
        Using Qt version 5.8.0
        

        MacOSX 10.12

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Can you update to the latest version ? It's currently 5.9.1.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved