Wrecked Games

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're just that awesome.

Pages: [1] 2

Author Topic: OIS for .NET  (Read 5419 times)

raicuandi

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 13
    • View Profile
OIS for .NET
« on: March 12, 2006, 07:16:00 AM »

Hi pjcast!
The .NET framework is becoming more and more popular, not to mention it has becamed an industry standard (most jobs in programming are for C#).
It would be great to have OIS for the .NET framework. Do you have any experience on this domain?

I will try these days to produce a wrapper using SWIG. (though I don't have experience with it...)

OR, have I missed an existing version/wrapper for OIS for the .NET/C#?

Thanks in advance.
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2652
    • View Profile
    • http://www.wreckedgames.com
OIS for .NET
« Reply #1 on: March 12, 2006, 07:57:20 AM »

I have used c# and I like it. The only problem I have with it is the lack of a solid support on Linux - but, I think mono has improved alot since last I looked. And, since MDX is only for Windows, there is probably no easy way to support joysticks with c# on Linux..

So, I like your idea of a wrapper. I have contempplated creating wrappers for .Net and Java bindings, but have not the time. There are Python bindings in oisaddons/python module of cvs (which I have tried and work nicely). Those are generated with Swig, though, I am a Swig noobie, and don't know what changes need to be made for those to work with building a DotNet wrapper. But, if you want to try, I think that would be the place to start - though, those bindings IIRC are LGPL, which if you want the most leaniant type of license (like zlib), you could just create the Swig file yourself - as, OIS is not that big anyway. If you make any progress, or have any questions, please feel free to continue posting in this thread. I would gladly give you an oisaddons module (ie oisaddons/DotNet) if you decide to make these bindings :D As I said, I have limited time to dedicate to .Net ATM.
Logged

raicuandi

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 13
    • View Profile
OIS for .NET
« Reply #2 on: March 12, 2006, 09:46:45 AM »

Ok then, I'll try to do my best.
I'll anounce if I manage something.
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2652
    • View Profile
    • http://www.wreckedgames.com
OIS for .NET
« Reply #3 on: March 12, 2006, 09:49:53 AM »

Definitely keep me informed if you make any progress :D
Logged

raicuandi

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 13
    • View Profile
OIS for .NET
« Reply #4 on: March 12, 2006, 12:09:02 PM »

Oh goody! I'll release a beta very soon. I've been stinking like an elephan't ass  :lol: , so I had to take a bath. I won't finish the beta tonight, so it'll be Monday morning!

Still, I'm confused. You have 2 platforms (Windows and Linux) but only one gets build at a time, right? (the 2 dirs) Oh well, I'll investigate it. I'm sure I'll solve it!
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2652
    • View Profile
    • http://www.wreckedgames.com
OIS for .NET
« Reply #5 on: March 12, 2006, 12:13:34 PM »

Currently there are 3 platforms (Mac OSX is just not finished).

Each platform can build one (or many different version of OIS). But, all you have to wrap is the main OIS API ois/includes. Do not traverse into the platform directories for headers, as the bindings should have the OS nuetral API for easy use :wink:

As far as the name of the lib file to be linked against, you can stick with the ois.lib for the VC release to build the CLR compliant wrapper using Swig. Similiar to Python wrapper only with .Net as target binding language.

For Linux (which you do not really need to worry about if you are only using windows) the linux makefile could bring in libOIS.a.
Logged

raicuandi

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 13
    • View Profile
OIS for .NET
« Reply #6 on: March 12, 2006, 01:08:37 PM »

Hmm.. I can't seem to solve this problem:

Code: [Select]
error LNK2001: unresolved external symbol "public: static unsigned int const OIS::Effect::OIS_INFINITE" (?OIS_INFINITE@Effect@OIS@@2IB)

I AM linking ois.lib, since this is the ONLY error I get. Any ideas? Am I accidently using the old 0.4 version?  :oops:
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2652
    • View Profile
    • http://www.wreckedgames.com
OIS for .NET
« Reply #7 on: March 12, 2006, 02:11:40 PM »

You are not the first person to report this :/

I have not seen this myself... What compiler, OS version, and are you using a Release Download or Cvs ?
Logged

raicuandi

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 13
    • View Profile
OIS for .NET
« Reply #8 on: March 13, 2006, 04:05:33 AM »

Oh drats! There is a problem with my internet connection (seems the whole city is affected!), and since I need to get OIS 0.5, there will be a delay of a couple of days...  :cry:

I'm currently using WindowsXP SP2, and MSVisual Studio 2005 Express, though I'll also install FC5 in a couple of days, I've heard it will be soon released (on 15?)

I remember solving that link issue a couple of weeks ago, but I still need to get 0.5.

I'll keep noticed!
Logged

raicuandi

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 13
    • View Profile
OIS for .NET
« Reply #9 on: March 13, 2006, 04:09:44 AM »

Quote from: "raicuandi"
Hmm.. I can't seem to solve this problem:

Code: [Select]
error LNK2001: unresolved external symbol "public: static unsigned int const OIS::Effect::OIS_INFINITE" (?OIS_INFINITE@Effect@OIS@@2IB)

I AM linking ois.lib, since this is the ONLY error I get. Any ideas? Am I accidently using the old 0.4 version?  :oops:


I think it is because you or the compiler are not exporting that OIS::Effect::OIS_INFINITE (with __decl*** etc.) or it does NOT exist, but other parts of the code are still using it (it might have remained from an older version...).

PS: I'm using a public computer now, I still don't have my internet connection back..

I will be back home tonight. I hope it will be fixed by then.
Logged

raicuandi

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 13
    • View Profile
OIS for .NET
« Reply #10 on: March 13, 2006, 04:10:06 AM »

Quote from: "raicuandi"
Hmm.. I can't seem to solve this problem:

Code: [Select]
error LNK2001: unresolved external symbol "public: static unsigned int const OIS::Effect::OIS_INFINITE" (?OIS_INFINITE@Effect@OIS@@2IB)

I AM linking ois.lib, since this is the ONLY error I get. Any ideas? Am I accidently using the old 0.4 version?  :oops:


I think it is because you or the compiler are not exporting that OIS::Effect::OIS_INFINITE (with __decl*** etc.) or it does NOT exist, but other parts of the code are still using it (it might have remained from an older version...).

PS: I'm using a public computer now, I still don't have my internet connection back..

I will be back home tonight. I hope it will be fixed by then (my internet connection - I mean). (funny coincidence: its Monday 13...  :shock: )
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2652
    • View Profile
    • http://www.wreckedgames.com
OIS for .NET
« Reply #11 on: March 13, 2006, 09:06:13 AM »

The const's are definately defined in the source files (as this works well on linux with gcc) - and VC7.1 with clean checkouts. It could be a problem with the VC8 build files for one. I was in the progress of fixing them up yesterday, but realised my computer was acting very funny. I cannot create a file named FFOgreDemo.exe in the Debug directory.. It seems Windows is not letting me create that file. Then, there is this directory that windows will not let me delete for the life of me.

Anyway, long story short, I have not finished cleaning up, fixing up the VC8 builds. You could try using the VC7.0 build files and importing them into VC8... That might show better results. I will be wiping my hardrives completely clean today, and reinstalling Windows. And, perhaps BSD at the same time.
Logged

raicuandi

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 13
    • View Profile
OIS for .NET
« Reply #12 on: March 14, 2006, 08:09:46 AM »

Good luck to you. I still don't have internet  :cry:
I hope I'll get it back by the end of the week... (forgot to pay my bills, and I'm broke right now...  :cry: )
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2652
    • View Profile
    • http://www.wreckedgames.com
OIS for .NET
« Reply #13 on: March 14, 2006, 08:19:47 AM »

Quote from: "raicuandi"
Good luck to you. I still don't have internet  :cry:
I hope I'll get it back by the end of the week... (forgot to pay my bills, and I'm broke right now...  :cry: )


Ouch. Being without internet in this day and age is like being without.. .well.. it just sucks :wink:
Logged

raicuandi

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 13
    • View Profile
OIS for .NET
« Reply #14 on: March 15, 2006, 05:17:53 AM »

I think I'll get my net connection by the end of this week, in the weekend I hope.

Anyway, the wrapper was almost build, I just had to "brush it up". Set the paths relative, not local etc. Please tell me from now where you would like to have the OISdotNet folder? (so I can set up the propper paths) : inside the OIS folder, on in the same folder where OIS's folder is?
Logged
Pages: [1] 2