Doc #55027 [NEW]: C Extension and symbol lookup error on execution

From: Date: Fri, 10 Jun 2011 13:36:45 +0000
Subject: Doc #55027 [NEW]: C Extension and symbol lookup error on execution
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-6722@lists.php.net to get a copy of this message
From: Operating system: Ubuntu 10 PHP version: 5.3.6 Package: Unknown/Other Function Bug Type: Documentation Problem Bug description:C Extension and symbol lookup error on execution Description: ------------ Hi, Am building a C extension, which is a wrapper to a third party product. I have the basics working, but wanted to use a different call (from PHP) for a number of functions. So I have a standard PHP C function, and a number of dirreent wrappers depending on what we need.... so: static void php_main_php_function(INTERNAL_FUNCTION_PARAMETERS, long nType, int expected_args){ ..... call main C function(); Return to PHP } PHP_FUNCTION(main_function_wrap_1){ php_main_php_function(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0,1); } PHP_FUNCTION(main_function_wrap_2){ php_main_php_function(INTERNAL_FUNCTION_PARAM_PASSTHRU, 2,1); } ----------------------------- When I call main_function_wrap_1() (or _2()) I get a: 'php: symbol lookup error: .....undefined symbol: php_main_php_function I have tried to do thios as per the mysql drivers, and can't see the differemce between my code, and what they are doing? Anyone any ideas please? TIA Test script: --------------- All C Code.... and lots of it... so best not to confuse here. -- Edit bug report at http://bugs.php.net/bug.php?id=55027&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=55027&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=55027&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=55027&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=55027&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=55027&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=55027&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=55027&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=55027&r=needscript Try newer version: http://bugs.php.net/fix.php?id=55027&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=55027&r=support Expected behavior: http://bugs.php.net/fix.php?id=55027&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=55027&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=55027&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=55027&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=55027&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=55027&r=dst IIS Stability: http://bugs.php.net/fix.php?id=55027&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=55027&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=55027&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=55027&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=55027&r=mysqlcfg

« previous php.doc.bugs (#6722) next »