Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Problem using separate types linker option

Problem using separate types linker option

Scheduled Pinned Locked Moved C / C++ / MFC
helpc++debuggingtutorialquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Dave Bryant
    wrote on last edited by
    #1

    I have a set of C++ static libraries that is released as part of my product, and used by other developers to build their applications. Someone using these libraries is gettings an error linking in debug mode (missing debugging information for referencing module) which only occurs when the separate types linker option is turned off - when it is on the program links successfully. Does anyone know how to resolve this so that linking can still be done successfully in debug mode without having to use separate types? Do I need to distribute the .pdb files along with the static libraries or something like that? Dave http://www.cloudsofheaven.org

    M 1 Reply Last reply
    0
    • D Dave Bryant

      I have a set of C++ static libraries that is released as part of my product, and used by other developers to build their applications. Someone using these libraries is gettings an error linking in debug mode (missing debugging information for referencing module) which only occurs when the separate types linker option is turned off - when it is on the program links successfully. Does anyone know how to resolve this so that linking can still be done successfully in debug mode without having to use separate types? Do I need to distribute the .pdb files along with the static libraries or something like that? Dave http://www.cloudsofheaven.org

      M Offline
      M Offline
      Michael Geddes
      wrote on last edited by
      #2

      I'm not entirely sure, but I think your problem lies in the fact that you need to produce separate static libraries built to link to the various types of run-time libraries (static and dynamic). You need to produce a library with different warts for each of the different linker options (/MD /MDd /ML /MLd ) and Unicode options if applicable.. This makes about 8 libraries you need to compile for completeness. It's a real pain... however you can make it so the users of the libraries are not too inconvenienced by using the #pragma comment(lib, _libraryName_) compiler directive. Good luck. //.ichael

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups