Results 1 to 6 of 6

Thread: Procedure entry point not found

  1. #1
    Join Date
    Sep 2009
    Posts
    41
    Thanks
    16
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Procedure entry point not found

    Sigh. I finally got my little application running in Qt Creator, and now I'd like to create an executable, but alas, it's not working.

    Here's what I did:
    1) I changed the Run Configuration to Release, then built the app. Everything is fine.
    2) Went to the "release/" subdirectory in my project and double-clicked the .exe

    Here's what I got:
    "The procedure entry point _Z21qRegisterResourceDataPKhS0_S0_ could not be located in the dynamic link library QtCore4.dll"

    Any ideas what this means?

    I'm hoping to get one simple .exe file out of all of this that already has all the necessary libraries built in. Is that possible?

    Thanks for your help!

  2. #2
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Procedure entry point not found

    That means the QtCore4 DLL you are using doesn't have that function. It's probably a customised version. Grab t he one from the QtCreator bin directory - it should have all the functions.

    If you want a single exe rather than being dependant on several DLLs, then you'll have to recompile Qt with the appropriate options (-static rather than the default -shared passed to configure), and don't forget that also your application must be open source or use commercial license, else Nokia will sue your ass. Thats way library method is the default, as you can then use LGPL license.
    Last edited by squidge; 8th October 2009 at 19:05.

  3. #3
    Join Date
    Sep 2009
    Posts
    41
    Thanks
    16
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Procedure entry point not found

    What do you mean by "grab the one...in the bin directory"? Do I need to add a line in my .pro file that tells it where to look? I've made a copy of the QtCore4.dll file in my "release/" directory, but it appears to have no effect.

    I certainly don't have a "customised" version of any dlls. I just downloaded Qt a few weeks ago. Everything is vanilla Qt as far as I know.

    Where do I put the '-static' option? In the .pro file? I can't seem to find any compiler settings in Qt Creator.

    Also, I decided to try to compile one of Qt's example files just to make sure that works, but it doesn't work! I tried the 'elastic nodes' example, and when I try to run the release version of the code, it tells me "The procedure entry point _Z5qFreePv could not be located in the dynamic link library QtCore4.dll".

    What am I doing wrong?

    P.S. Don't worry, all of my code will be open source - not that anyone would care to look at it.

  4. #4
    Join Date
    Sep 2009
    Posts
    41
    Thanks
    16
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Procedure entry point not found

    Ok, so I finally found the answer (why oh why can't they make error messages more helpful?)

    In order to build a simple, standalone .exe file, you have to build Qt itself statically. The directions on how to do this are below. The default is to build everything dynamically. Note that building Qt statically takes several hours.

    http://doc.trolltech.com/4.5/deployment-windows.html

  5. #5
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Procedure entry point not found

    By 'bin' directory I mean the one that contains designer, assistant and linguist. It contains a fully working QtCore4 dll which you can copy to your release directory and then retry running your compiled exe. If that works, you have a customised QtCore4.dll somewhere that is missing functions.

    As for -static, you need to pass it to configure when you recompile Qt. This means you need to open a DOS Box, setup the paths to your compiler in there, and call configure with the appropriate arguments such as platform and -static. One the compilation has finished (it can take a few hours) then you can build executables that have all the necessary libraries built in.

  6. #6
    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: Procedure entry point not found

    If you are using the Nokia distributed SDK on Windows, e.g. installed in "C:\Qt\2009.03", then the 'bin' directory containing the redistributable libraries is not "C:\Qt\2009.03\bin" but rather "C:\Qt\2009.03\Qt\bin". The former directory contains the runtime that Creator was built against, the latter the one your application was built against. They are not the same.

Similar Threads

  1. Replies: 0
    Last Post: 6th August 2009, 17:35
  2. Visual Studio 2005 Express
    By Muzz in forum Installation and Deployment
    Replies: 22
    Last Post: 6th November 2008, 06:21
  3. Procedure entry point not located
    By Hannibal in forum Qt Programming
    Replies: 2
    Last Post: 8th October 2008, 16:13
  4. Program crashes with assert error in xcb_lock.c
    By Valheru in forum Qt Programming
    Replies: 3
    Last Post: 18th November 2007, 19:56
  5. KDE 3.5.0 crash while opening project
    By MarkoSan in forum KDE Forum
    Replies: 2
    Last Post: 19th October 2007, 16:21

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.