Thread: MD and MTD options in Visual C++

  1. #1
    char main() RoshanX's Avatar
    Join Date
    Mar 2003
    Posts
    68

    MD and MTD options in Visual C++

    hi all,

    I am having a problem with a particular project, the problem comes at the LINK state.
    The solution contains several probjects, and some of the projects will produces libraries, which will be used by other projects within the solution.

    the linker is complaining that some of the symbols are already defined ( these symbols belongs to standard C++ library). I haven't got a clue as to what is going on here.

    How do I link this correctly ( it seems that there is a the stardard C++ functions are already included in the object files, and the linker is trying to link them again .... or something like that ... ).
    First there was God. He was quite lonely, so he created Dennis.
    Dennis was unimpressed with God.
    So, . . . God created Brian..........Khan Klatt
    http://www.clifford.at/fun/GOD

  2. #2
    Tropical Coder Darryl's Avatar
    Join Date
    Mar 2005
    Location
    Cayman Islands
    Posts
    503
    Are you running VS 2005? I have been noticing a lot of these types of errors since switching especially when upgrading projects or using previous compiled libraries. The bottom line is that you have to make sure that the libraries and the executibles are all compiled using the same run-time libraries.

    I think VS 2003 default was to static library (multi-thread and multi-thread debug) while VS 2005 defaults to dynamic (multi-thread dll and multi-thread debug dll) because I notice when creating a new project using one of my libraries that I am always needing to switch to the static run-times where previously I never did.

Popular pages Recent additions subscribe to a feed