error in compiled in swig for connect c with php -


swig -php example.i

यह 3 फाइलें example_wrap.c, php_example.h और example.php। पहली फ़ाइल, example_wrap.c में एक PHP एक्सटेंशन बनाने के लिए आवश्यक सभी सी कोड हैं। दूसरी फ़ाइल, php_example.h में हेडर की जानकारी आवश्यक है, यदि आप स्थिर php interpreter में विस्तार से लिंक करना चाहते हैं। तीसरी फाइल, example.php को PHP लिपियों द्वारा शामिल किया जा सकता है।

या तो तीन फाइलें बनाई जाती हैं, फिर निम्नलिखित कोडिंग निष्पादित करें।

इसका उपयोग उदाहरण के लिए किया जाता है। फ़ाइल।

  जीसीसी `php-config --includes` -fpic -c example_wrap.c gcc -shared example_wrap.o -o example.so  

मुझे लगता है कि उदाहरण के साथ, उदाहरण के साथ एक कदम को याद कर रहे हैं। [एचसी] ताकि आपके संकलन को कुछ करना चाहिए:

  gcc -c example.c -o example.o gcc ` Php-config --includes` -fpic -c example_wrap.c gcc -shared example_wrap.o example.o -o example.so  

Comments

Popular posts from this blog

c++ - QtQuick: QQmlApplicationEngine failed to load component qrc:/main.qml:23 Invalid attached object assignment -

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

php - What is the best way to get the URL of a 404'd file after redirect? -