# static obspy library

**URL:** https://discourse.obspy.org/t/static-obspy-library/149
**Category:** Users Mailing List Archive
**Tags:** archive
**Created:** [November 8, 2012, 8:51pm UTC](https://discourse.obspy.org/t/static-obspy-library/149 "2012-11-08T20:51:53Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Wang\_Xiao](https://discourse.obspy.org/letter_avatar_proxy/v4/letter/w/ed8c4c/32.png) [@Wang\_Xiao](https://discourse.obspy.org/u/Wang_Xiao)
#### Post date: [November 8, 2012, 8:51pm UTC](https://discourse.obspy.org/t/static-obspy-library/149/1 "2012-11-08T20:51:53Z")

</div>

Hello,

I am working on embedding Python in C/C++ and want to know how to create a static obspy library for C/C++ to call.

Thanks in advance,

Xiao

---

<div class="post-metadata">

### Author: ![LionKrischer](https://discourse.obspy.org/user_avatar/discourse.obspy.org/lionkrischer/32/219_2.png) [@LionKrischer](https://discourse.obspy.org/u/LionKrischer)
#### Post date: [November 8, 2012, 9:47pm UTC](https://discourse.obspy.org/t/static-obspy-library/149/2 "2012-11-08T21:47:25Z")

</div>

Hello Xiao,

a couple of weeks ago I wrote an email to Andreas about the very same topic. The gist is that Python is a dynamic language and cannot be compiled. I would advise you to have a look at the SWIG project ([http://www.swig.org/](http://www.swig.org/)). It can generate two way bindings between Python and C++.

Cheers,

Lion
