warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs

This is a discussion on warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs within the C++ Programming forums, part of the General Programming Boards category; Hello All, I am doing a program on VC8 with .NET 3.5 frame work. I generated my program using MFC. ...

  1. #1
    Registered User
    Join Date
    Nov 2010
    Posts
    3

    warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs

    Hello All,

    I am doing a program on VC8 with .NET 3.5 frame work. I generated my program using MFC.

    My program using a two third party libraries. One library is build as statical library. It is giving a statical lib.
    Another library is giving a DLL.

    Statical library compiler settings are :

    1) Configuration Properties->General->ConfigurationType is STATIC LIBRARY(.LIB)
    2) C/C++ -> Code Generation -> Basic Runtime Checks as Both (/RTC1, equiv. to /RTCsu)
    3) C/C++ -> Code Generation -> Runtime Library as Multi-threaded Debug DLL (/MDd)

    2nd Third Party Library (Giving DLL finally)

    1) Configuration Properties->General->ConfigurationType as Dynamic Library (.dll)
    2) C/C++ -> Code Generation -> Basic Runtime Checks as Both (/RTC1, equiv. to /RTCsu)
    3) C/C++ -> Code Generation -> Runtime Library as Multi-threaded Debug DLL (/MDd)

    My program also having the same settings. And I also set manifest file generation to YES.

    I am using these two libraries in my program. My program is compilied with out any errors. But when i execute my program it is giving runtime error "Error R6034 Unable to load C library". When I rebuild my solution it gives the worning "warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs"

    Can you please help me how to resolve this error.

    Thanks in advance
    nah

  2. #2
    Registered User
    Join Date
    Nov 2010
    Posts
    3
    Hi


    I solved my problem. I set Runtime Library as MultiThreaded DLL in C/C++->Code Generation for all of my 3rd party libraries and for my application.

    Nah.

  3. #3
    Registered User
    Join Date
    Nov 2010
    Posts
    3
    Quote Originally Posted by nahwiz View Post
    Hi


    I solved my problem. I set Runtime Library as MultiThreaded DLL in C/C++->Code Generation for all of my 3rd party libraries and for my application.

    Nah.
    Hello,

    I got a problem again.

    I am able to execute my program but when i run the program is bracking.

    When i debug my program, it giving "Un Handled exception at 0x10487bf (MSVCP90d.DLL)" and saying Access violation at 0x10487bf.

    Does my compiler setting are correct ? does i need to change any thing?

    Can you please help me?

    Thanks in advance
    Nah.

  4. #4
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,592
    Access violations are you doing something you shouldn't be with memory which isn't yours.

    It could be anything
    - pointers not initialised
    - too little memory allocated
    - using memory after you freed it

    Let the debugger catch the exception, then examine the call stack for the last (most recent) place in YOUR code, where it calls the standard runtime library.

    Examine all the variables carefully to make sure everything is OK. Then start working backwards to try to figure out the real cause.
    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. Undefined reference to.. probably Makefile problem
    By mravenca in forum C Programming
    Replies: 11
    Last Post: 10-20-2010, 04:29 AM
  2. Replies: 2
    Last Post: 09-16-2009, 06:00 AM
  3. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 02:39 PM
  4. <Gulp>
    By kryptkat in forum Windows Programming
    Replies: 7
    Last Post: 01-14-2006, 12:03 PM
  5. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM

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