[sword-devel] Sword C# bindings for Windows
Jon Behrens
jbb at crimsonthread.com
Tue Sep 23 12:35:04 MST 2014
Hi Daniel
It looks like moving the SWDLLEXPORT macro to the other side of the * or **
also works in Linux. The MS C++ compiler throws a syntax error for *
SWDLLEXPORT
but works fine for SWDLLEXPORT *. The Gnu compiler on Linux takes either
one. I've
not looked at the language spec to see who's right.
Similarly, MS C++ throws when trying to call ::clearModInfo. It regards
:: as specifying
the global namespace. Simply renaming the function to clearTheModInfo
removes the
name conflict with the class method and solves that problem.
In addition to adding
SWHANDLE SWDLLEXPORT org_crosswire_sword_SWMgr_newWithPath(const char*)
I've also had to program:
void SWDLLEXPORT org_crosswire_sword_InstallMgr_delete(SWHANDLE
hInstallMgr)
without it, the unit tests of the InstallMgr all die.
I'm still working through the unit tests. InstallMgr now works, the
other two still have
some problems.
So, pending any other changes I need to make in flatapi, the same C++
code seems to
work on both Windows and Linux. Obviously, the C# code does also.
I've applied for membership in the wiki (didn't realize that that is
separate from this
list). Once that comes through and I'm clear to post, I'll add the final
write up.
Be blessed,
Jon
On 9/23/2014 5:30 AM, Daniel Hughes wrote:
> The changes you needed to make the c# bindings themselves need to make
> it back into the codebase.
>
> I'll submit a patch for CallingConvention = CallingConvention.Cdecl,
> this should be set on all the native method calls, not sure why it
> wasn't
>
> I would like to see your project files, regarding the nunit
> references. As per my previous email.
>
> I believe the org_crosswire_sword_SWMgr_newWithPath change already
> exists on the trunk but didn't make it onto the release branch.
>
> I can't comment on changes to the flat api (not a c++ expert) except
> to say that we should be aiming to make it build on linux and windows
> without needing any code changes.
>
> God bless,
> Daniel Hughes
>
>
>
>
> On Tue, Sep 23, 2014 at 8:10 PM, David Haslam <dfhmch at googlemail.com> wrote:
>> Wiki editing....
>>
>> New user account requests are now moderated.
>> Anyone who has been a member for at least 4 days can edit a wiki once they
>> have logged in.
>>
>> See foot of http://crosswire.org/wiki/Main_Page
>>
>> David Haslam
>>
>>
>>
>> --
>> View this message in context: http://sword-dev.350566.n4.nabble.com/OSIS-markup-for-gen-books-and-devotionals-tp4654106p4654187.html
>> Sent from the SWORD Dev mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> sword-devel mailing list: sword-devel at crosswire.org
>> http://www.crosswire.org/mailman/listinfo/sword-devel
>> Instructions to unsubscribe/change your settings at above page
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page
More information about the sword-devel
mailing list