Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#125 Conditional library linking for Visual C

open
nobody
None
5
2012-09-07
2005-09-14
Vasyl Tsvirkunov
No

Fix for an annoyance in Visual C .NET project. The
project version in CVS requires either that all
potentially used libraries (libpng, sdl_net, curses)
are present or the project itself is modified. With
this patch the project (.vcproj) does not refer to any
outside paths or libraries. All libraries are
conditionally linked based on current settings in
CONFIG.H. For example, if you don't need debugger just
set C_DEBUG to 0 and don't worry about curses.lib.
Only Visual C builds are affected. I could not test all
possible combinations of config.h settings so if I
missed something feel free to fix it and blame me.

The easiest way to setup the project is to
a) set environment variables CL and LINK, like this:
set CL=/I "c:\dev\curses\inc\" /I "c:\dev\sdl\include\"
set LINK=/LIBPATH:"c\dev\curses\lib\"
/LIBPATH:"c:\dev\sdl\lib\"
b) adjust config.h with desired settings
c) make sure proper DLLs are available on the path.
No other modifications are needed.

Discussion