Advertisement

linking problems in VC++ 6 - LNK2001

Started by March 06, 2002 03:50 PM
9 comments, last by csxpcm 22 years, 11 months ago
I don''t believe that every function defined within the class definition is implicitly inlined... anyway to the original poster: there''s probably not much point in inlining almost every function you use. Inline is intended to be a suggestion to the compiler that a certain (short) function should be expanded within the body of your program rather than called remotely. But it is only a suggestion, the compiler might ignore it, have other criteria for choosing what to inline, or even not be able to inline at all!

I would stick to inlining very short accessor methods (like the operator[] in an array class), and if you still can''t get the performance you need:
1. re-evaluate your code by hand
2. profile the program
3. rewrite the most expensive functions
4. try rewriting or inlining the most expensive parts of those functions

This topic is closed to new replies.

Advertisement