Click here to Skip to main content
15,903,175 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Get EXE Path API Pin
khan++20-Jan-06 0:04
khan++20-Jan-06 0:04 
GeneralRe: Get EXE Path API Pin
Axonn Echysttas20-Jan-06 0:15
Axonn Echysttas20-Jan-06 0:15 
Questioninline method Visual C++ 6 Pin
RadioOpa19-Jan-06 23:48
RadioOpa19-Jan-06 23:48 
AnswerRe: inline method Visual C++ 6 Pin
Cedric Moonen19-Jan-06 23:58
Cedric Moonen19-Jan-06 23:58 
GeneralRe: inline method Visual C++ 6 Pin
RadioOpa20-Jan-06 0:01
RadioOpa20-Jan-06 0:01 
GeneralRe: inline method Visual C++ 6 Pin
Cedric Moonen20-Jan-06 0:04
Cedric Moonen20-Jan-06 0:04 
GeneralRe: inline method Visual C++ 6 Pin
RadioOpa20-Jan-06 0:12
RadioOpa20-Jan-06 0:12 
AnswerRe: inline method Visual C++ 6 Pin
RadioOpa20-Jan-06 0:44
RadioOpa20-Jan-06 0:44 
I found the Problem:

MS Visual C needs inline methods to be defined in the .h file rather than in the .cpp file. I moved the inline method from .cpp to .h and now it works fine.

Odd

This tells the MSDN

Function Inlining
Mixing inline and non-inline compile options on different modules can cause problems. Consider the following example that has:

A library Test.lib with inline functions.
A header file containing the function prototypes for the library (Test.h).
An application App.exe, which is linking with Test.lib using the Test.h header file.

If Test.lib is created with function inlining turned on (/Ob1 or /Ob2), you will get an unresolved external error on any inline functions from Test.lib that are used in App.exe. The function's address is not in the PST for Test.lib because the functions were inlined inside the library. You need to either disable inlining (/Ob0) when building the library or place the inline function code in the header file (Test.h).
Similarly, a project that uses function inlining yet defines the functions in a source file rather than in the header file will also get this error. The header file is included everywhere deemed appropriate, but the functions are only inlined in the source file where they are defined. Therefore, the linker sees the functions as unresolved externals when used in other modules. For example:




-- modified at 7:06 Friday 20th January, 2006
GeneralRe: inline method Visual C++ 6 Pin
toxcct20-Jan-06 0:04
toxcct20-Jan-06 0:04 
GeneralRe: inline method Visual C++ 6 Pin
Owner drawn20-Jan-06 1:21
Owner drawn20-Jan-06 1:21 
AnswerRe: inline method Visual C++ 6 Pin
Michael Dunn20-Jan-06 6:58
sitebuilderMichael Dunn20-Jan-06 6:58 
AnswerRe: inline method Visual C++ 6 Pin
RadioOpa20-Jan-06 21:34
RadioOpa20-Jan-06 21:34 
GeneralRe: inline method Visual C++ 6 Pin
Michael Dunn21-Jan-06 22:15
sitebuilderMichael Dunn21-Jan-06 22:15 
Questionhow to deselect all the previous selected item in listctrl Pin
baldha rakesh19-Jan-06 23:44
baldha rakesh19-Jan-06 23:44 
AnswerRe: how to deselect all the previous selected item in listctrl Pin
Owner drawn20-Jan-06 0:16
Owner drawn20-Jan-06 0:16 
AnswerRe: how to deselect all the previous selected item in listctrl Pin
Michael Dunn20-Jan-06 6:59
sitebuilderMichael Dunn20-Jan-06 6:59 
GeneralRe: how to deselect all the previous selected item in listctrl Pin
Owner drawn22-Jan-06 17:18
Owner drawn22-Jan-06 17:18 
QuestionEnable IME Pin
DaTxomin19-Jan-06 23:23
DaTxomin19-Jan-06 23:23 
QuestionHow to convert an integer value to hexa value Pin
Harrison Ford19-Jan-06 23:02
Harrison Ford19-Jan-06 23:02 
AnswerRe: How to convert an decimal value to hexa decimal value Pin
Cedric Moonen19-Jan-06 23:06
Cedric Moonen19-Jan-06 23:06 
GeneralRe: How to convert an decimal value to hexa decimal value Pin
Divyang Mithaiwala20-Jan-06 2:04
Divyang Mithaiwala20-Jan-06 2:04 
AnswerRe: How to convert an decimal value to hexa decimal value Pin
Owner drawn19-Jan-06 23:11
Owner drawn19-Jan-06 23:11 
AnswerRe: How to convert an integer value to hexa value Pin
Stephen Hewitt20-Jan-06 19:40
Stephen Hewitt20-Jan-06 19:40 
QuestionConvert.ToInt32 ??? Pin
Identity Undisclosed19-Jan-06 22:47
Identity Undisclosed19-Jan-06 22:47 
AnswerRe: Convert.ToInt32 ??? Pin
Michael Dunn19-Jan-06 22:52
sitebuilderMichael Dunn19-Jan-06 22:52 

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.