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. How to build program from terminal
Forum Updated to NodeBB v4.3 + New Features

How to build program from terminal

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 299 Views 1 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.
  • J Offline
    J Offline
    JacobNovitsky
    wrote on 29 Jan 2024, 19:09 last edited by
    #1

    If I run build command from Qt Creator I get compiling lines below:

    01:59:54: Running steps for project Project...
    01:59:54: Configuration unchanged, skipping qmake step.
    01:59:54: Starting: "/usr/bin/make" -j8
    g++ -c -pipe -g -std=gnu++1z -Wall -Wextra -fPIC -DQT_QML_DEBUG -I../Project -I. -I../SPL -I/usr/local/Qt-6.4.2/mkspecs/linux-g++ -o Tdebug.o ../Project/Tdebug.cpp
    rm -f libProject.so.1.0.0 liProject.so libProject.so.1 libProject.so.1.0

    g++ -shared -Wl,-soname,libSml.so.1 -o libSml.so.1.0.0 Project.o Tdebug.o main.o -L/home/j/SPL-Debug/debug/debug -lSpl
    ln -s libSml.so.1.0.0 libSml.so
    ln -s libSml.so.1.0.0 libSml.so.1
    ln -s libSml.so.1.0.0 libSml.so.1.0
    rm -f debug/debug/libSml.so.1.0.0
    mv -f libSml.so.1.0.0 debug/debug/libSml.so.1.0.0
    rm -f debug/debug/libSml.so
    rm -f debug/debug/libSml.so.1
    rm -f debug/debug/libSml.so.1.0
    mv -f libSml.so debug/debug/libSml.so
    mv -f libSml.so.1 debug/debug/libSml.so.1
    mv -f libSml.so.1.0 debug/debug/libSml.so.1.0

    I want to proceed the same with terminal command, I can replicate lines above, but I'm looking for something simplified

    J S 2 Replies Last reply 29 Jan 2024, 19:22
    0
    • J JacobNovitsky
      29 Jan 2024, 19:09

      If I run build command from Qt Creator I get compiling lines below:

      01:59:54: Running steps for project Project...
      01:59:54: Configuration unchanged, skipping qmake step.
      01:59:54: Starting: "/usr/bin/make" -j8
      g++ -c -pipe -g -std=gnu++1z -Wall -Wextra -fPIC -DQT_QML_DEBUG -I../Project -I. -I../SPL -I/usr/local/Qt-6.4.2/mkspecs/linux-g++ -o Tdebug.o ../Project/Tdebug.cpp
      rm -f libProject.so.1.0.0 liProject.so libProject.so.1 libProject.so.1.0

      g++ -shared -Wl,-soname,libSml.so.1 -o libSml.so.1.0.0 Project.o Tdebug.o main.o -L/home/j/SPL-Debug/debug/debug -lSpl
      ln -s libSml.so.1.0.0 libSml.so
      ln -s libSml.so.1.0.0 libSml.so.1
      ln -s libSml.so.1.0.0 libSml.so.1.0
      rm -f debug/debug/libSml.so.1.0.0
      mv -f libSml.so.1.0.0 debug/debug/libSml.so.1.0.0
      rm -f debug/debug/libSml.so
      rm -f debug/debug/libSml.so.1
      rm -f debug/debug/libSml.so.1.0
      mv -f libSml.so debug/debug/libSml.so
      mv -f libSml.so.1 debug/debug/libSml.so.1
      mv -f libSml.so.1.0 debug/debug/libSml.so.1.0

      I want to proceed the same with terminal command, I can replicate lines above, but I'm looking for something simplified

      J Offline
      J Offline
      JoeCFD
      wrote on 29 Jan 2024, 19:22 last edited by JoeCFD
      #2

      @JacobNovitsky cd your build dir and simply type make -j8?
      if you want to create Makefile from command line, open Makefile(generated from QtCreator) in an editor and find the line Command to run it.
      make distclean will remove everything in the build dir.

      1 Reply Last reply
      2
      • J JacobNovitsky
        29 Jan 2024, 19:09

        If I run build command from Qt Creator I get compiling lines below:

        01:59:54: Running steps for project Project...
        01:59:54: Configuration unchanged, skipping qmake step.
        01:59:54: Starting: "/usr/bin/make" -j8
        g++ -c -pipe -g -std=gnu++1z -Wall -Wextra -fPIC -DQT_QML_DEBUG -I../Project -I. -I../SPL -I/usr/local/Qt-6.4.2/mkspecs/linux-g++ -o Tdebug.o ../Project/Tdebug.cpp
        rm -f libProject.so.1.0.0 liProject.so libProject.so.1 libProject.so.1.0

        g++ -shared -Wl,-soname,libSml.so.1 -o libSml.so.1.0.0 Project.o Tdebug.o main.o -L/home/j/SPL-Debug/debug/debug -lSpl
        ln -s libSml.so.1.0.0 libSml.so
        ln -s libSml.so.1.0.0 libSml.so.1
        ln -s libSml.so.1.0.0 libSml.so.1.0
        rm -f debug/debug/libSml.so.1.0.0
        mv -f libSml.so.1.0.0 debug/debug/libSml.so.1.0.0
        rm -f debug/debug/libSml.so
        rm -f debug/debug/libSml.so.1
        rm -f debug/debug/libSml.so.1.0
        mv -f libSml.so debug/debug/libSml.so
        mv -f libSml.so.1 debug/debug/libSml.so.1
        mv -f libSml.so.1.0 debug/debug/libSml.so.1.0

        I want to proceed the same with terminal command, I can replicate lines above, but I'm looking for something simplified

        S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 29 Jan 2024, 19:22 last edited by
        #3

        Hi,

        The command is literally: /usr/bin/make -j8

        You could short it to make -j8.

        Note that this is called from within the build folder.

        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
        2

        1/3

        29 Jan 2024, 19:09

        • Login

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