Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8380175
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T16:23:14+00:00 2026-06-09T16:23:14+00:00

I have to create a python wrapper for a large C library. I am

  • 0

I have to create a python wrapper for a large C library. I am trying to use the ctypes module to do this however I am getting an error when I try to load the shared library. Here is the python code I’m running at the moment.

import ctypes

praatlib_path = '/n/banquet/da/martega/Programming/libs/libpraat.so'
praatlib = ctypes.CDLL(praatlib_path)

print 'Hello, World!'

Unfortunately, I’m getting the following error which I don’t know enough to debug:

Traceback (most recent call last):
  File "./praatlib.py", line 9, in <module>
    praatlib = ctypes.CDLL(praatlib_path)
  File "/usr/local/lang/python-2.7.3/lib/python2.7/ctypes/__init__.py", line 365, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /n/banquet/da/martega/Programming/libs/libpraat.so: undefined symbol: _Znaj

Can anyone explain what this means and how I can go about fixing it?

In case it’s useful, here’s the command in the Makefile that builds the shared library.

gcc -shared -Wl,-soname,libpraat.so -o libpraat.so `find num glpk audio stat LPC FFNet dwtools artsynth fon dwsys GSL kar FLAC mp3 library -name "*.o"`

Edit: I recompiled it with g++ instead of C++. This fixed the original error but now I’m getting the following error which is something I’ll probably have to fix on my own:

Traceback (most recent call last):
  File "./praatlib.py", line 9, in <module>
    praatlib = ctypes.CDLL(praatlib_path)
  File "/usr/local/lang/python-2.7.3/lib/python2.7/ctypes/__init__.py", line 365, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /n/banquet/da/martega/Programming/libs/libpraat.so: undefined symbol: Melder_hasError
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T16:23:16+00:00Added an answer on June 9, 2026 at 4:23 pm

    The missing symbol _Znaj demanges to operator new[](unsigned int):

    $ c++filt _Znaj
    operator new[](unsigned int)
    

    Try to compile your library using g++ instead of gcc

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to create a shared library (really a Python module) that links
I have a python script that is trying to create a directory tree dynamically
I have just started learning python version 3 and trying to create a file
I have a python script the runs this code: strpath = sudo svnadmin create
I have been trying to create a simple program with Python which uses OpenCV
I have written a Python TCP/IP server for internal use, using win32serviceutil/py2exe to create
I'm trying to create a TFTP in python over a existing UDP i have.
we are trying to create a calendar function in python. we have created a
I'm trying to generate a python wrapper for a C++ library that I am
I have created a simple Python module and want to distribute it with pip.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.