Author Topic: Conditional static library link  (Read 3682 times)

Offline drev

  • Multiple posting newcomer
  • *
  • Posts: 21
Conditional static library link
« on: April 07, 2009, 01:05:04 pm »
Hi,

I have a projet with some features that can be enabled/disabled using the preprocessor

Code

#define FOO  <-- passed with -DFOO or in #defines textarea at the build option menu

#ifdef FOO
#include <foo.h>
#endif

Question : how does it works for link with a static library (assumed -lfoo) if FOO is defined ?
I think a #pragma link is used in visual studio but I am not sure it is supported/safe with gcc C99.
« Last Edit: April 07, 2009, 01:07:00 pm by drev »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: Conditional static library link
« Reply #1 on: April 07, 2009, 01:19:05 pm »
Read the gcc manual or ask in an appropriate forum !!

This forum is dedicated to C::B related questions only !

Topic locked !