Note that there are some explanatory texts on larger screens.

plurals
  1. POMSVC 2010 linker error 2005 with std::cout in static library
    primarykey
    data
    text
    <p>I have found other examples of people having this problem but have had no luck with their solutions. I am trying to use std::cout in a static library that also uses boost threads and bind. When I don't use and <code>std::cout</code> it compiles and links fine with the main program but when I do and I compile the library I have no problems but when I compile and link the main program that uses the static library I get a ton of things like:</p> <pre> 2>LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in MSVCRTD.lib(cinitexe.obj) 2>LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in MSVCRTD.lib(cinitexe.obj) 2>LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in MSVCRTD.lib(cinitexe.obj) 2>LIBCMT.lib(mlock.obj) : error LNK2005: __unlock already defined in MSVCRTD.lib(MSVCR100D.dll) 2>LIBCMT.lib(mlock.obj) : error LNK2005: __lock already defined in MSVCRTD.lib(MSVCR100D.dll) 2>LIBCMT.lib(winxfltr.obj) : error LNK2005: __XcptFilter already defined in MSVCRTD.lib(MSVCR100D.dll) 2>LIBCMT.lib(crt0.obj) : error LNK2005: _mainCRTStartup already defined in MSVCRTD.lib(crtexe.obj) </pre> <p>etc...</p> <p>I have tried going in to my linker settings and stopping it from using the conflicting library listed in the error output, but I can't get it right. If I tell it to stop using one library it may fix the problems but give me a few missing external symbols, then I switch the library it was having problems with but I still get a few "already defined". Any clues to what I can do to fix this? Should I just make another class called "log" or something and just access it from the main .exe (which would use the strings library, which may cause problems again but I haven't tried it yet)? Thank you for any help.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload