Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to link framework only under Debug configuration?

Tags:

xcode

I have a framework which I only want to link under Debug configuration, i.e., I have to make sure it is not linked under Release configuration. How can I do that?

like image 277
an0 Avatar asked Jun 05 '13 14:06

an0


People also ask

What is the difference between Debug mode and Release mode in Visual Studio?

By default, Debug includes debug information in the compiled files (allowing easy debugging) while Release usually has optimizations enabled. As far as conditional compilation goes, they each define different symbols that can be checked in your program, but they are language-specific macros.

What is Debug configuration?

Visual Studio projects have separate release and debug configurations for your program. You build the debug version for debugging and the release version for the final release distribution. In debug configuration, your program compiles with full symbolic debug information and no optimization.

What are Debug and Release build configurations?

A Debug configuration supports the debugging of an app, and a Release configuration builds a version of the app that can be deployed.


1 Answers

no need for to targets or any ifdef stuff.

  1. dont add it to any target
  2. and then add to the linker flags for the config only

enter image description here

works for static libs and dylibs and also frameworks

like image 127
Daij-Djan Avatar answered Oct 24 '22 15:10

Daij-Djan