Click here to Skip to main content
15,919,613 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: file - streams... Pin
Bernhard22-Feb-02 0:06
Bernhard22-Feb-02 0:06 
GeneralRe: file - streams... Pin
22-Feb-02 9:18
suss22-Feb-02 9:18 
General2D Color Gradient or Ramp Pin
Paul Selormey21-Feb-02 17:50
Paul Selormey21-Feb-02 17:50 
GeneralRe: 2D Color Gradient or Ramp Pin
Christian Graus21-Feb-02 18:16
protectorChristian Graus21-Feb-02 18:16 
GeneralRe: 2D Color Gradient or Ramp Pin
Paul Selormey23-Feb-02 19:50
Paul Selormey23-Feb-02 19:50 
GeneralMemory DC to CBitmap object Pin
Wolfram Steinke21-Feb-02 17:33
Wolfram Steinke21-Feb-02 17:33 
GeneralRe: Memory DC to CBitmap object Pin
Christian Graus21-Feb-02 18:19
protectorChristian Graus21-Feb-02 18:19 
Generalquestion about LNK2005 and LINK1169 Pin
RK_200021-Feb-02 11:52
RK_200021-Feb-02 11:52 
If you create a simple microsoft Win32 DLL function, it creates an entry point file plus the stdafx files which contain the windows.h include file.

However, if you start adding header and cpp files which make reference to stuff like CRecordSet and have references to stuff like afxdb, then Windows.h and afxdb.h get in one another's way.

Then, if you comment out the windows.h and use afxdb.h, you get an error as following:

Linking...
nafxcwd.lib(dllmodul.obj) : error LNK2005: _DllMain@12 already defined in test2.obj
Debug/test2.dll : fatal error LNK1169: one or more multiply defined symbols found
Error executing link.exe.

And if you comment out the DLLMain at this point, everything compiles well.
Why does this happen? Can I not have a DLL with a DLLMain which also uses afxdb.h? How do I go about fixing this problem?

thanks
GeneralRe: question about LNK2005 and LINK1169 Pin
Michael Dunn21-Feb-02 12:11
sitebuilderMichael Dunn21-Feb-02 12:11 
GeneralThis BSTR** business is dirty!!! Pin
Nish Nishant21-Feb-02 11:50
sitebuilderNish Nishant21-Feb-02 11:50 
GeneralRe: This BSTR** business is dirty!!! Pin
Derek Waters21-Feb-02 11:51
Derek Waters21-Feb-02 11:51 
GeneralRe: This BSTR** business is dirty!!! Pin
Nish Nishant21-Feb-02 12:04
sitebuilderNish Nishant21-Feb-02 12:04 
GeneralUnbelievable error when attempting to return a BSTR** as retval Pin
Nish Nishant21-Feb-02 11:39
sitebuilderNish Nishant21-Feb-02 11:39 
GeneralRe: Unbelievable error when attempting to return a BSTR** as retval Pin
Felix Cho21-Feb-02 11:54
Felix Cho21-Feb-02 11:54 
GeneralRe: Unbelievable error when attempting to return a BSTR** as retval Pin
Derek Waters21-Feb-02 11:50
Derek Waters21-Feb-02 11:50 
GeneralRe: Unbelievable error when attempting to return a BSTR** as retval Pin
Felix Cho21-Feb-02 11:55
Felix Cho21-Feb-02 11:55 
GeneralRe: Unbelievable error when attempting to return a BSTR** as retval Pin
Nish Nishant21-Feb-02 12:01
sitebuilderNish Nishant21-Feb-02 12:01 
GeneralRe: Unbelievable error when attempting to return a BSTR** as retval Pin
Nish Nishant21-Feb-02 12:02
sitebuilderNish Nishant21-Feb-02 12:02 
GeneralRe: Unbelievable error when attempting to return a BSTR** as retval Pin
Felix Cho21-Feb-02 16:39
Felix Cho21-Feb-02 16:39 
GeneralRe: Unbelievable error when attempting to return a BSTR** as retval Pin
Tim Smith21-Feb-02 13:51
Tim Smith21-Feb-02 13:51 
GeneralRe: Unbelievable error when attempting to return a BSTR** as retval Pin
Nish Nishant21-Feb-02 14:23
sitebuilderNish Nishant21-Feb-02 14:23 
GeneralRe: Unbelievable error when attempting to return a BSTR** as retval Pin
Mazdak21-Feb-02 19:43
Mazdak21-Feb-02 19:43 
GeneralView in Dialog Problems Pin
yellowine21-Feb-02 11:18
yellowine21-Feb-02 11:18 
GeneralRe: View in Dialog Problems Pin
Joaquín M López Muñoz21-Feb-02 11:26
Joaquín M López Muñoz21-Feb-02 11:26 
GeneralRe: View in Dialog Problems Pin
yellowine21-Feb-02 11:40
yellowine21-Feb-02 11:40 

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.