How to compile c++ code with python2.7 i386 when I have 64 bit system with amd64 python installed -


i'm using ubuntu 14.04 64 bits. have instaled python2.7 amd64, , use flags 'python-config --cflags' , 'python-config --ldflags' in makefile. show, respectively:

  • -i/usr/include/python2.7 -i/usr/include/x86_64-linux-gnu/python2.7 -fno-strict-aliasing -d_fortify_source=2 -g -fstack-protector --param=ssp-buffer-size=4 -wformat -werror=format-security -dndebug -g -fwrapv -o2 -wall -wstrict-prototypes
  • -l/usr/lib/python2.7/config-x86_64-linux-gnu -l/usr/lib -lpthread -ldl -lutil -lm -lpython2.7 -xlinker -export-dynamic -wl,-o1 -wl,-bsymbolic-functions

my objective develop 32-bit version -m32, encounter following error:

/usr/include/python2.7/pyconfig.h:7:49: fatal error: i386-linux-gnu/python2.7/pyconfig.h: file or directory not found. #  include <i386-linux-gnu/python2.7/pyconfig.h>                                              ^ compilation terminated. 

i've researched lot trying resolve problem. i've tried installing python2.7:i386 alongside python2.7:amd64 packages removed , had no avail. way i've suceeded setting chroot environment on installed pseudo-system ubuntu trusty 32 bit. altough want know if it's possible python virtualenv, , if so, offer examples? not find nor understand how can used link code.

this first time ask question on site, apologize in advance if did incorrectly! , thank in advance.


Comments