Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to compile #3

Open
thekeithwaters opened this issue Jan 26, 2022 · 1 comment
Open

Unable to compile #3

thekeithwaters opened this issue Jan 26, 2022 · 1 comment

Comments

@thekeithwaters
Copy link

hi - please can you give me some guidance on what to do here?

[root@dev SimplePcap-master]# head -2 GNUmakefile
PHPINC += /usr/local/include/php
SWIG += /usr/dev/swig/bin/swig
[root@dev SimplePcap-master]# gmake
mkdir -p ./build
g++ -fPIC -I./include -I./build/build -I/usr/local/include/php/Zend -I/usr/local/include/php/main -I/usr/local/include/php/ext -I/usr/local/include/php/TSRM -I/usr/local/include/php -c -o build/SimplePcap_swig.o build/SimplePcap_swig.cpp
build/SimplePcap_swig.cpp:1866:90: error: macro "add_assoc_string" passed 4 arguments, but takes just 3
add_assoc_string(return_value, iter->first.c_str(), (char )iter->second.c_str(), 1);
^
build/SimplePcap_swig.cpp: In function 'void _wrap_SimplePcap_findAllDevs(zend_execute_data
, zval*)':
build/SimplePcap_swig.cpp:1866:7: error: 'add_assoc_string' was not declared in this scope
add_assoc_string(return_value, iter->first.c_str(), (char *)iter->second.c_str(), 1);
^
gmake: *** [build/SimplePcap_swig.o] Error 1

thank you!

@thekeithwaters
Copy link
Author

after removing the ,1. (for "duplicate" in add_assoc_string) , it does compile (but removing 1 might cause issues???)

The example code gives the following error:
terminate called after throwing an instance of 'SimplePcapNs::GenericPcapException'
what(): pcap_next() returned null

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant