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. Still working with tutorials...

Still working with tutorials...

Scheduled Pinned Locked Moved General and Desktop
22 Posts 6 Posters 8.2k Views
  • 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.
  • mzimmersM Offline
    mzimmersM Offline
    mzimmers
    wrote on last edited by
    #8

    Hey, Volker –

    Thanks for the answer. So, if I infer from you correctly, the only essentials are a source file and a project file? Is there some information online specifically about the project file syntax? Perhaps I'll take smar's advice and begin from the command line, though it isn't my first choice.

    1 Reply Last reply
    0
    • G Offline
      G Offline
      goetz
      wrote on last edited by
      #9

      Yepp, that's enough. For your little project consisting of a main.cpp and nothing else, you only need a .pro file. You can create one by calling

      @
      qmake -project
      @

      in the directory containing the main.cpp.

      See the "Getting Started Programming with Qt":http://doc.qt.nokia.com/latest/gettingstartedqt.html, it explains how to do this. Translations into various languages are available in the "wiki":http://developer.qt.nokia.com/wiki/Category:Learning::GettingStarted.

      Once you have a .pro file, just open it in Qt Creator (using the file menu or Ctrl-O/Cmd-O) and you're done. No need to create a new project in this case.

      http://www.catb.org/~esr/faqs/smart-questions.html

      1 Reply Last reply
      0
      • mzimmersM Offline
        mzimmersM Offline
        mzimmers
        wrote on last edited by
        #10

        OK...so I created a directory, created a source file and a .pro file. I ran qmake on the .pro file, and now I have this:
        @
        -rw-r--r-- 1 mzimmers mzimmers 594 Jan 17 14:15 Info.plist
        -rw-r--r-- 1 mzimmers mzimmers 542 Jan 17 14:00 hello.cpp
        -rw-r--r-- 1 mzimmers mzimmers 32 Jan 17 14:15 hello.pro
        drwxr-xr-x 5 mzimmers mzimmers 170 Jan 17 14:15 hello.xcodeproj
        @

        No binary file...so, now I have to run regular make, I guess?

        [EDIT: markup, Volker]

        1 Reply Last reply
        0
        • G Offline
          G Offline
          goetz
          wrote on last edited by
          #11

          If you want to continue on the command line then this "wiki article":http://developer.qt.nokia.com/wiki/Generate_Makefiles_instead_of_XCode_projects_on_Mac_OS_X will help you.

          If you want to use Qt Creator, just open the .pro file in Creator, it runs qmake for you.

          http://www.catb.org/~esr/faqs/smart-questions.html

          1 Reply Last reply
          0
          • mzimmersM Offline
            mzimmersM Offline
            mzimmers
            wrote on last edited by
            #12

            Really? Just opening the .pro file causes qmake to run?

            Also, from one of the instructional videos (which might be out of date by now), I got the impression that one needed to run qmake, then run make. True or not?

            I'm also curious: is it OK to go back and forth between a CLI and Creator for a particular project, or is it better to choose one and stick to it?

            Thanks.

            1 Reply Last reply
            0
            • S Offline
              S Offline
              Smar
              wrote on last edited by
              #13

              [quote author="mzimmers" date="1295304369"]
              I'm also curious: is it OK to go back and forth between a CLI and Creator for a particular project, or is it better to choose one and stick to it?

              Thanks.[/quote]

              It’s best to learn both. You can go around with only one. Your pick, and your timeline and interest what you actually want to accomplish :)

              1 Reply Last reply
              0
              • mzimmersM Offline
                mzimmersM Offline
                mzimmers
                wrote on last edited by
                #14

                [quote author="Smar" date="1295304606"]
                [quote author="mzimmers" date="1295304369"]
                I'm also curious: is it OK to go back and forth between a CLI and Creator for a particular project, or is it better to choose one and stick to it?

                Thanks.[/quote]

                It’s best to learn both. You can go around with only one. Your pick, and your timeline and interest what you actually want to accomplish :)[/quote]

                What I meant was, for a particular project...is it best to use only one of the two interfaces, or can you flip-flop without repercussions? Put another way...is the CLI compatible with Creator and the other GUI tools?

                Thanks.

                1 Reply Last reply
                0
                • G Offline
                  G Offline
                  goetz
                  wrote on last edited by
                  #15

                  [quote author="mzimmers" date="1295304369"]Really? Just opening the .pro file causes qmake to run?

                  Also, from one of the instructional videos (which might be out of date by now), I got the impression that one needed to run qmake, then run make. True or not?

                  I'm also curious: is it OK to go back and forth between a CLI and Creator for a particular project, or is it better to choose one and stick to it?

                  Thanks.[/quote]

                  Qt Creator calls qmake and make for you, captures the output and can bring you to the point in the code where the error happened.

                  It is perfectly ok to switch between CLI and Creator. Although you should keep in mind that the shadow builds, that Creator enables by default, reside in another directory. You should know what you're doing, otherwise you can mess up thing.

                  http://www.catb.org/~esr/faqs/smart-questions.html

                  1 Reply Last reply
                  0
                  • G Offline
                    G Offline
                    goetz
                    wrote on last edited by
                    #16

                    [quote author="mzimmers" date="1295304889"]
                    What I meant was, for a particular project...is it best to use only one of the two interfaces, or can you flip-flop without repercussions? Put another way...is the CLI compatible with Creator and the other GUI tools?
                    [/quote]

                    Shortly: yes.

                    http://www.catb.org/~esr/faqs/smart-questions.html

                    1 Reply Last reply
                    0
                    • mzimmersM Offline
                      mzimmersM Offline
                      mzimmers
                      wrote on last edited by
                      #17

                      Shadow builds...that's a term I haven't come across yet. I assume that is for some default target that Creator keeps track of? I've done some tutorials that have resulted in subdirectories like tutorial6 AND tutorial6-build-desktop...is this what you're talking about? Oddly enough, it doesn't happen all the time.

                      Also, per the Wiki you cited above: I don't seem to have a mkspecs directory anywhere. Was I supposed to create this myself?

                      Thanks.

                      1 Reply Last reply
                      0
                      • G Offline
                        G Offline
                        goetz
                        wrote on last edited by
                        #18

                        A shadow build is a build setup and cycle (creating intermediate and object files as well as the final executable or lib) in an directory outside your source tree.

                        Regarding the wiki article: You do have the dir somewhere, it's where your Qt libs are installed. The actual directory depends on your installation.

                        http://www.catb.org/~esr/faqs/smart-questions.html

                        1 Reply Last reply
                        0
                        • mzimmersM Offline
                          mzimmersM Offline
                          mzimmers
                          wrote on last edited by
                          #19

                          [quote author="Volker" date="1295307950"]Regarding the wiki article: You do have the dir somewhere, it's where your Qt libs are installed. The actual directory depends on your installation.
                          [/quote]

                          I've done a search on my entire HD for a file/directory with that name...nothing. I wonder if I botched something in the installation?

                          1 Reply Last reply
                          0
                          • G Offline
                            G Offline
                            goetz
                            wrote on last edited by
                            #20

                            [quote author="mzimmers" date="1295308733"]
                            I've done a search on my entire HD for a file/directory with that name...nothing. I wonder if I botched something in the installation?[/quote]

                            No, it must be on your HD otherwise qmake would not work at all. You can try

                            @
                            locate mkspecs
                            @

                            in the shell (CLI).

                            http://www.catb.org/~esr/faqs/smart-questions.html

                            1 Reply Last reply
                            0
                            • mzimmersM Offline
                              mzimmersM Offline
                              mzimmers
                              wrote on last edited by
                              #21

                              Right you were...I forgot that Mac OS X hides a bunch of files from me. I found the directory now.

                              Now, a really newbie question: when might I want to make XCode projects instead of conventional makefiles?

                              1 Reply Last reply
                              0
                              • T Offline
                                T Offline
                                tobias.hunger
                                wrote on last edited by
                                #22

                                You want to generate XCode projects when you want to work with the XCode IDE.

                                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