Results 1 to 4 of 4

Thread: Help converting cmd_line to QTCreator

  1. #1
    Join Date
    Feb 2011
    Posts
    2
    Platforms
    Windows

    Default Help converting cmd_line to QTCreator

    Hi,

    I am brandy-spanking new to QT (and particularly QT Creator)

    I have downloaded the latest, non-beta version of Creator for the Windows environment.

    I am attempting to edit, build, and debug a previously written C++ application that targets (an embedded) device running linux.

    I did the Creator install and then loaded the (again, previously developed) project file (.pro) --- it loaded wonderfully, all files are visible and it allows me to do some of the neat stuff like switch between the .cpp and .h. So I think the basis for my work is achieved.

    Now we get to the trickier part.

    The previous owner, developed and built the app on a linux box using typical command prompt mechanisms which include, of course, a Makefile.

    And so we finally arrive at my question(s):

    1.
    I note that Creator uses a 'qmake' of the form:
    qmake.exe "C:/my_mainFolder/my_src/uimr.pro" -r -spec win32-g++

    and then a call to mingw32-make.exe -w

    ====> If I want to "reproduce" the output of the command line (MakeFile) mechanisms do I replace one or both of the "standard" build commands above with something that points, instead, to the original MAKEFILE?

    2.
    The MAKEFILE in question will without doubt have references to places that absolutely will not exist ... say, for example, "/etc" or "/tmp"

    ====> Is there any help in recreating the "old" MAKEFILE to one that the Windows environment can use to get the same resulting executable?

    3.
    Is there any manner that allows me to run/debug the output of this build on Windows even though its targeting an embedded linux environment?

    Thanks,

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Help converting cmd_line to QTCreator

    qmake generates a Makefile to build your project based on the PRO file. It does this to provide a cross platform build system. You might consider creating a PRO file (or set of them) to match the logic of the existing Makefile.

    If you want to use an existing Makefile (i.e. no qmake) from a Linux environment then you should import it into Qt Creator as a a generic project: see "Setting Up a Generic Project" in the Qt Creator help.

    The likelihood is that the Makefile will try to use commands/place that do not exist in the Windows or Qt bundled minimal MingW environment. You might get lucky and only have to parameterise a few directory names, or you might have wholesale changes to deal with. How you deal with these will be a case-by-case thing.

    You can test the existing Makefile (without Qt Creator involved) from the Qt Command Prompt in Windows: cd to your source directory, type mingw32-make, and see how well the build goes.

  3. #3
    Join Date
    Feb 2011
    Posts
    2
    Platforms
    Windows

    Default Re: Help converting cmd_line to QTCreator

    Thanks....

    I decided to try to go back a a STEP #1 of sorts and just get one or more examples provided in the QT download to build.. which it doesn't

    I am enclosing screenshots of the project IDE with compile output as well as a shot of the build parms page...

    It appears to me that there is the classic issue of "decorated" headings versus non-decorated (the "C" vs. "C++" issue with compilers.) I can find no place to indicate (at the GUI Level) how to fix this... and if its an adjustment to the G++ parms or the qMake or the .PRO I have no idea how to do that....

    Any help to get an example to build in my windows environment would be greatly appreciated.

    thanks,

  4. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Help converting cmd_line to QTCreator

    The errors indicate that the linker is not able to find the Qt libraries. Check the Qt Creator settings under Tools, Options, Qt4 to see that Qt 4.7.0 is correctly located (that's what your project is trying to use). Qt 4.7.0 must also have been built using MingW, not MSVC or another compiler.

Similar Threads

  1. QtCreator 2.0 crashes application working in QtCreator 1.3
    By been_1990 in forum Qt Programming
    Replies: 2
    Last Post: 21st September 2010, 13:58
  2. Replies: 1
    Last Post: 10th February 2010, 08:28
  3. Converting UIC 2 .h & .Cpp
    By jibolso in forum Newbie
    Replies: 5
    Last Post: 5th September 2009, 14:28
  4. Converting QT 4 to VC++
    By vvbkumar in forum Qt Programming
    Replies: 3
    Last Post: 22nd June 2006, 14:54
  5. Converting my UI to Qt4
    By Honestmath in forum Qt Programming
    Replies: 1
    Last Post: 15th April 2006, 00:58

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.