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

  • Home
  • SEARCH
  • 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 7523103
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T02:41:54+00:00 2026-05-30T02:41:54+00:00

I need to interface libnetcdf with PHP. (the php-netcdf on google code is broken)

  • 0

I need to interface libnetcdf with PHP. (the php-netcdf on google code is broken)

Here’s netcdf.i :

%module netcdf
 %{
 /* Includes the header in the wrapper code */
 #include "netcdf.h"
 %}

 /* Parse the header file to generate wrappers */
 %include "netcdf.h"

I did :

gcc `php-config --includes` -fpic -c netcdf_wrap.c
gcc -shared netcdf_wrap.o -o netcdf.so

but when loading the extension in php, I get :

Unable to load dynamic library netcdf.so:
undefined symbol: ncerr in Unknown on line 0

It’s the first time I try something like that. Am I missing something ?

ADDED -lnetcdf flag.

now, I got : undefined symbol: zend_error_noreturn. fixed replacing zend_error_noreturn by zend_error in netcdf_wrap.c

  • 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-05-30T02:41:55+00:00Added an answer on May 30, 2026 at 2:41 am

    Your immediate problem is caused by not linking against libnetcdf. You need the -l flag for gcc to do so:

    gcc -shared netcdf_wrap.o -o netcdf.so -lnetcdf
                                               ☝
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a large chunk of legacy php code that I need to interface
I have a LAMP (PHP) web app which need to interface with programs on
I need to interface with a symbol ppt88xx's bar code scanner using .NET CF.
We need to interface to 3rd party app, but company behind the app doesn't
I need to interface an existing application with Acegi/Spring security. In order to get
I’m building a custom robotish machine that has 8 switches I need to interface
I am using Python 3.1.1 on Mac OS X 10.6.2 and need an interface
For our current J2EE project based on JBoss, we need to interface with a
I need to create interface MultiLingual, that allows to display object's data in different
I have a COM interface and need to add an accessor method to it.

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.