Click here to Skip to main content
15,881,588 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: CListCtrl flickers on Vista Pin
00.Siddu28-Apr-09 9:36
00.Siddu28-Apr-09 9:36 
QuestionRe: CListCtrl flickers on Vista Pin
David Crow28-Apr-09 9:45
David Crow28-Apr-09 9:45 
AnswerRe: CListCtrl flickers on Vista Pin
00.Siddu28-Apr-09 22:07
00.Siddu28-Apr-09 22:07 
AnswerRe: CListCtrl flickers on Vista Pin
Steve Thresher29-Apr-09 2:32
Steve Thresher29-Apr-09 2:32 
AnswerRe: CListCtrl flickers on Vista Pin
00.Siddu4-May-09 3:16
00.Siddu4-May-09 3:16 
Questionsending email Pin
santanukarmakar28-Apr-09 5:12
santanukarmakar28-Apr-09 5:12 
AnswerRe: sending email Pin
Stuart Dootson28-Apr-09 5:23
professionalStuart Dootson28-Apr-09 5:23 
QuestionLNK2005 Error: basic_string already defined Pin
SkysTheLimit28-Apr-09 4:35
SkysTheLimit28-Apr-09 4:35 
Hello

I am attempting to build a console application that depends on 4 other libraries using Visual Studio 2008. I was able to build the application in a previous version of Visual Studio.

3 of the libraries are in C code and the other is in C++.

I have checked (more than once) that all the libraries and my application are all compiled using the multi-threaded DLL (/MD). My command line compile options for each library and my application are as follows:

Lib1: /Ox /Op /MD
Lib2&3: /Od /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_VC80_UPGRADE=0x0710" /D "_MBCS" /FD /EHsc /MD /W3 /c /Tc
Lib4: /MD /EHsc /RTC1 /D "WIN32" /D "_MBCS" /W2 /DNDEBUG
App: /Od /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_VC80_UPGRADE=0x0710" /D "_MBCS" /FD /EHsc /MD /W3 /c /TP

Link: /INCREMENTAL /MANIFEST:NO /NODEFAULTLIB:"libcpmt.lib" /NODEFAULTLIB:"libc.lib" /NODEFAULTLIB:"libcmt.lib"

I get 25 LNK2005 errors regarding basic_string already being defined in my application. I suspect it has something to do with lib4 because when I take it out of the project the LNK2005 errors go away and I get unresolved external errors for the functions I use out of that library (although I'm not sure what order those errors are generated in).

I have tried ignoring msvcprt.lib but I get unresolved externals for other functions. Frown | :(

I have turned on verbose to see what libraries are being included and they are as follows:
lib4
lib2
lib3
lib1
zlib1.lib
szlibdll.lib
OLDNAMES.lib
MSVCRT.lib
msvcprt.lib (where the errors are given)
uuid.lib
kernel32.lib
AnswerRe: LNK2005 Error: basic_string already defined Pin
Stuart Dootson28-Apr-09 5:45
professionalStuart Dootson28-Apr-09 5:45 
GeneralRe: LNK2005 Error: basic_string already defined Pin
SkysTheLimit28-Apr-09 7:52
SkysTheLimit28-Apr-09 7:52 
GeneralRe: LNK2005 Error: basic_string already defined Pin
Stuart Dootson28-Apr-09 8:37
professionalStuart Dootson28-Apr-09 8:37 
GeneralRe: LNK2005 Error: basic_string already defined Pin
SkysTheLimit28-Apr-09 8:46
SkysTheLimit28-Apr-09 8:46 
GeneralRe: LNK2005 Error: basic_string already defined Pin
Stuart Dootson28-Apr-09 8:48
professionalStuart Dootson28-Apr-09 8:48 
GeneralRe: LNK2005 Error: basic_string already defined Pin
SkysTheLimit28-Apr-09 8:52
SkysTheLimit28-Apr-09 8:52 
GeneralRe: LNK2005 Error: basic_string already defined Pin
Stuart Dootson28-Apr-09 9:15
professionalStuart Dootson28-Apr-09 9:15 
GeneralRe: LNK2005 Error: basic_string already defined Pin
SkysTheLimit28-Apr-09 9:22
SkysTheLimit28-Apr-09 9:22 
GeneralRe: LNK2005 Error: basic_string already defined Pin
Stuart Dootson28-Apr-09 10:52
professionalStuart Dootson28-Apr-09 10:52 
GeneralRe: LNK2005 Error: basic_string already defined Pin
SkysTheLimit29-Apr-09 7:40
SkysTheLimit29-Apr-09 7:40 
GeneralRe: LNK2005 Error: basic_string already defined Pin
Stuart Dootson29-Apr-09 8:41
professionalStuart Dootson29-Apr-09 8:41 
GeneralRe: LNK2005 Error: basic_string already defined Pin
SkysTheLimit29-Apr-09 10:28
SkysTheLimit29-Apr-09 10:28 
GeneralRe: LNK2005 Error: basic_string already defined Pin
Stuart Dootson29-Apr-09 10:40
professionalStuart Dootson29-Apr-09 10:40 
QuestionGetScreenResolution Pin
p_196028-Apr-09 4:22
p_196028-Apr-09 4:22 
AnswerRe: GetScreenResolution Pin
led mike28-Apr-09 4:31
led mike28-Apr-09 4:31 
Questionwhat's the average cpu tick counts for a CView's WM_PAINT handler? Pin
flyingxu28-Apr-09 4:17
flyingxu28-Apr-09 4:17 
AnswerRe: what's the average cpu tick counts for a CView's WM_PAINT handler? Pin
led mike28-Apr-09 4:28
led mike28-Apr-09 4:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.