Results 1 to 11 of 11

Thread: compiling

  1. #1
    Join Date
    Nov 2011
    Posts
    20
    Qt products
    Qt4
    Platforms
    Windows

    Default compiling

    I'm trying to learn to compile projects into an exe file, but I'm having a hard time doing it. I'm not sure what to do. lol, even when programming console apps I never built an exe, I was just learning the language...but anyway

    I was messing around in MinGW, and finally ended up with an exe file in my Debug folder for the project. When I tried to run it I got and error saying something like "mingWM10.dll" is missing..

    I'm not sure about how to compile the project right..

    any ideas?

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: compiling

    The compilation went fine, but you have to ensure that the application can find its needed dlls. So have a look at the documentation on how to deploy a win application. It is very well described there.

  3. #3
    Join Date
    Nov 2011
    Posts
    20
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: compiling

    Hey thanks. You wouldn't happen to have a link for the online documentation to the section I need? I've got a copy of the qt creator documentation here, but I don't know where to click in the documentation, or if I'm even looking at the right documentation for what you were talking about, lol.


    this is the doc from QTcreator is that what you're talking about?
    Introducing Qt Creator
    Qt Creator User Interface
    Getting Started
    Building and Running an Example Application
    Creating a Qt Quick Application
    Creating a Qt Quick Application Using Qt Quick Components
    Creating a Qt Widget Based Application
    Creating a Qt Widget Based Mobile Application
    Managing Projects
    Creating a Project
    Opening a Project
    Adding Libraries to Projects
    Connecting MeeGo Harmattan Devices
    Connecting Generic Linux Devices
    Connecting Maemo Devices
    Connecting Symbian Devices
    Managing Sessions
    Coding
    Using the Editor
    Semantic Highlighting
    Checking Code Syntax
    Completing Code
    Indenting Code
    Finding and Replacing
    Refactoring
    Using Qt Quick Toolbars
    Searching With the Locator
    Pasting and Fetching Code Snippets
    Using Text Editing Macros
    Configuring the Editor
    Using FakeVim Mode
    Developing Application UI
    Developing Qt Quick Applications
    Creating Qt Quick Projects
    Using Qt Quick Designer
    Creating Components
    Creating Buttons
    Creating Scalable Buttons and Borders
    Creating Screens
    Animating Screens
    Adding User Interaction Methods
    Exporting Designs from Graphics Software
    Implementing Application Logic
    Using QML Modules with Plugins
    Developing Widget Based Applications
    Optimizing Applications for Mobile Devices
    Building and Running Applications
    Building Applications for Multiple Targets
    Running Applications on Multiple Targets
    Specifying Build Settings
    Adding Qt Versions
    Adding Tool Chains
    Specifying Run Settings
    Specifying Editor Settings
    Specifying Code Style Settings
    Specifying Dependencies
    Debugging
    Debugging the Example Application
    Launching the Debugger
    Interacting with the Debugger
    Setting Up Debugger
    Using Debugging Helpers
    Debugging Qt Quick Projects
    Troubleshooting Debugger
    Analyzing Code
    Profiling QML Applications
    Detecting Memory Leaks
    Profiling Function Execution
    Running Valgrind Tools Remotely
    Deploying Applications to Mobile Devices
    Deploying Applications to Symbian Devices
    Deploying Applications to Maemo or MeeGo Harmattan Devices
    Publishing Maemo Applications to Extras-devel
    Publishing Applications to Ovi Store
    Building with Remote Compiler
    Getting Help
    Advanced Use
    Operating Systems and Supported Platforms
    Adding New Custom Wizards
    Setting Up a CMake Project
    Setting Up a Generic Project
    Using Version Control Systems
    Adding Qt Designer Plugins
    Using External Tools
    Using Maemo or MeeGo Harmattan Emulator
    Editing MIME Types
    Showing Task List Files in the Build Issues Pane
    Using Command Line Options
    Keyboard Shortcuts
    FAQ
    Tips and Tricks
    Known Issues
    Technical Support
    Glossary
    Acknowledgements

  4. #4
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: compiling

    look here: http://doc.qt.nokia.com/latest/deployment.html and here: http://doc.qt.nokia.com/latest/deployment-windows.html

    If you can't find anything in the documentation, google is your friend.

  5. #5
    Join Date
    Nov 2011
    Posts
    20
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: compiling

    Hey, thanks for the links. I'll have a look through, and see what I can find. I've already tried Google, I find the links, and information a bit confusing..most of it aimed at people that know what they're doing, lol, that's why I posted here...I'm gonna read through the links though, thanks.


    Added after 42 minutes:


    Hey, I'm trying to follow along with the second link. I've got MinGW open. it says to go to the dir of qt. I've done that. on this pc it's C:\QtSDK\QtCreator\bin\ . That's where the exe file for qt creator is. It says to type a configure command, and then nmake sub-src to configure, and build qt statically...

    when ever I type these commands into MinGW it says they are not internal or external commands, operable programs, or batch files.. Something like that...

    any ideas on how to fix this?
    Last edited by InterFiction; 16th November 2011 at 16:55.

  6. #6
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: compiling

    Ahh, first read, then go to action! You don't need to build Qt static! What you are looking for is at the bottom of the page. You successfully build your app. Fine, now you just have to deploy it alongside the right dlls. So make a new directory and copy the exe there.

    Start the exe -> mingw.dll is missing
    copy the mingw.dll to the directory
    Start the exe -> QtCore.dll is missing
    copy the QtCore.dll in the directory
    ...


    http://doc.qt.nokia.com/latest/deplo...cation-package and
    http://doc.qt.nokia.com/latest/deplo...n-dependencies

  7. #7
    Join Date
    Nov 2011
    Posts
    20
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: compiling

    ohh okay, I see what you're saying, haha, sorry about that. Just kinda excited to get it going. I'll read the links you gave a bit more, before I post again, thanks for the info.


    Added after 17 minutes:


    I used that walker tool. It's telling me what I need, but I don't know where to find the files. Are they all stored in one location


    Added after 15 minutes:


    okay, I've got some of the dlls found in the bin directory coppied over into the root dir of my app, but there's two that aren't there. They aren't in the bin dir of qt..is there a safe place to find the ones that aren't on my computer? MINGWM10 is missing, and LIBGCC_S_DW2-1 is missing.
    Last edited by InterFiction; 16th November 2011 at 22:32.

  8. #8
    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: compiling

    Both of those files are on your computer. They are shipped with the MingW compiler suite, either in the Qt SDK bundle or a standalone MingW installation. Look in the mingw/bin folder.

  9. #9
    Join Date
    Nov 2011
    Posts
    20
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: compiling

    Hey thanks for the info. That's where it was. You'll have to forgive me. I've never done this before. I searched through start and it didn't turn up nothing, look around in the folders a bit, but couldn't find it..it was there though, thanks.


    Added after 7 minutes:


    Hey, now that I've found them all, and understand how to find them, lol, I've got them into my project folder, and the app works. Thanks guys. That leads me to a new question. Is there a way to place these in another folder in my root so that the program still finds them. That way everything can be organized, or is this something that has to be done programatically?
    Last edited by InterFiction; 16th November 2011 at 23:35.

  10. #10
    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: compiling

    If you are using Qt Creator then these files should be found when you run the program from within the IDE - development does not require moving the files. If you want to run the program outside of the IDE during dev I would suggest you add the MingW bin and Qt bin directories to the system path rather than copying the files elsewhere on your system.

    When you deploy the application you will have to place the files on the target computer using your installer of choice. I would recommend putting the two MingW/GCC and Qt library files in the same directory as your application and not in a system location.

  11. #11
    Join Date
    May 2009
    Location
    Canada
    Posts
    163
    Thanks
    7
    Thanked 20 Times in 20 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows Android

    Default Re: compiling

    You might also consider an external tool which is very simple to use, such as HM NIS Edit (http://hmne.sourceforge.net/). This is actually very nice because it generates an installation wizard that Windows users will be familiar with. You still have to know what and where the pertinent .dll files are on your system though, so this thread is still quite useful. Make sure that when you are ready to deploy you toggle from debug to release build targets in Qt Creator.

    Setting up on the one hand and deploying on the other are to me the hardest things to settle into, so I appreciate threads like this. Thanks.

Similar Threads

  1. Compiling QT on AIX 6.1
    By image2x in forum Installation and Deployment
    Replies: 3
    Last Post: 21st January 2011, 10:18
  2. compiling qt in 64b on mac
    By eric_vi in forum Qt Programming
    Replies: 2
    Last Post: 23rd January 2010, 14:42
  3. compiling 4.4.1
    By LordQt in forum Installation and Deployment
    Replies: 10
    Last Post: 29th September 2008, 09:27
  4. not compiling
    By sudheer in forum Installation and Deployment
    Replies: 6
    Last Post: 28th November 2007, 12:10
  5. Compiling?
    By Afflicted.d2 in forum Newbie
    Replies: 7
    Last Post: 16th October 2006, 19:32

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.