Click here to Skip to main content
15,907,281 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Owner drawn menu Pin
Mark Salsbery16-Mar-07 7:13
Mark Salsbery16-Mar-07 7:13 
GeneralRe: Owner drawn menu Pin
Hamid_RT15-Mar-07 19:15
Hamid_RT15-Mar-07 19:15 
GeneralRe: Owner drawn menu Pin
Mark Salsbery16-Mar-07 6:57
Mark Salsbery16-Mar-07 6:57 
GeneralRe: Owner drawn menu Pin
Hamid_RT16-Mar-07 7:15
Hamid_RT16-Mar-07 7:15 
Questionhow to make a form behind all the desktop icons Pin
goldli14-Mar-07 14:21
goldli14-Mar-07 14:21 
AnswerRe: how to make a form behind all the desktop icons Pin
Bram van Kampen14-Mar-07 16:10
Bram van Kampen14-Mar-07 16:10 
GeneralRe: how to make a form behind all the desktop icons Pin
goldli14-Mar-07 16:21
goldli14-Mar-07 16:21 
QuestionBuilding DLL Pin
cbrack66614-Mar-07 13:47
cbrack66614-Mar-07 13:47 
Hello

I need help building a DLL using Visual Studio 6.0.

Our company has a statically liked library which (as expected) contains functions used by various applications. We want to be able to call some of these functions from managed code (C#) and as best as I can determine, having them exported from a DLL is the way to go about it. I have made this work, somewhat, in that I can create a trivial Windows DLL (i.e. non-MFC) having exported functions (in C, not C++) that I was able to invoke from a C# console application.

Because the static lib uses MFC stuff (CString, etc.), I created an MFC (AppWizard) DLL using VS 6.0, and simply added the various files from the static lib (Project > Add To Project > Files...). The files were not copied and added to the project anew; the DLL project simply refers to the files in the static lib's folder. The static lib files I am trying to compile consist of both C++ classes as well as global C functions, though mostly the latter.

After getting past numerous problems, I was able to successfully compile all of the files in this new DLL project. However the subsequent link operation tried to produce the DLL's .lib (export) file at which point I got a slew of "unresolved external symbol" errors. It looks like these could
be related to one or more of the following: C++ function name mangling, the calling convention (e.g. __cdecl), static data members, or global C functions/types. I listed several of the link errors below.

At any rate, I am stumpified at this point. If anyone can suggest a solution I would be most grateful.

Thanks!
Christopher Brack
C3-ilex, LLC


Trends.obj : error LNK2001: unresolved external symbol "protected: static class CString CDaoRecordsetEx::m_Log" (?m_Log@CDaoRecordsetEx@@1VCString@@A)
ACSUser.obj : error LNK2001: unresolved external symbol "protected: static class CString CDaoRecordsetEx::m_Log" (?m_Log@CDaoRecordsetEx@@1VCString@@A)
AlarmClass.obj : error LNK2001: unresolved external symbol "protected: static class CString CDaoRecordsetEx::m_Log"

(?m_Log@CDaoRecordsetEx@@1VCString@@A)
DaoRecordsetEx.obj : error LNK2001: unresolved external symbol "protected: static class CString CDaoRecordsetEx::m_Log"

(?m_Log@CDaoRecordsetEx@@1VCString@@A)
MapboardPointsSet.obj : error LNK2001: unresolved external symbol "protected: static class CString CDaoRecordsetEx::m_Log"

(?m_Log@CDaoRecordsetEx@@1VCString@@A)

AGC_Misc.obj : error LNK2001: unresolved external symbol "bool __cdecl ExecDecreaseThreadPriority(void *)" (?ExecDecreaseThreadPriority@@YA_NPAX@Z)
AGC_Misc.obj : error LNK2001: unresolved external symbol "bool __cdecl ExecIncreaseThreadPriority(void *)" (?ExecIncreaseThreadPriority@@YA_NPAX@Z)

DbAddDev.obj : error LNK2001: unresolved external symbol "union _tDB_ADDRESSES DB_PTRS" (?DB_PTRS@@3T_tDB_ADDRESSES@@A)
DbLoad.obj : error LNK2001: unresolved external symbol "union _tDB_ADDRESSES DB_PTRS" (?DB_PTRS@@3T_tDB_ADDRESSES@@A)
DbRetDev.obj : error LNK2001: unresolved external symbol "union _tDB_ADDRESSES DB_PTRS" (?DB_PTRS@@3T_tDB_ADDRESSES@@A)

DbAccess.obj : error LNK2001: unresolved external symbol "enum Ctr_e_LMTy * DbTyTOLMTy" (?DbTyTOLMTy@@3PAW4Ctr_e_LMTy@@A)
DbAddDev.obj : error LNK2001: unresolved external symbol "enum Ctr_e_LMTy * DbTyTOLMTy" (?DbTyTOLMTy@@3PAW4Ctr_e_LMTy@@A)

DbLoad.obj : error LNK2001: unresolved external symbol "unsigned short * CUS_DIR_STR" (?CUS_DIR_STR@@3PAGA)
StInit.obj : error LNK2001: unresolved external symbol "unsigned short * CUS_DIR_STR" (?CUS_DIR_STR@@3PAGA)


QuestionCScrollView doesn't respond to mousewheel or keyboard Pin
SeniorBob14-Mar-07 13:22
SeniorBob14-Mar-07 13:22 
Questionim just learning to prgram and have troubleing starting this question Pin
bigtimer102214-Mar-07 12:32
bigtimer102214-Mar-07 12:32 
AnswerRe: im just learning to prgram and have troubleing starting this question Pin
Bram van Kampen14-Mar-07 16:30
Bram van Kampen14-Mar-07 16:30 
AnswerRe: im just learning to prgram and have troubleing starting this question Pin
_AnsHUMAN_ 14-Mar-07 18:52
_AnsHUMAN_ 14-Mar-07 18:52 
GeneralRe: im just learning to prgram and have troubleing starting this question Pin
bigtimer102214-Mar-07 18:54
bigtimer102214-Mar-07 18:54 
GeneralRe: im just learning to prgram and have troubleing starting this question Pin
_AnsHUMAN_ 14-Mar-07 19:03
_AnsHUMAN_ 14-Mar-07 19:03 
GeneralRe: im just learning to prgram and have troubleing starting this question Pin
bigtimer102214-Mar-07 19:03
bigtimer102214-Mar-07 19:03 
QuestionSimple Problem? Blind Author cant see? Pin
LeighRogers14-Mar-07 11:50
LeighRogers14-Mar-07 11:50 
AnswerRe: Simple Problem? Blind Author cant see? Pin
John R. Shaw14-Mar-07 15:33
John R. Shaw14-Mar-07 15:33 
AnswerRe: Simple Problem? Blind Author cant see? Pin
Hamid_RT14-Mar-07 19:15
Hamid_RT14-Mar-07 19:15 
QuestionNeed help communicating with MFC dialog boxes (domodal) [modified] Pin
CoffeeAddict1914-Mar-07 11:10
CoffeeAddict1914-Mar-07 11:10 
AnswerRe: Need help communicating with MFC dialog boxes (domodal) Pin
toxcct14-Mar-07 11:23
toxcct14-Mar-07 11:23 
GeneralRe: Need help communicating with MFC dialog boxes (domodal) Pin
andersod214-Mar-07 12:27
andersod214-Mar-07 12:27 
GeneralRe: Need help communicating with MFC dialog boxes (domodal) [modified] Pin
CoffeeAddict1914-Mar-07 18:24
CoffeeAddict1914-Mar-07 18:24 
GeneralRe: Need help communicating with MFC dialog boxes (domodal) Pin
andersod214-Mar-07 18:42
andersod214-Mar-07 18:42 
GeneralRe: Need help communicating with MFC dialog boxes (domodal) Pin
andersod214-Mar-07 13:13
andersod214-Mar-07 13:13 
GeneralRe: Need help communicating with MFC dialog boxes (domodal) Pin
toxcct14-Mar-07 22:07
toxcct14-Mar-07 22:07 

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.