Opened 11 years ago

Last modified 11 years ago

#55 new enhancement

Add autolinking of libs on Windows

Reported by: marcusl Owned by: unassigned
Priority: major Milestone: 2.0 Release
Component: Build Version:
Keywords: Cc:

Description

See how boost does this. It's pretty neat as it avoids a lot of confusion with linking to wrong libraries (debug/relaese & dynamic/static).

Change History (1)

comment:1 Changed 11 years ago by marcusl

For reference, this is how it could look if we do something really simple. (i.e. not full-blown versioning like boost):

In OSGWindowGLUT.h:



#ifdef _DEBUG

#pragma comment(lib, "OSGBaseD.lib")

#pragma comment(lib, "OSGSystemD.lib")

#pragma comment(lib, "OSGWindowGLUTD.lib")

#else

#pragma comment(lib, "OSGBase.lib")

#pragma comment(lib, "OSGSystem.lib")

#pragma comment(lib, "OSGWindowGLUT.lib")

#endif



#pragma comment(lib, "Winmm.lib.")

Note: See TracTickets for help on using tickets.