swig / www Goto Github PK
View Code? Open in Web Editor NEWWeb pages at http://www.swig.org
Web pages at http://www.swig.org
SWIG (Simplified Wrapper and Interface Generator) Tagline: SWIG is a compiler that integrates C and C++ with languages including Perl, Python, Tcl, Ruby, PHP, Java, C#, D, Go, Lua, Octave, R, Scheme (Guile, MzScheme/Racket), Scilab, Ocaml. SWIG can also export its parse tree into XML. SWIG reads annotated C/C++ header files and creates wrapper code (glue code) in order to make the corresponding C/C++ libraries available to the listed languages, or to extend C/C++ programs with a scripting language. Up-to-date SWIG related information can be found at https://www.swig.org A SWIG FAQ and other hints can be found on the SWIG Wiki: https://github.com/swig/swig/wiki License ======= Please see the LICENSE file for details of the SWIG license. For further insight into the license including the license of SWIG's output code, please visit https://www.swig.org/legal.html Release Notes ============= Please see the CHANGES.current file for a detailed list of bug fixes and new features for the current release. The CHANGES file contains bug fixes and new features for older versions. A summary of changes in each release can be found in the RELEASENOTES file. Documentation ============= The Doc/Manual directory contains the most recent set of updated documentation for this release. The documentation is available in three different formats, each of which contains identical content. These format are, pdf (Doc/Manual/SWIGDocumentation.pdf), single page html (Doc/Manual/SWIGDocumentation.html) or multiple page html (other files in Doc/Manual). Please select your chosen format and copy/install to wherever takes your fancy. There is some technical developer documentation available in the Doc/Devel subdirectory. This is not necessarily up-to-date, but it has some information on SWIG internals. Documentation is also online at https://www.swig.org/doc.html. Backwards Compatibility ======================= The developers strive their best to preserve backwards compatibility between releases, but this is not always possible as the overriding aim is to provide the best wrapping experience. Where backwards compatibility is known to be broken, it is clearly marked as an incompatibility in the CHANGES and CHANGES.current files. See the documentation for details of the SWIG_VERSION preprocessor symbol if you have backward compatibility issues and need to use more than one version of SWIG. Installation ============ Please read the Doc/Manual/Preface.html#Preface_installation for full installation instructions for Windows, Unix and Mac OS X using the release tarball/zip file. The INSTALL file has generic build and installation instructions for Unix users. Users wishing to build and install code from Github should visit https://swig.org/svn.html to obtain the more detailed instructions required for building code obtained from Github - extra steps are required compared to building from the release tarball. Testing ======= The typical 'make -k check' can be performed on Unix operating systems. Please read Doc/Manual/Preface.html#Preface_testing for details. Examples ======== The Examples directory contains a variety of examples of using SWIG and it has some browsable documentation. Simply point your browser to the file "Example/index.html". The Examples directory also includes Visual C++ project 6 (.dsp) files for building some of the examples on Windows. Later versions of Visual Studio will convert these old style project files into a current solution file. Known Issues ============ There are minor known bugs, details of which are in the bug tracker, see https://www.swig.org/bugs.html. Troubleshooting =============== In order to operate correctly, SWIG relies upon a set of library files. If after building SWIG, you get error messages like this, $ swig foo.i :1. Unable to find 'swig.swg' :3. Unable to find 'tcl8.swg' it means that SWIG has either been incorrectly configured or installed. To fix this: 1. Make sure you remembered to do a 'make install' and that the installation actually worked. Make sure you have write permission on the install directory. 2. If that doesn't work, type 'swig -swiglib' to find out where SWIG thinks its library is located. 3. If the location is not where you expect, perhaps you supplied a bad option to configure. Use ./configure --prefix=pathname to set the SWIG install location. Also, make sure you don't include a shell escape character such as ~ when you specify the path. 4. The SWIG library can be changed by setting the SWIG_LIB environment variable. However, you really shouldn't have to do this. If you are having other troubles, you might look at the SWIG Wiki at https://github.com/swig/swig/wiki. Participate! ============ Please report any errors and submit patches (if possible)! We only have access to a limited variety of hardware (Linux, Solaris, OS-X, and Windows). All contributions help. If you would like to join the SWIG development team or contribute a language module to the distribution, please contact the swig-devel mailing list, details at https://www.swig.org/mail.html. -- The SWIG Maintainers
Sourceforge.net and its mirrors currently host the swig brew formula and packages. Unfortunately, many organizations are blocking any downloads from sourceforge.net given various security concerns with the practices in that platform.
Many other packages and brew formula (especially) have migrated to the GitHub container registry (ghcr.io) or accessing the raw files directly from GitHub via raw.githubusercontent.com. Both of these options appear to be an industry trend with greater trust of the content. Please consider migrating where the swig package and formulae can be downloaded from Sourceforge to GitHub.
When googling results in SWIG documentation, it's always (at least for me) only version 1.3.
For example:
https://www.google.co.uk/search?q=swig+python
gives
www.swig.org/Doc1.3/Python.htm
Apparently google considers versions 1.3, 2.0 and 3.0 too similar to show them all, but there must be a way to hint which version is the preferred one. Which would be the latest one?
AFAIS the example at https://github.com/swig/www/blob/master/Doc3.0/Python.html#L2865 should read super(mymodule.Foo, self).__init__(foo)
.
We've had a few tickets created in the SF trackers since switching to github, which isn't a good experience for users as nobody is regularly checking them (I've only noticed because I've been checking the old issues to close duplicates and those fixed since, and to actually address the low-hanging fruit.
In particular we've had two this week - I closed one as already fixed and the other with instructions to report to github instead, but it's not a good use of my time.
@wsfulton Can you remove "User Permission" to "create" from "Authenticated"? Or give me (I'm "olly" there) Admin rights so I can?
Hello, Swig Development Team.
Recently, I tried to run python3 makeweb.py
to build a complete website locally. However, it failed with the following error messages. What happened?
Traceback (most recent call last):
File "/media/hwhsu1231/Data/Test/www/makeweb.py", line 121, in <module>
html_string = subprocess.check_output(["php", php_filename])
File "/usr/lib/python3.10/subprocess.py", line 421, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/lib/python3.10/subprocess.py", line 503, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/lib/python3.10/subprocess.py", line 971, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.10/subprocess.py", line 1863, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'php'
The following is the full logs:
hwhsu1231@vb-kubuntu:/media/hwhsu1231/Data/Test$ git clone https://github.com/swig/www.git
Cloning into 'www'...
remote: Enumerating objects: 2683, done.
remote: Counting objects: 100% (145/145), done.
remote: Compressing objects: 100% (108/108), done.
remote: Total 2683 (delta 53), reused 107 (delta 36), pack-reused 2538
Receiving objects: 100% (2683/2683), 62.39 MiB | 2.53 MiB/s, done.
Resolving deltas: 100% (1749/1749), done.
hwhsu1231@vb-kubuntu:/media/hwhsu1231/Data/Test$ cd www
hwhsu1231@vb-kubuntu:/media/hwhsu1231/Data/Test/www$ python makeweb.py
Command 'python' not found, did you mean:
command 'python3' from deb python3
command 'python' from deb python-is-python3
hwhsu1231@vb-kubuntu:/media/hwhsu1231/Data/Test/www$ which python
hwhsu1231@vb-kubuntu:/media/hwhsu1231/Data/Test/www$ which python3
/usr/bin/python3
hwhsu1231@vb-kubuntu:/media/hwhsu1231/Data/Test/www$ python3 makeweb.py
Wrote donate.html
Wrote download.html
Wrote exec.html
Wrote faq.html
Wrote future.html
Wrote guilty.html
Wrote history.html
Wrote legal.html
Wrote links.html
Wrote mail.html
Wrote myths.html
Wrote nsf.html
Wrote projects.html
Wrote propaganda.html
Wrote rants.html
Wrote release.html
Wrote screenshot.html
Wrote screenshot2.html
Wrote survey.html
Wrote surveyresults.html
Wrote svn.html
Wrote tutorial.html
Wrote y2k.html
Wrote article_cpp.html
Wrote bugs.html
Wrote compare.html
Wrote compat.html
Wrote cpp.html
Wrote doc.html
Wrote news.php
Traceback (most recent call last):
File "/media/hwhsu1231/Data/Test/www/makeweb.py", line 121, in <module>
html_string = subprocess.check_output(["php", php_filename])
File "/usr/lib/python3.10/subprocess.py", line 421, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/lib/python3.10/subprocess.py", line 503, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/lib/python3.10/subprocess.py", line 971, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.10/subprocess.py", line 1863, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'php'
hwhsu1231@vb-kubuntu:/media/hwhsu1231/Data/Test/www$
Hello, Swig Development Team.
I noticed that there are some PDF files stored in this swig/www repository. And they seems to be generated from their corresponding HTML files. For example:
I wonder how are those PDF files generated from their corresponding HTML files in swig/www?
Besides, I wonder what is the relation between the following two contents?
It is mandatory in 2020.
Given SWIG has dropped support for PHP7 in swig-4.2.0 and testing is now done with PHP8, we need to update the website generation for PHP8 too.
The index.html file is generated by running:
make updateweb
which simply runs:
python makeweb.py
One of the steps it does is generate index.php from index.ph, then index.html is more or less generated by running:
php index.php > index.html
This final step fails with PHP8 and does not give any errors.
Some php expertise would be much appreciated to provide a fix. Alternatively perhaps replace this all with something completely different or replace magpierss (which hasn't been maintained for a decade with something else like simplepie simplepie comparisons.
The page
http://www.swig.org/tutorial.html
has a link to
http://www.southern-storm.com.au/portable_net.html
but that page does no longer contain any helpful content.
(Link as code, because I did not want to link there again).
$ dig @ns11.worldnic.com www.swig.org A +norecurse
; <<>> DiG 9.18.20 <<>> @ns11.worldnic.com www.swig.org A +norecurse
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: REFUSED, id: 40490
;; flags: qr; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
; EDE: 15 (Blocked): (Request blocked by policy)
;; QUESTION SECTION:
;www.swig.org. IN A
;; Query time: 17 msec
;; SERVER: 162.159.26.214#53(ns11.worldnic.com) (UDP)
;; WHEN: Tue Feb 13 12:52:22 JST 2024
;; MSG SIZE rcvd: 72
What happend?
Though swig.org can be resolved and https://swig.org/ seems to show us same contents of https://www.swig.org ...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.