Staredit Network

Staredit Network -> Modding Assistance -> StormLib SWIG Export
Report, edit, etc...Posted by toxik on 2006-08-08 at 07:19:01
Hiya, I've been here for a few weeks.
I'm a programmer, and with an obssesive lust to create.

My target is a map editor in Python; I have the wxPython (GUI) skills to do it, but Python is lacking a way to read/write MPQ archives, naturally.

Now, Python has the fine ability to talk to C/++ libraries through a Python API, and the SWIG project further enables you to port C/++ libraries to Python modules. All right I thought, this is after all how wxWidgets gets ported to Python, so I started to read about SWIG.

Now, I'm trying to just create a base interface to try it out, and it seems to be as if there is a problem with the interepreting of StormLib.h!

What I'm trying:
CODE
D:\Program\swigwin-1.3.29>swig.exe -c++ -python -o C:\piss.cpp "C:\Documents and Settings\toxik\Mina dokument\Visual Studio 2005\Projects\StormLib\StormLib.i"

The error:
CODE
C:\Documents and Settings\toxik\Mina dokument\Visual Studio 2005\Projects\StormLib\StormLib.h(361): Error: Syntax error in input(1).

The Interface file (StormLib.i):
CODE
%module StormLib
%{
#include "StormLib.h"
%}

%include "StormLib.h"


It isn't the input command to swig.exe that are wrong, I tried with a simple interface and it worked just fine - it's something with StormLib.h that's not working!
It's impossible that it's line 361, because that's an empty line, and commenting the line above it out doesn't change the number or anything.

Would be really cool if I could implement a Python OO library out of StormLib, since that's procedural (even tho it's C++, never got that part)
Report, edit, etc...Posted by Alkemist on 2006-08-08 at 08:17:42
rofl. im only posting this because its 5 am and if theres nothing else to do id be forced to sleep:
i doubt anyone's going to be able to help you out there considering this is after all sen and jeesh well what the hell do i know. if no one gives ya any help you should probably try the vL forums, theyre a lot more knowledgable on coding. campaigncreations might help. link to vl website is http://www.valhallalegends.com/, good luck on your pythoning, and jesus christ, whats up with this retarded sen hacking?
Report, edit, etc...Posted by BroodKiller on 2006-08-08 at 09:00:19
I'm not any much into Python, but maybe instead of StormLib you would consider using SFMPQAPI? You can find it
here
Next Page (1)