Thread: dynamic link disrupt execution

  1. #1
    Registered User kroiz's Avatar
    Join Date
    Jun 2007
    Posts
    116

    dynamic link disrupt execution

    I have a program that uses QT linked staticly and I tried to change it to be linked dynamicly with QT.
    I rebuilt QT to create a QT dll. ( using CRT MutilThreaded DLL)
    The QT dll seems to work OK with the example programs that are provided with QT.
    But when I use the QT dll with my program it crashes immidiately.
    with the following message dialog:
    Runtime Error!
    Program:
    R6034
    An application has made an attempt to load the C runtime library incorrectly.
    Please contact the application's support team for more information.
    After that dialog is closed I get another dialog:
    The application failed to initialize properly (0xc0000142). Click on OK to terminate the application.
    Any clues, any body?

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    A mixup in the support for multi-thread support perhaps?

    It's not something you can mix and match, in particular you can't have something which requires MT depending on something which doesn't support MT.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User kroiz's Avatar
    Join Date
    Jun 2007
    Posts
    116
    Threaded wise it is OK, i.e. my app and all the libraries it uses and dlls are mutilthreaded.
    But QT uses C Run Time DLL apposed to my application that uses C Run Time staticly linked. that's ok right?

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    I think you need to make them both use the same CRT.
    The static and dynamic linked versions are not going to co-exist.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Linked List, Please Help!
    By CodeMonkeyZ in forum C Programming
    Replies: 5
    Last Post: 02-17-2009, 06:23 AM
  2. Replies: 8
    Last Post: 12-01-2008, 10:09 AM
  3. link list error
    By caroundw5h in forum C Programming
    Replies: 2
    Last Post: 04-13-2006, 07:35 PM
  4. Replies: 19
    Last Post: 01-12-2006, 11:04 AM
  5. Static linked DirectX or dynamic?
    By VirtualAce in forum Game Programming
    Replies: 2
    Last Post: 11-21-2005, 05:46 AM