Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse CDT, build both static lib and shared lib

How is it possible to make project in Eclipse CDT to target both static library and shared library?

like image 592
rkosegi Avatar asked Jun 04 '12 07:06

rkosegi


1 Answers

(assuming you initially created a shared library project)

Create a new build configuration for static library (as you do for Debug/Release).

  • Right click on project
  • Build Configuration
  • Manage
  • New (follow instruction, e.g. name: Static)
  • Properties
  • C/C++ Build
  • Select the new configuration under "Configuration"
  • Build Artifact
  • Artifact type: Static Library

Build your configurations (e.g. Release, Debug, Static)

  • Right click on project
  • Build Configuration
  • Build
  • All

Release and Debug config should create your shared library
Static should create your static library

like image 105
Alessandro Pezzato Avatar answered Oct 14 '22 19:10

Alessandro Pezzato