Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Right-click on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
(11) |
Nov
(184) |
Dec
(182) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(224) |
Feb
(404) |
Mar
(244) |
Apr
(232) |
May
(162) |
Jun
(193) |
Jul
(174) |
Aug
(161) |
Sep
(170) |
Oct
(283) |
Nov
(310) |
Dec
(130) |
2007 |
Jan
(210) |
Feb
(129) |
Mar
(174) |
Apr
(246) |
May
(269) |
Jun
(212) |
Jul
(229) |
Aug
(202) |
Sep
(190) |
Oct
(194) |
Nov
(172) |
Dec
(128) |
2008 |
Jan
(343) |
Feb
(137) |
Mar
(186) |
Apr
(266) |
May
(156) |
Jun
(147) |
Jul
(140) |
Aug
(78) |
Sep
(128) |
Oct
(126) |
Nov
(100) |
Dec
(106) |
2009 |
Jan
(152) |
Feb
(165) |
Mar
(209) |
Apr
(166) |
May
(97) |
Jun
(152) |
Jul
(159) |
Aug
(196) |
Sep
(151) |
Oct
(107) |
Nov
(128) |
Dec
(64) |
2010 |
Jan
(105) |
Feb
(77) |
Mar
(129) |
Apr
(151) |
May
(126) |
Jun
(97) |
Jul
(86) |
Aug
(99) |
Sep
(64) |
Oct
(88) |
Nov
(59) |
Dec
(91) |
2011 |
Jan
(159) |
Feb
(111) |
Mar
(153) |
Apr
(114) |
May
(88) |
Jun
(201) |
Jul
(158) |
Aug
(124) |
Sep
(101) |
Oct
(149) |
Nov
(160) |
Dec
(68) |
2012 |
Jan
(74) |
Feb
(68) |
Mar
(121) |
Apr
(92) |
May
(172) |
Jun
(100) |
Jul
(85) |
Aug
(65) |
Sep
(74) |
Oct
(105) |
Nov
(76) |
Dec
(21) |
2013 |
Jan
(101) |
Feb
(57) |
Mar
(76) |
Apr
(35) |
May
(43) |
Jun
(50) |
Jul
(32) |
Aug
(50) |
Sep
(33) |
Oct
(58) |
Nov
(26) |
Dec
(49) |
2014 |
Jan
(46) |
Feb
(49) |
Mar
(54) |
Apr
(33) |
May
(46) |
Jun
(57) |
Jul
(34) |
Aug
(36) |
Sep
(69) |
Oct
(37) |
Nov
(27) |
Dec
(57) |
2015 |
Jan
(25) |
Feb
(52) |
Mar
(97) |
Apr
(41) |
May
(44) |
Jun
(36) |
Jul
(27) |
Aug
(33) |
Sep
(29) |
Oct
(45) |
Nov
(23) |
Dec
(23) |
2016 |
Jan
(6) |
Feb
(31) |
Mar
(17) |
Apr
(41) |
May
(31) |
Jun
(51) |
Jul
(20) |
Aug
(36) |
Sep
(69) |
Oct
(55) |
Nov
(29) |
Dec
(17) |
2017 |
Jan
(25) |
Feb
(22) |
Mar
(29) |
Apr
(18) |
May
(30) |
Jun
(13) |
Jul
(22) |
Aug
(12) |
Sep
(20) |
Oct
(60) |
Nov
(36) |
Dec
(20) |
2018 |
Jan
(16) |
Feb
(12) |
Mar
(25) |
Apr
(14) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
1
(3) |
2
(2) |
3
(6) |
4
(5) |
5
|
6
|
7
(2) |
8
|
9
(3) |
10
(1) |
11
(2) |
12
|
13
(2) |
14
(3) |
15
(2) |
16
(1) |
17
(6) |
18
(5) |
19
(11) |
20
(2) |
21
(9) |
22
(13) |
23
(9) |
24
(3) |
25
(1) |
26
(1) |
27
(10) |
28
(9) |
|
|
|
|
|
From: Jon Herman <jfc.herman@gm...> - 2011-02-28 19:03:37
|
Sorry if this wasn't clear: the error is given by the installation file of the separate academic software I'm trying to install. It is not an error by SWIG itself. The academic software requires an installation of SWIG, and because of the error it gives me I am lead to believe SWIG is not installed properly. Therefore my question, is there any step I might have missed? (as I understand your instructions, you did not need to run swig.exe, but perhaps I do need to do this? If so, what sort of input file would be required to install SWIG such that I can use C code from a Python environment?) On Mon, Feb 28, 2011 at 11:59 AM, Eileen Wei <ewei@...> wrote: > What’s the error message? > > > > *From:* Jon Herman [mailto:jfc.herman@...] > *Sent:* February-28-11 11:52 AM > *To:* Eileen Wei > *Cc:* swig-user@... > *Subject:* Re: [Swig-user] Windows 7 installation of SWIG > > > > Thanks for the help so far! > > Eileen, I've taken the steps you describe. I'm not sure if I've actually > "installed" SWIG now, because of the following: I'm trying to run an install > file of an academic program that allows the use of certain C modules in > Python scripts. This installation requires the installation of SWIG. > However, the errors that this install is giving me leads me to think SWIG is > not properly 'installed' yet. > > I realise it's hard to answer my questions without having access to the > install file I'm getting stuck with, but is there anything anyone could > think of that may still be wrong with my installation of SWIG? > > Thanks for the help so far, > > Jon > > > On Mon, Feb 28, 2011 at 11:20 AM, Eileen Wei <ewei@...> wrote: > > Hi Jon, > > > > I am a newbie for SWIG too, and I just started to use SWIG on my Win7 64bit > machine since last week, and I agree the instructions are not very straight > forward J > > > > I’d like to share with you what I found out. There is no need to “install” > SWIG on Windows, all you need is to extract the .zip file into your local > directory, say C:\swigwin-2.0.2. And yes the swig.exe works on 64bit > machines (I had that doubts originally but it was working for me so I know > J). > > > > And here is how I set the environment variables: click start->right click > Computer->Properties->Advanced system settings->click on Environment > Variables button->Under “System variables”, click “New…” to add the two new > python variables. > > > > Hope this helps, > > Eileen > > > > *From:* Jon Herman [mailto:jfc.herman@...] > *Sent:* February-28-11 10:54 AM > > > *To:* swig-user@... > *Subject:* [Swig-user] Windows 7 installation of SWIG > > > > Dear all, > > > > I realize this is a bit of a beginner's question, but I'm having trouble > installing SWIG on my 64-bit W7 system. Running the executable seemed not to > do much, although I believe it is written for a 32-bit system so this might > make sense. > > I am trying to install SWIG on this machine so I can use C/C++ modules in > Python scripts. I have looked at the manual for installing for windows, but > unfortunately it simply did not help me at all (this is undoubtedly due to a > lack of knowledge/experience on my side. For example, 'setting the > environment variables' is something I am not familiar with, so this section > of the manual leaves me uncertain of what to do and at which point)...is > there any more detailed guide available for installing SWIG on Windows, even > if this requires more steps than just running the executable? Or is there > perhaps someone kind enough to help me out with this directly? > > Thank you for any help you may be able to provide! > > Jon > > > |
From: Eileen Wei <ewei@Fekete.com> - 2011-02-28 18:59:23
|
What's the error message? From: Jon Herman [mailto:jfc.herman@...] Sent: February-28-11 11:52 AM To: Eileen Wei Cc: swig-user@... Subject: Re: [Swig-user] Windows 7 installation of SWIG Thanks for the help so far! Eileen, I've taken the steps you describe. I'm not sure if I've actually "installed" SWIG now, because of the following: I'm trying to run an install file of an academic program that allows the use of certain C modules in Python scripts. This installation requires the installation of SWIG. However, the errors that this install is giving me leads me to think SWIG is not properly 'installed' yet. I realise it's hard to answer my questions without having access to the install file I'm getting stuck with, but is there anything anyone could think of that may still be wrong with my installation of SWIG? Thanks for the help so far, Jon On Mon, Feb 28, 2011 at 11:20 AM, Eileen Wei <ewei@...<mailto:ewei@...>> wrote: Hi Jon, I am a newbie for SWIG too, and I just started to use SWIG on my Win7 64bit machine since last week, and I agree the instructions are not very straight forward :) I'd like to share with you what I found out. There is no need to "install" SWIG on Windows, all you need is to extract the .zip file into your local directory, say C:\swigwin-2.0.2. And yes the swig.exe works on 64bit machines (I had that doubts originally but it was working for me so I know :)). And here is how I set the environment variables: click start->right click Computer->Properties->Advanced system settings->click on Environment Variables button->Under "System variables", click "New..." to add the two new python variables. Hope this helps, Eileen From: Jon Herman [mailto:jfc.herman@...<mailto:jfc.herman@...>] Sent: February-28-11 10:54 AM To: swig-user@...<mailto:swig-user@...> Subject: [Swig-user] Windows 7 installation of SWIG Dear all, I realize this is a bit of a beginner's question, but I'm having trouble installing SWIG on my 64-bit W7 system. Running the executable seemed not to do much, although I believe it is written for a 32-bit system so this might make sense. I am trying to install SWIG on this machine so I can use C/C++ modules in Python scripts. I have looked at the manual for installing for windows, but unfortunately it simply did not help me at all (this is undoubtedly due to a lack of knowledge/experience on my side. For example, 'setting the environment variables' is something I am not familiar with, so this section of the manual leaves me uncertain of what to do and at which point)...is there any more detailed guide available for installing SWIG on Windows, even if this requires more steps than just running the executable? Or is there perhaps someone kind enough to help me out with this directly? Thank you for any help you may be able to provide! Jon |
From: Jon Herman <jfc.herman@gm...> - 2011-02-28 18:52:09
|
Thanks for the help so far! Eileen, I've taken the steps you describe. I'm not sure if I've actually "installed" SWIG now, because of the following: I'm trying to run an install file of an academic program that allows the use of certain C modules in Python scripts. This installation requires the installation of SWIG. However, the errors that this install is giving me leads me to think SWIG is not properly 'installed' yet. I realise it's hard to answer my questions without having access to the install file I'm getting stuck with, but is there anything anyone could think of that may still be wrong with my installation of SWIG? Thanks for the help so far, Jon On Mon, Feb 28, 2011 at 11:20 AM, Eileen Wei <ewei@...> wrote: > Hi Jon, > > > > I am a newbie for SWIG too, and I just started to use SWIG on my Win7 64bit > machine since last week, and I agree the instructions are not very straight > forward J > > > > I’d like to share with you what I found out. There is no need to “install” > SWIG on Windows, all you need is to extract the .zip file into your local > directory, say C:\swigwin-2.0.2. And yes the swig.exe works on 64bit > machines (I had that doubts originally but it was working for me so I know > J). > > > > And here is how I set the environment variables: click start->right click > Computer->Properties->Advanced system settings->click on Environment > Variables button->Under “System variables”, click “New…” to add the two new > python variables. > > > > Hope this helps, > > Eileen > > > > *From:* Jon Herman [mailto:jfc.herman@...] > *Sent:* February-28-11 10:54 AM > > *To:* swig-user@... > *Subject:* [Swig-user] Windows 7 installation of SWIG > > > > Dear all, > > > I realize this is a bit of a beginner's question, but I'm having trouble > installing SWIG on my 64-bit W7 system. Running the executable seemed not to > do much, although I believe it is written for a 32-bit system so this might > make sense. > > I am trying to install SWIG on this machine so I can use C/C++ modules in > Python scripts. I have looked at the manual for installing for windows, but > unfortunately it simply did not help me at all (this is undoubtedly due to a > lack of knowledge/experience on my side. For example, 'setting the > environment variables' is something I am not familiar with, so this section > of the manual leaves me uncertain of what to do and at which point)...is > there any more detailed guide available for installing SWIG on Windows, even > if this requires more steps than just running the executable? Or is there > perhaps someone kind enough to help me out with this directly? > > Thank you for any help you may be able to provide! > > Jon > |
From: Eileen Wei <ewei@Fekete.com> - 2011-02-28 18:21:01
|
Hi Jon, I am a newbie for SWIG too, and I just started to use SWIG on my Win7 64bit machine since last week, and I agree the instructions are not very straight forward :) I'd like to share with you what I found out. There is no need to "install" SWIG on Windows, all you need is to extract the .zip file into your local directory, say C:\swigwin-2.0.2. And yes the swig.exe works on 64bit machines (I had that doubts originally but it was working for me so I know :)). And here is how I set the environment variables: click start->right click Computer->Properties->Advanced system settings->click on Environment Variables button->Under "System variables", click "New..." to add the two new python variables. Hope this helps, Eileen From: Jon Herman [mailto:jfc.herman@...] Sent: February-28-11 10:54 AM To: swig-user@... Subject: [Swig-user] Windows 7 installation of SWIG Dear all, I realize this is a bit of a beginner's question, but I'm having trouble installing SWIG on my 64-bit W7 system. Running the executable seemed not to do much, although I believe it is written for a 32-bit system so this might make sense. I am trying to install SWIG on this machine so I can use C/C++ modules in Python scripts. I have looked at the manual for installing for windows, but unfortunately it simply did not help me at all (this is undoubtedly due to a lack of knowledge/experience on my side. For example, 'setting the environment variables' is something I am not familiar with, so this section of the manual leaves me uncertain of what to do and at which point)...is there any more detailed guide available for installing SWIG on Windows, even if this requires more steps than just running the executable? Or is there perhaps someone kind enough to help me out with this directly? Thank you for any help you may be able to provide! Jon |
From: David Piepgrass <dpiepgrass@me...> - 2011-02-28 18:18:37
|
I'm running SWIG 1.3.40 on W7 64 with no problems. 32-bit code normally works fine on 64-bit OSs. Personally I don't need to set up any environment variables to use SWIG. What else do you need to know? From: Jon Herman [mailto:jfc.herman@...] Sent: Monday, February 28, 2011 10:54 AM To: swig-user@... Subject: [Swig-user] Windows 7 installation of SWIG Dear all, I realize this is a bit of a beginner's question, but I'm having trouble installing SWIG on my 64-bit W7 system. Running the executable seemed not to do much, although I believe it is written for a 32-bit system so this might make sense. I am trying to install SWIG on this machine so I can use C/C++ modules in Python scripts. I have looked at the manual for installing for windows, but unfortunately it simply did not help me at all (this is undoubtedly due to a lack of knowledge/experience on my side. For example, 'setting the environment variables' is something I am not familiar with, so this section of the manual leaves me uncertain of what to do and at which point)...is there any more detailed guide available for installing SWIG on Windows, even if this requires more steps than just running the executable? Or is there perhaps someone kind enough to help me out with this directly? Thank you for any help you may be able to provide! Jon |
From: Jon Herman <jfc.herman@gm...> - 2011-02-28 17:53:46
|
Dear all, I realize this is a bit of a beginner's question, but I'm having trouble installing SWIG on my 64-bit W7 system. Running the executable seemed not to do much, although I believe it is written for a 32-bit system so this might make sense. I am trying to install SWIG on this machine so I can use C/C++ modules in Python scripts. I have looked at the manual for installing for windows, but unfortunately it simply did not help me at all (this is undoubtedly due to a lack of knowledge/experience on my side. For example, 'setting the environment variables' is something I am not familiar with, so this section of the manual leaves me uncertain of what to do and at which point)...is there any more detailed guide available for installing SWIG on Windows, even if this requires more steps than just running the executable? Or is there perhaps someone kind enough to help me out with this directly? Thank you for any help you may be able to provide! Jon |
From: marco gaddoni <marco.gaddoni+swig@gm...> - 2011-02-28 14:34:52
|
Hello, this is unexpected: if i run swig -csharp on this test.i %module test %nodefaultctor ta; %inline %{ typedef struct a { int b; } ta; %} i expected not to see the contructor on the csharp class ta. Instead, it is being created. If i change the line %nodefaultctor to %nodefaultctor a the constructor is not being created. Is this a bug? |
From: <Malte.Mauelshagen@dl...> - 2011-02-28 14:08:37
|
Hello, I have a question about passing arrays created in python to C via the SWIG interface. In C I have a function that looks like this: void set_arrayt(int *noElements, void *myArray) Now i would like to create a numpy-array in python and call this function. Thanks to the cpointer functions of swig i am able to create a int_pointer that i can use for the noElements parameter: #mymodule.i %include cpointer.i %pointer_functions(int, intp); # Python noElements = mymodule.new_intp() mymodule.intp_assign(noElelemts,100) However, i dont have an idea how to "convert" a numpy array like myArray = np.ones((10,10)) to a void pointer so that I can pass it as a parameter to the set_array function. I hope you can help me and thank you in advance! Malte |
From: 何平 <tdihp@ho...> - 2011-02-28 13:05:05
|
Thanks for the reply, William. your suggestion helps. but I found myself rather confused about the director.. 1. I tried my example again, it actually works. but with the restriction that the implementation of fun() MUST not be empty, which was what I wrote. 2. the fun() MUST be called out of original class, which is, cannot be called by this. otherwise it just call the original c++ implementation. Well, it smells buggy now :) -------------------------------------------------- From: "William S Fulton" <wsf@...> Sent: Monday, February 28, 2011 12:14 AM To: "何平" <tdihp@...> Cc: <swig-user@...> Subject: Re: [Swig-user] Ruby director question > On 27/02/11 02:15, 何平 wrote: >> Hi, I'm new here and this is my 1st post, so no hard feelings if my >> question is really dumb. >> SO my *.i file looks like this >> >> %module(directors="1") mymod >> %{ >> #include "rubywrapper_swig.h" >> %} >> %feature("nodirector"); >> %feature("director") MyWorld::fun; >> class MyWorld{ >> public: >> MyWorld(); >> virtual ~MyWorld(); >> virtual void fun(); >> }; >> void myLoop(MyWorld* world); >> >> for testing purpose, no real loops in myLoop: >> >> void MyWorld::fun() {} >> void myLoop(MyWorld* world) { >> world->fun(); >> } >> >> and testing script is pretty simple >> >> require 'mymod' >> include Mymod >> class World < MyWorld >> def mainLogical >> puts 'testing...' >> end >> end >> world = World.new >> mainLoop(world) >> >> So, I expect a ''testing...' print rather than nothing, but I got >> nothing... >> I'm using ruby 1.9.2, swigwin 2.0.2 >> please tell me what's wrong? >> Thanks >> > > You have directors turned off by default as you have > %feature("nodirector"); > In particular, directors are turned off the MyWorld class. If you want > very selective directors, add in: > > %feature("director") MyWorld; > > to what you already have. > > William > |
From: Mike Leahy <mgleahy@al...> - 2011-02-27 22:52:14
|
Hello List, I've been tinkering with trying to get the PHP swig bindings compiled for the GDAL project (http://gdal.org). I can get some specific test cases to work, but I'm running into problems with functions that do not behave the way I would expect with compariable bindings for other languages such as Python. You can see where I'm at if you take a look at my last posting on the GDAL dev list: http://lists.osgeo.org/pipermail/gdal-dev/2011-February/027947.html The main challenge with this issue is that I don't really understand how to use swig (how to define typemaps, etc.), and the GDAL developer community hasn't included a maintainer for the PHP bindings for quite some time. I'd be curious if anyone on this list can make some suggestions about how to approach this - based on what I noted in my post linked above, or in the previous threads I was discussing in the GDAL February archive. Essentially, it seems that the php typemaps for the GDAL project don't produce compariable output from library functions as those for the other language bindings like Python. Best regards, Mike |
From: Dean Edmonds <dean.edmonds@gm...> - 2011-02-27 18:43:03
|
On Sun, Feb 27, 2011 at 08:09, William S Fulton <wsf@...> wrote: > On 27/02/11 11:38, Vadim Zeitlin wrote: >> On Sat, 26 Feb 2011 19:15:30 -0800 Dean Edmonds<dean.edmonds@...> wrote: >> >> DE> I'm building swig 2.0.2 on linux and would like to enable pcre >> DE> support, but the binary will be distributed to a number of in-house >> DE> systems which cannot be guaranteed to have the pcre lib installed on >> DE> them. To get around that I would like to have swig link to the static >> DE> version of libpcre rather than the shared lib, but I don't see any >> DE> option for that in ./configure. [...] >> Or maybe you could just edit the makefile generated by configure if it's a >> one off build. That's what I ended up doing as it seemed the simplest and least disruptive to my system configuration. > Another alternative is to force gcc/g++, assuming you are using this > compiler, to use the static libs by setting -static in CXXFLAGS. If you're talking about setting CXXFLAGS for the swig configure and build, that didn't work as it meant that the link was looking for static versions of libc, etc, as well, which aren't installed. And I'd rather not bloat the binary by using static versions of them. Thanx for your help everyone. -- -deane |
From: The Carrolls <thecarrolls@ji...> - 2011-02-27 17:38:39
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"> <title></title> </head> <body bgcolor="#ffffff" text="#000000"> On 02/27/11 11:21, William S Fulton wrote: <blockquote cite="mid:4D6A7A26.6090304@..." type="cite"><br> This has been suggested before but no-one has ever got around to implementing it. Certainly we'd consider contributions in this area. Probably best to discuss on the swig-devel mailing list if you are able to contribute something along these lines. I think one of the biggest challenges to getting it into future releases is to make it work/tested across all the major operating systems that SWIG is used on and also handling versioning/compatibility across different releases. <br> <br> William <br> <br> </blockquote> <br> Is there a list of the platforms it needs to run on somewhere?<br> <br> </body> </html> |
From: William S Fulton <wsf@fu...> - 2011-02-27 16:41:57
|
On 23/02/11 11:30, Jacob F. wrote: > Hi, > > I'm getting somewhat odd behavior when wrapping C++ functions that have > all arguments optional. > > C++ header definition for the function talked about below: > struct display { > ... > void draw(float = 0, float = 0, float = 1, float = NULL, float = NULL, > float = 0, float = NULL); > ... > } > > A normal class::function looks like this in the outputted module .py file: > def draw(self, *args) -> "void" : return _scge.display_draw(self, *args) > > But when all arguments are optional it looks like this... > def draw(self, arg0 : 'float' = 0, arg1 : 'float' = 0, arg2 : 'float' = 1, > arg3 : 'float' = None, arg4 : 'float' = None, > arg5 : 'float' = 0, arg6 : 'float' = None) -> "void" : return > _scge.display_draw(self, arg0, arg1, arg2, arg3, arg4, arg5, arg6) > > Now if I call display.draw() or with any arguments it gives an error: > File "/media/Field/lb/pybin/scge.py", line 285, in draw > arg5 : 'float' = 0, arg6 : 'float' = None) -> "void" : return > _scge.display_draw(self, arg0, arg1, arg2, arg3, arg4, arg5, arg6) > NotImplementedError: Wrong number of arguments for overloaded function > 'display_draw'. > Possible C/C++ prototypes are: > draw(display *,float,float,float,float,float,float,float) > draw(display *,float,float,float,float,float,float) > draw(display *,float,float,float,float,float) > draw(display *,float,float,float,float) > draw(display *,float,float,float) > draw(display *,float,float) > draw(display *,float) > draw(display *) > > > If I change that line in the outputted module .py file to read: > def draw(self, *args) -> "void" : return _scge.display_draw(self, *args) > > ...then I can call display.draw() fine. > > Is this a bug? Or something I'm doing wrong? That could be the case as > I've only just started using SWIG 2 days ago, loving it too btw. > This is a bug. Please put it in the SourceForge bug tracker. Strange one as well, it has something to do with the default value, as this fails: struct display { void draw(float = NULL) {} }; and this works as expected: struct display { void draw(float = 0) {} }; If you can't modify the headers you are wrapping, please workaround it using: %feature("compactdefaultargs") display::draw; William |
From: William S Fulton <wsf@fu...> - 2011-02-27 16:22:37
|
On 26/02/11 14:51, The Carrolls wrote: > > Hello all, > > I've been thinking about using SWIG for something custom. As a result I > certainly wouldn't expect the project to take my custom language as an > addition but what if I added the ability to load a language as a plugin? > > Would it be useful to the community if they could use swig like so: > > swig -plugin path/to/libplugin.so foo.i > > or maybe > > swig -plugindir /path/to/.sofiles -customlang foo.i > > Would that be useful and would it be accepted by the commiters? > This has been suggested before but no-one has ever got around to implementing it. Certainly we'd consider contributions in this area. Probably best to discuss on the swig-devel mailing list if you are able to contribute something along these lines. I think one of the biggest challenges to getting it into future releases is to make it work/tested across all the major operating systems that SWIG is used on and also handling versioning/compatibility across different releases. William |
From: William S Fulton <wsf@fu...> - 2011-02-27 16:14:21
|
On 27/02/11 02:15, 何平 wrote: > Hi, I'm new here and this is my 1st post, so no hard feelings if my > question is really dumb. > SO my *.i file looks like this > > %module(directors="1") mymod > %{ > #include "rubywrapper_swig.h" > %} > %feature("nodirector"); > %feature("director") MyWorld::fun; > class MyWorld{ > public: > MyWorld(); > virtual ~MyWorld(); > virtual void fun(); > }; > void myLoop(MyWorld* world); > > for testing purpose, no real loops in myLoop: > > void MyWorld::fun() {} > void myLoop(MyWorld* world) { > world->fun(); > } > > and testing script is pretty simple > > require 'mymod' > include Mymod > class World < MyWorld > def mainLogical > puts 'testing...' > end > end > world = World.new > mainLoop(world) > > So, I expect a ''testing...' print rather than nothing, but I got nothing... > I'm using ruby 1.9.2, swigwin 2.0.2 > please tell me what's wrong? > Thanks > You have directors turned off by default as you have %feature("nodirector"); In particular, directors are turned off the MyWorld class. If you want very selective directors, add in: %feature("director") MyWorld; to what you already have. William |
From: William S Fulton <wsf@fu...> - 2011-02-27 16:09:41
|
On 27/02/11 11:38, Vadim Zeitlin wrote: > On Sat, 26 Feb 2011 19:15:30 -0800 Dean Edmonds<dean.edmonds@...> wrote: > > DE> I'm building swig 2.0.2 on linux and would like to enable pcre > DE> support, but the binary will be distributed to a number of in-house > DE> systems which cannot be guaranteed to have the pcre lib installed on > DE> them. To get around that I would like to have swig link to the static > DE> version of libpcre rather than the shared lib, but I don't see any > DE> option for that in ./configure. > DE> > DE> I tried setting the PCRE_LIBS envariable to /usr/lib64/libpcre.a > DE> before doing the configure and make, but the resulting swig binary was > DE> still linked to the shared lib. > DE> > DE> Any ideas on how to achieve what my goal? > > Hello, > > Looking at Tools/config/ax_path_generic.m4 PCRE_LIBS seems to be indeed > ignored. AFAICS the only workaround would be to create your own shell > script which would output the wanted values for it, e.g. (this is untested) > > $ cat> ~/static-pcre-config > #!/bin/sh > usage="Usage: static-pcre-config --{libs,cflags}" > if [ $# -neq 1 ]; then > echo "$usage" 1>&2 > exit 1 > fi > > case $1 in > --cflags) > ;; > --libs) > echo "/usr/lib64/libpcre.a" > ;; > *) > echo "$usage" 1>&2 > exit 1 > ;; > esac > ^D > $ swig/configure PCRE_CONFIG=$HOME/static-pcre-config > > Or maybe you could just edit the makefile generated by configure if it's a > one off build. > Vadim, any chance we can fix the autotools to allow this easily? Can ax_path_generic.m4 be fixed for future releases? Dean, another alternative, is to rebuild pcre to generate just the static libs. If you put the pcre tarball in the top level SWIG directory, this can be done very easily using a helper script in Tools/pcre-build.sh and hopefully the help is enough to explain all: ~/swig/swig-2.0.2$ Tools/pcre-build.sh --help Helper script to build PCRE as a static library from a tarball just for use during the SWIG build. It does not install PCRE for global use on your system. Usage: pcre-build.sh [--help] [args] args - optional additional arguments passed on to the PCRE configure script (leave out unless you are an expert at configure) --help - Display this help information. Instructions: - Download the latest PCRE source tarball from http://www.pcre.org and place in the directory that you will configure and build SWIG. - Run this script in the same directory that you intend to configure and build SWIG in. - Afterwards run the SWIG configure scrip which will then find and use the PCRE static libraries in the pcre/pcre-swig-install subdirectory. Another alternative is to force gcc/g++, assuming you are using this compiler, to use the static libs by setting -static in CXXFLAGS. William |
From: Vadim Zeitlin <vz-swig@ze...> - 2011-02-27 12:12:18
|
On Sat, 26 Feb 2011 19:15:30 -0800 Dean Edmonds <dean.edmonds@...> wrote: DE> I'm building swig 2.0.2 on linux and would like to enable pcre DE> support, but the binary will be distributed to a number of in-house DE> systems which cannot be guaranteed to have the pcre lib installed on DE> them. To get around that I would like to have swig link to the static DE> version of libpcre rather than the shared lib, but I don't see any DE> option for that in ./configure. DE> DE> I tried setting the PCRE_LIBS envariable to /usr/lib64/libpcre.a DE> before doing the configure and make, but the resulting swig binary was DE> still linked to the shared lib. DE> DE> Any ideas on how to achieve what my goal? Hello, Looking at Tools/config/ax_path_generic.m4 PCRE_LIBS seems to be indeed ignored. AFAICS the only workaround would be to create your own shell script which would output the wanted values for it, e.g. (this is untested) $ cat > ~/static-pcre-config #!/bin/sh usage="Usage: static-pcre-config --{libs,cflags}" if [ $# -neq 1 ]; then echo "$usage" 1>&2 exit 1 fi case $1 in --cflags) ;; --libs) echo "/usr/lib64/libpcre.a" ;; *) echo "$usage" 1>&2 exit 1 ;; esac ^D $ swig/configure PCRE_CONFIG=$HOME/static-pcre-config Or maybe you could just edit the makefile generated by configure if it's a one off build. Regards, VZ |
From: Dean Edmonds <dean.edmonds@gm...> - 2011-02-27 03:15:38
|
I'm building swig 2.0.2 on linux and would like to enable pcre support, but the binary will be distributed to a number of in-house systems which cannot be guaranteed to have the pcre lib installed on them. To get around that I would like to have swig link to the static version of libpcre rather than the shared lib, but I don't see any option for that in ./configure. I tried setting the PCRE_LIBS envariable to /usr/lib64/libpcre.a before doing the configure and make, but the resulting swig binary was still linked to the shared lib. Any ideas on how to achieve what my goal? Thanx. -- -deane |
From: 何平 <tdihp@ho...> - 2011-02-27 02:15:38
|
Hi, I'm new here and this is my 1st post, so no hard feelings if my question is really dumb. SO my *.i file looks like this %module(directors="1") mymod %{ #include "rubywrapper_swig.h" %} %feature("nodirector"); %feature("director") MyWorld::fun; class MyWorld{ public: MyWorld(); virtual ~MyWorld(); virtual void fun(); }; void myLoop(MyWorld* world); for testing purpose, no real loops in myLoop: void MyWorld::fun() {} void myLoop(MyWorld* world) { world->fun(); } and testing script is pretty simple require 'mymod' include Mymod class World < MyWorld def mainLogical puts 'testing...' end end world = World.new mainLoop(world) So, I expect a ''testing...' print rather than nothing, but I got nothing... I'm using ruby 1.9.2, swigwin 2.0.2 please tell me what's wrong? Thanks |
From: The Carrolls <thecarrolls@ji...> - 2011-02-26 14:51:59
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#ffffff" text="#000000"> <div class="moz-text-html" lang="x-western"> <br> Hello all,<br> <br> I've been thinking about using SWIG for something custom. As a result I certainly wouldn't expect the project to take my custom language as an addition but what if I added the ability to load a language as a plugin?<br> <br> Would it be useful to the community if they could use swig like so:<br> <br> swig -plugin path/to/libplugin.so foo.i<br> <br> or maybe<br> <br> swig -plugindir /path/to/.sofiles -customlang foo.i<br> <br> Would that be useful and would it be accepted by the commiters?<br> <br> Let me know.<br> <br> Thanks<br> Jim<br> <br> </div> </body> </html> |
From: Eileen Wei <ewei@Fekete.com> - 2011-02-25 21:58:26
|
Thank you Bob. I have just started to learn SWIG and had some success with wrapping simple .dll. I will work with developers on the API we need for testing, so I might be able to influence how the .h file look like. Is there anything I need to watch for so as to make my life easier in generating Python extension? Any part of the user guide I should pay close attention to? It's a huge document... Thanks, Eileen From: Bob Hood [mailto:bhood2@...] Sent: February-24-11 11:57 AM To: swig-user@... Subject: Re: [Swig-user] What's the best way to expose C++ APIs to Python (Windows) On 2/24/2011 11:30 AM, Eileen Wei wrote: Hi, I am a software tester and I am exploring ways to exposing APIs of Windows applications that's developed in C++ and MFC to Python for testing purpose, because I'd like to test below the GUI level. By googling, the most talked about I found are SWIG, Boost::Python and SIP. I am guessing users of this group might have done some research on this topic before choosing SWIG, and I would really appreciate any sharing of insight or experience about it. Of the three, I would say that SWIG is your best bet. It's greatest strength in comparison to the others is its ability to automatically parse C/C++ headers and code to generate wrappers for you. For simplified wrapping, this greatly reduces the amount of maintenance required on your part whenever the API you are wrapping changes. If you end up getting into complex wrapping situations, though, you might run into issues (and this may be the case for all three, not just SWIG). There are situations that the documentation does not cover, and then your only recourse is to seek help here on this mailing list, and hope that you've not gone so far off the reservation that nobody can help. I've hit that a couple of times, and have had to suspend my efforts as a result. |
From: Bob Hood <bhood2@co...> - 2011-02-24 18:57:32
|
On 2/24/2011 11:30 AM, Eileen Wei wrote: > > Hi, > > I am a software tester and I am exploring ways to exposing APIs of > Windows applications that's developed in C++ and MFC to Python for > testing purpose, because I'd like to test below the GUI level. > > By googling, the most talked about I found are SWIG, Boost::Python and > SIP. I am guessing users of this group might have done some research > on this topic before choosing SWIG, and I would really appreciate any > sharing of insight or experience about it. > Of the three, I would say that SWIG is your best bet. It's greatest strength in comparison to the others is its ability to automatically parse C/C++ headers and code to generate wrappers for you. For simplified wrapping, this greatly reduces the amount of maintenance required on your part whenever the API you are wrapping changes. If you end up getting into complex wrapping situations, though, you might run into issues (and this may be the case for all three, not just SWIG). There are situations that the documentation does not cover, and then your only recourse is to seek help here on this mailing list, and hope that you've not gone so far off the reservation that nobody can help. I've hit that a couple of times, and have had to suspend my efforts as a result. |
From: Eileen Wei <ewei@Fekete.com> - 2011-02-24 18:30:29
|
Hi, I am a software tester and I am exploring ways to exposing APIs of Windows applications that's developed in C++ and MFC to Python for testing purpose, because I'd like to test below the GUI level. By googling, the most talked about I found are SWIG, Boost::Python and SIP. I am guessing users of this group might have done some research on this topic before choosing SWIG, and I would really appreciate any sharing of insight or experience about it. Thanks, Eileen |
From: Mathieu Malaterre <mathieu.malaterre@gm...> - 2011-02-24 08:01:50
|
William, I have added a comment (I cannot attach file to a bug I did not report), this comment links to my std_set.i for java and C#. License is BSD for the GDCM project but feel free to change it if this conflict with swig. Thanks ! On Tue, Feb 22, 2011 at 11:49 PM, William S Fulton <wsf@...> wrote: > There is a simple version in the SF patches: > http://sourceforge.net/tracker/?func=detail&aid=1460131&group_id=1645&atid=301645 > plus a reference to some others. Please add your contributions to this patch > in SF. > > William > > On 17/02/11 17:54, Mathieu Malaterre wrote: >> >> I think this is a good idea to log that in the bug tracker before it >> get lost ... >> >> 2cts& thanks for your work >> >> On Wed, Feb 16, 2011 at 11:23 AM, Ben Konrath<ben@...> wrote: >>> >>> Hi Mathieu, >>> >>> I ended making only a basic solution which I committed to the >>> java-libglom repository here: >>> >>> http://gitorious.org/online-glom/java-libglom/blobs/master/src/std_list.i >>> >>> I guess the hard part is to figure out how to create a java iterator >>> from the c++ iterator. But the solution I have is good enough for my >>> purposes. If people think it would be useful, I can file a swig bug >>> and post a patch with what I have. >>> >>> Thanks, Ben >>> >>> On Mon, Feb 14, 2011 at 2:40 PM, Mathieu Malaterre >>> <mathieu.malaterre@...> wrote: >>>> >>>> Ben, >>>> >>>> AFAIK noone has done it. I recently submitted the support for >>>> std::map in the patch section: >>>> >>>> >>>> https://sourceforge.net/tracker/?func=detail&aid=3175718&group_id=1645&atid=301645 >>>> >>>> the code in swig is fairly trivial to understand. So I would just go >>>> ahead and try it. If you submit it back, I'd volonteer to test it. >>>> >>>> Thanks >>>> >>>> On Mon, Feb 14, 2011 at 2:04 PM, Ben Konrath<ben@...> wrote: >>>>> >>>>> Hi, >>>>> >>>>> I noticed that Swig doesn't have Java support for std::list. Is there >>>>> a particular reason for this? I'm thinking about taking a stab at >>>>> implementing it but I'm wondering if it hasn't been implemented >>>>> because it's going to be difficult. Any pointers / information would >>>>> be appreciated. >>>>> >>>>> Thanks, Ben >>>>> >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio >>>>> XE: >>>>> Pinpoint memory and threading errors before they happen. >>>>> Find and fix more than 250 security defects in the development cycle. >>>>> Locate bottlenecks in serial and parallel code that limit performance. >>>>> http://p.sf.net/sfu/intel-dev2devfeb >>>>> _______________________________________________ >>>>> Swig-user mailing list >>>>> Swig-user@... >>>>> https://lists.sourceforge.net/lists/listinfo/swig-user >>>>> >>>> >>>> >>>> >>>> -- >>>> Mathieu >>>> >>> >> >> >> > > -- Mathieu |
From: Eileen Wei <ewei@Fekete.com> - 2011-02-23 22:36:17
|
Problem solved, thank you William! -Eileen -----Original Message----- From: William Fulton [mailto:william@...] On Behalf Of William S Fulton Sent: February-23-11 1:42 PM To: Eileen Wei Cc: swig-user@... Subject: Re: [Swig-user] fatal error LNK1104: cannot open file 'python27_d.lib' On 23/02/11 17:38, Eileen Wei wrote: > Hi, > > I am new to SWIG, and I'd like to use SWIG to wrap C++ functions to be > called from Python. > > I have Python2.7.1 32bit installed in my Win7 64bit machine and I have > downloaded swigwin-2.0.2 and unzipped it to C:\swigwin-2.0.2. > > I have also set the following environment variables: > > PYTHON_INCLUDE=C:\Python27\include > > PYTHON_LIB=C:\Python27\libs\python27.lib > > I opened C:\swigwin-2.0.2\Examples\python\simple\example.dsp in > Microsoft Visio Studio 2008 and tried to build the solution, then I got > the following error message: > > Error 1 fatal error LNK1104: cannot open file 'python27_d.lib' example > example > Are you doing a release build, see http://www.swig.org/Doc2.0/Windows.html. William |