Skip to main content

SWIG.... Never throw your old code away.

Alsalam alikom wa ra7mat Allah wa barakatoh

Today, I found a program that cought my attention, I didn't try it yet but I read a tutorial and now downloading the package...

What is it anyway?
SWIG stands for Software Interface Generator, it's a program that takes your unmanaged code (C/C++ for example) and automatically builds a wrapper library for it in a lot of other languages (C#, Perl, PHP, ...etc).

Just that simple...

Example:
// Example: file.h
class SimpleSample
{
public:
void DoSomething();
}
This header file can be converted to SimpleSample.cs which uses pInvoke to call the underlying C++ Code...

SWIG is a fully function C++ Compiler. It can also build up a proxy class for a collection of your C++ Functions/Classes. It's just nice and powerful (I hope it functions like how it sounds)

Moreover, it's Open Source, works with a GNU CSharp Compiler (in case you want to output a .NET Library) it can also work with many other CSharp Compilers (if you wish to change)

I'm going to try it (when I manage to connect to the wireless service at the faculty again In Shaa Allah...) and I'll be posting my little experience with it In Shaa Allah...

There are a lot of ideas over there... work hard, and you will get one, then you will have to work harder to get it done... Just start...

Alsalam alikom wa ra7mat Allah wa barakatoh

Comments

Popular posts from this blog

Windows7 adds Math Input Panel

Alsalam alikom wa ra7mat Allah wa barakatoh… I was reading a windows team post about Input Panels improvements in Windows7 [ here ]. When at the end I saw a very interesting –intuitive if you wish- new thing… which is, as you guessed, the Math Input Panel… Yes, that crappy font is mine… I “drew” that by mouse as I don’t have a tablet pen/pc. You can then paste it directly into word and it’ll recognize it as an editable equation… During my tests, the output panel (the top part) hanged, but I liked that the drawing panel was still responsive and I could still write/erase… till the top one started to respond again… One other thing to know, after you click Insert (that button down there) it copies the equation in MathML [ Wikipedia link ] format.. which is a standard way of representing equations and hence any application that recognizes the format can insert it not as an image but as a nice editable equation… If you think it recognized something wrong, you can click “Sele

What do you do? and how do you do it?

Alsalam alikom wa ra7mat Allah wa barakatoh I've remembered these two questions a couple of minutes ago, they were mentioned in a movie called "The Pursuit of Happyness" and as you see Happyness is written intentionally with 'y' but that's another story! The scene was that the hero who was a depressed poor guy was walking in the street then found a guy parking his very nice & expensive car, he stopped him and asked him "may I as you two questions..." "What do you do? and how do you do it?" Away from the scene and how things went on in the movie, the question that came to me was why don't I ask myself the same questions.. it's not that I'm successful or something but my point is to try to analyze what "were" my goals during my past life... and what did I do to reach the state I am in now -fail/success/progress...- I believe what brought this to my mind is watching -again- Steve Jobs's motivational speech when h

Morocco...Day 4... The Big Day

Alsalam alikom wa ra7mat Allah wa barkatoh It's now Saturday, 7:00am. We waked up fully enthusithied... all wore our T-Shirts, I had problems in choosing what to wear under the T-Shirt cuz they restricted that everybody should show up in T-Shirts.. At last I wore a Black T-Shirt (edooh long) that is originally my sleep-clothes.... I didn't like how I looks but it's ok... I don't care much... the most important thing is to appear in T-Shirts and not to catch cold.... Everybody else did nearly the same.. we were ready to go and BEAT THEM ALL ;) ... Few minutes later, they came to pick us, we arrived on time.. actually before the time :D, the Contest was supposed to start at 10:00am, we were there at about 9:20am, the runners guided us to some green flat place, where every group made a circle and they started to have pics, chats with others and such... Time passes, and it seems they will not start the contest on time... we started to go to each group and pic a photo for th