Click here to Skip to main content
15,915,336 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Repost. Pin
CPallini6-May-10 21:15
mveCPallini6-May-10 21:15 
GeneralRe: Repost. Pin
john56326-May-10 21:27
john56326-May-10 21:27 
GeneralRe: Repost. Pin
Richard MacCutchan6-May-10 21:36
mveRichard MacCutchan6-May-10 21:36 
GeneralRe: Repost. Pin
CPallini6-May-10 21:36
mveCPallini6-May-10 21:36 
GeneralRe: Repost. Pin
Emilio Garavaglia6-May-10 21:35
Emilio Garavaglia6-May-10 21:35 
AnswerRe: do it like this. Pin
wangningyu6-May-10 21:58
wangningyu6-May-10 21:58 
AnswerRe: Geo Location Using www.ip2location.com C Library Module (not free) Pin
Software_Developer7-May-10 0:25
Software_Developer7-May-10 0:25 
QuestionLinking error when I try to link MFC Static library to my application Pin
manoharbalu6-May-10 19:13
manoharbalu6-May-10 19:13 
Case 1
I have created a sample MFC Static library which has the required function definitions in mfcextent.cpp and declarations in mfcextent.h. I have added a MFC test dialog based application for the MFC static library in the same workspace. I included the header file mfcextent.h in the test application project and made call to the 2 functions in the library StringToFloat() and IsNumeric(). When I build the MFC Static library, its build without any errors whereas when I build the test application its giving me link errors as defined below.

Linking...
ExMFCStaticLibTestDlg.obj : error LNK2001: unresolved external symbol "double __cdecl MFCExtensions::StringToFloat(class CString)" (?StringToFloat@MFCExtensions@@YANVCString@@@Z)
ExMFCStaticLibTestDlg.obj : error LNK2001: unresolved external symbol "int __cdecl MFCExtensions::IsNumeric(class CString)" (?IsNumeric@MFCExtensions@@YAHVCString@@@Z)
Debug/ExMFCStaticLibTest.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.

Case 2
When I created the same test application separately and added the static lib output file to the test application and included the header file mfcextent.h, its building without any errors and working fine.

Can anyone explain why case 1 is giving link errors. Am I missing out anything..?

Thanks
Mohan
AnswerRe: Linking error when I try to link MFC Static library to my application Pin
Richard MacCutchan6-May-10 21:40
mveRichard MacCutchan6-May-10 21:40 
GeneralRe: Linking error when I try to link MFC Static library to my application Pin
manoharbalu6-May-10 21:53
manoharbalu6-May-10 21:53 
GeneralRe: Linking error when I try to link MFC Static library to my application Pin
Richard MacCutchan6-May-10 22:46
mveRichard MacCutchan6-May-10 22:46 
GeneralRe: Linking error when I try to link MFC Static library to my application Pin
manoharbalu6-May-10 23:28
manoharbalu6-May-10 23:28 
GeneralRe: Linking error when I try to link MFC Static library to my application Pin
Richard MacCutchan6-May-10 23:54
mveRichard MacCutchan6-May-10 23:54 
QuestionCRT_DEBUGGER_HOOK Pin
Fareed Rizkalla6-May-10 13:27
Fareed Rizkalla6-May-10 13:27 
AnswerRe: CRT_DEBUGGER_HOOK Pin
«_Superman_»6-May-10 15:48
professional«_Superman_»6-May-10 15:48 
QuestionValue passed to parameter, procedure modifies value and returns true! Pin
Fareed Rizkalla6-May-10 9:56
Fareed Rizkalla6-May-10 9:56 
AnswerRe: Value passed to parameter, procedure modifies value and returns true! Pin
Richard MacCutchan6-May-10 10:05
mveRichard MacCutchan6-May-10 10:05 
AnswerRe: Value passed to parameter, procedure modifies value and returns true! Pin
«_Superman_»6-May-10 15:46
professional«_Superman_»6-May-10 15:46 
GeneralRe: Value passed to parameter, procedure modifies value and returns true! Pin
Fareed Rizkalla6-May-10 16:24
Fareed Rizkalla6-May-10 16:24 
GeneralRe: Value passed to parameter, procedure modifies value and returns true! Pin
«_Superman_»6-May-10 18:11
professional«_Superman_»6-May-10 18:11 
Questionstandard behavior for Alt key to show/hide Menu bar Pin
Software20076-May-10 2:32
Software20076-May-10 2:32 
QuestionRe: standard behavior for Alt key to show/hide Menu bar Pin
David Crow6-May-10 2:52
David Crow6-May-10 2:52 
AnswerRe: standard behavior for Alt key to show/hide Menu bar Pin
Software20076-May-10 3:16
Software20076-May-10 3:16 
GeneralRe: standard behavior for Alt key to show/hide Menu bar Pin
David Crow6-May-10 3:53
David Crow6-May-10 3:53 
GeneralRe: standard behavior for Alt key to show/hide Menu bar Pin
Maximilien6-May-10 4:04
Maximilien6-May-10 4:04 

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.