Gold mine of Visual C++ tricks!
- Announcements (6)
- C++ (31)
- Codeproject (106)
- COM (1)
- Compiler Extension (3)
- Debugging Tips (17)
- FileSystem (2)
- GDI & GDI+ (5)
- Glorious Bugs (3)
- MFC (22)
- Misc (2)
- Networking & Winsock (1)
- Polls (2)
- Preprocessors (3)
- Project settings (6)
- Uncategorized (47)
- VC++ Debugging Tips (1)
- Visual C++ (13)
- Visual C++ Preprocessors (1)
- Visual Studio (9)
- Visual Studio Tools (2)
- Windows APIs (35)
- Windows Shell Pearls (4)
#pragma #pragma comment array Breakpoint C++ catch(...) ColorHLSToRGB() ColorRGBToHLS() cout crash CRT Debugging exceptions exe File path FindFirstFile() functor gdi+ GetDlgCtrlID() handle hide file HLS Hue library macros memory leaks MINMAXINFO modules MoveFileEx name mangling new NTFS PathRemoveFileSpec() preprocessor Project settings SendMessage Shlwapi.h Shlwapi.lib STL unhandled exception VC++ Visual C++ Visual Studio Visual Studio 2008 watch window- March 2010 (1)
- February 2010 (7)
- November 2009 (2)
- October 2009 (3)
- July 2009 (1)
- June 2009 (1)
- May 2009 (2)
- April 2009 (2)
- March 2009 (9)
- January 2009 (7)
- December 2008 (12)
- November 2008 (5)
- October 2008 (6)
- September 2008 (2)
- August 2008 (13)
- July 2008 (17)
- June 2008 (24)
- May 2008 (29)
- April 2008 (33)
- March 2008 (20)
- February 2008 (1)
- Microsoft MVP for Visual C++ for 2009-2010 (16)
- Is it outlook, who composes your "New Message"? (12)
- Name Mangling – How to Undecorate a decorated C++ function name. (10)
- How to Parse Virtual Table? (9)
- How to import dialogs or resources from one project to another? (8)
- How to blink LED's in Keyboard? (8)
- Happy Birthday! WeSeeTips!!! (8)
- How to check whether current user have administrator privilege? (7)
- How to set title for your console application window. (7)
- Trigraph char sequences in C & C++ (6)
Jijo Raj: Thanks Raj. Thanks for those kind words! Best Regards, Jijo.
rajkumar: this web site is simple super.
eran: Sounds like a trick you should try to avoid, due to race condition issues. Theres a chance that...
Divin: Cool tip. saved alot of time :-)
Jijo Raj: Thanks Sarath. Sure, i'll keep a backup. Thanks for the tip! Regards, Jijo.
Shiva: Jijo, New theme is simple and good. Suggestion: It'd be better if u make 'Archives' widget's...
shi: Hello, Could you also explain what the meaning is of the return value? Thanks!
sarath: It's nice to see the new home with a reloaded theme. Ensure the proper backup f your website. I've...
Automatically link required libraries.
Apr 11th
Posted by Jijo Raj in Compiler Extension
No comments
In our projects we use number of 3ed party API’s especially from platform SDK and other components and one burden is finding the libraries for those API’s. For Microsoft provided API’s since they have strong documentation, finding the library for particular API is not so tedious. But for other vendors, It may be. We need to dig a lot for finding the lib of that particular API. How can we get rid from this?
You can you #pragma comment( lib, “LibraryName” ) to specify the necessary library file in the header file itself. For e.g. See the following header file.
// EventLog.h class EventLog { … }; #ifdef _DEBUG // If it’s a debug version… #pragma comment( lib, "MyEventLogLibd.lib" ) #else // Ooooh!!! Its release version. #pragma comment( lib, "MyEventLogLib.lib" ) #endifIf we include the EventLog.h header file, the library required will be automatically included. I dream for the day on which all SDK headers auto includes their libraries…
Target audiance – Intermediate.