dynamic link disrupt execution

This is a discussion on dynamic link disrupt execution within the C++ Programming forums, part of the General Programming Boards category; I have a program that uses QT linked staticly and I tried to change it to be linked dynamicly with ...

  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 wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,442
    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  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 wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,442
    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

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, 05:23 AM
  2. Replies: 8
    Last Post: 12-01-2008, 09: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, 10:04 AM
  5. Static linked DirectX or dynamic?
    By VirtualAce in forum Game Programming
    Replies: 2
    Last Post: 11-21-2005, 04:46 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21