Re: PHP Extension building issue on Win32
| From: | Dietrich Ayala | Date: | Mon, 12 Jul 2004 21:06:57 +0000 |
| Subject: | Re: PHP Extension building issue on Win32 | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-24146@lists.php.net to get a copy of this message | ||
your vs project lib dirs might not configured correctly
in visual studio, go to tools/options, go to the directories tab, and show directories for Library files.
add a new entry for {path to your build dir}\win32build\lib, and move it to the top of the list.
Vincent Graux wrote:
Hello, I followed instructions at http://www.devnewz.com/090902b.html about setting up correctly a VC++ project for building an extension, and I tried to build the provided "hello world" example. Helas, I still get this "unresolved external symbol" kind of linker errors : Compiling... test1.cpp [warnings about externals] Linking... test1.obj : error LNK2001: unresolved external symbol _zend_printf Release_TS/php_test1.dll : fatal error LNK1120: 1 unresolved externals Error executing link.exe. Is there anything I missed ? Except that I use VC++ 5 SP3 and php4ts.lib of latest 4.3.7 in stead of VC++ 6 and 4.2, I don't see any meaningful configuration discrepancy... Below the first message that I - apparently wrongly and to no avail - sent to php-internals because I thought it was a Zend Engine settings problem. Any help welcome ; I'm sure a lot of people here can help me by diverting some ticks of their precious brain processing time :D VGREnvelope-to: vgraux@easynet.be Mailing-List: contact internals-help@lists.php.net; run by ezmlm list-help: <mailto:internals-help@lists.php.net> list-unsubscribe: <mailto:internals-unsubscribe@lists.php.net> list-post: <mailto:internals@lists.php.net> Delivered-To: mailing list internals@lists.php.net Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net X-Sender: vgraux@pop3.easynet.be X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Sun, 04 Jul 2004 23:00:31 +0200 To: internals@lists.php.net From: Vincent Graux <vgraux@easynet.be> Subject: [PHP-DEV] Probable Zend Engine/PHP issue on Win32 X-Virus-Scanned: by amavisd-new X-DCC-tiscali.be-Metrics: basil 1027; Body=1 Fuz1=1 Fuz2=1 Hello, Althought I usually try to avoid putting my fingers in a C/C++ IDE, I'm trying to build a DLL on Win32 via porting the code (it's the php_bwcache.dll, if you want to know) I managed to get rid of all compile errors & warnings, but now I have linker errors that I feel are due to Zend Engine settings in the provided PHP/Windows binaries. Even when successfully linking statically to php4ts.lib from latest & stable PHP 4.3.7, I still receive those linking errors and can't get rid of them : --------------------Configuration: bwcache - Win32 Release_TS PHP-------------------- Compiling... bware_cache.c Linking... Creating library php_bwcache.lib and object php_bwcache.exp bware_cache.obj : error LNK2001: unresolved external symbol _compiler_globals_id bware_cache.obj : error LNK2001: unresolved external symbol _executor_globals_id bware_cache.obj : error LNK2001: unresolved external symbol _empty_string bware_cache.obj : error LNK2001: unresolved external symbol _zend_compile_file php_bwcache.dll : fatal error LNK1120: 4 unresolved externals Error executing link.exe. Creating browse info file... php_bwcache.dll - 5 error(s), 0 warning(s) ---------------- I upgraded my VC++ 5.0 compiler to SP3 and don't think this is an issue I checked that compiler_globals_id (for instance) is indeed defined in the php4ts.dll (and so should be in the .lib import lib) Any advice welcome on those strange "unresolved externals", Thanks & Regards, VGR Il vaut mieux hasarder de sauver un coupable que de condamner un innocent. -Zadig, Voltaire Jean-Marie Arouet , 1694-1778 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.phpC'est proprement ne rien valoir que ne n'être utile à personne. -Descartes René Descartes, 1596-1650