LuaInterface and 64Bit - c#

Ok i'm currently using LuaScript v5.1 in a Game engine i'm using. and the handy LuaInterface that comes along with it. i've tested it on a range of systems running a range of OS's.
LuaInterface seems to fail on 64bit Operating Systems.
Could anyone point me to a 64bit Compiled LuaInterface.dll, or is there any alternative to the LuaInterface that can be used, because LuaInterface is extremely useful and i dont think i would be able to write a more extensive interface by myself using lua51. (I'm not that good, sadly)
Any help or links would be greatly appreciated.
Thanks alot guys!

You can check out the LuaInterface source code from the Subversion repository hosted on Google Code. It contains Visual Studio project files for building it yourself. Welcome to the world of open-source software!

I just found some links that might help with your problem.
This shows how to modify compiled assemblies to force them to run 32 bit:
http://bchavez.bitarmory.com/archive/2008/04/29/badimageformatexception-errors.aspx
This shows how to compile to target 32 bit:
http://www.atalasoft.com/kb/article.aspx?id=10165
Read this article for a good understanding of 32 and 64 bit managed apps:
http://blogs.msdn.com/joshwil/archive/2004/03/11/88280.aspx
Another good link that talks about 32 vs 64 bit:
http://www.hanselman.com/blog/BackToBasics32bitAnd64bitConfusionAroundX86AndX64AndTheNETFrameworkAndCLR.aspx

You can use KopiLuaInterface. I uses KopiLua, which is written entirely in C# and provides all the well-known interfaces like LuaInterfaces. It even implements the same namespaces as LuaInterface, so you don't have to change anything except your references!
I just migrated my project from LuaInterface to KopiLuaInterface in under 10 minutes without changing a single line of code!
You can find KopiLuaInterface here: https://github.com/gfoot/kopiluainterface/releases
Just remove your LuaInterface and lua51 DLL files from your project and add the 3 DLLs from the KopiLuaInterface release, update your references and you're done.

NLua supports 64 bits and is available via NuGet.
NLua site : http://nlua.org
GitHub: https://github.com/nlua/nlua
NuGet: https://www.nuget.org/packages/NLua/

Related

CLIPS: recent version of CLIPSLib.dll (x64)

Greetings and Salutations,
I am looking to embed CLIPS in a .net application (via C#) and I am using two DLLs; CLIPSNet.dll and CLIPSLib.dll
When I try to run the program, it appears that the CLIPSNet.dll is assimilated successfully, but when it reaches to the CLIPSLib.dll, I get errors complaining about the architecture the DLL was compiled in (x86 instead of the expected x64).
I found several threads from several years ago that usually ended with the suggestion to recompile the source and it will work fine.
I do not have the facilities to recompile the source code myself, and a colleague of mine tried to do it for me and he encountered numerous errors in the source.
If anyone in the community has successfully recompiled the CLIPSLib.dll in the x64 architecture, could I impose upon you to please provide a link to the DLL or please email it to me?
Thank you very much, in advance!
Cheers,
Chief_Ed

Import C++ DLL in C# Servo Motor

I'm trying to make a Servo Motor work with very simple code in C#. The company that built the Servo is called TEKNIC, and the motor that I'm trying to move is the ClearPath-SC-Series.
That company offers a software download called ClearView and contains a lot of sample code to be used in C++, also, they create a DLL file with a ton of Classes, Methods, Codes and so on, that you can use to import into your own code. However, these DLL was built in C++ as well.
Om my C# application I'm trying to use P/Invoke to access that DLL but without success. Can someone please help me? I am using System.Runtime.InteropServices
Here is where I'm calling the DLL
[DllImport("C:\\Program Files(x86)\\Teknic\\ClearView\\sdk\\lib\\win\\Release\\x64\\MNuserDriver20.dll", EntryPoint = "SysManager")]
I'm not sure what would be the next steps
Link for Teknic Software
I'm an applications engineer with Teknic and I came across your post. I know this is a few months late, but I wanted to respond in case you or others still have questions about this.
Teknic now includes C# example projects included in the sdk installed with the ClearView software.
The ClearView software is a free download from Teknic's website(https://www.teknic.com/downloads/). The C # examples are installed to this file location: C:\Program Files (x86)\Teknic\ClearView\sdk\CSharp Examples
These examples were built and tested with Microsoft Visual Studio 2015, which is a free download(https://www.visualstudio.com/vs/older-downloads/). Using other versions of Visual Studio may cause the projects to load incorrectly, so we recommend using the 2015 version.
For any technical questions regarding these examples, please email us at support#teknic.com
Thank you,
Brendan

dll built on vs2005 differently on different machines

I'm building a dll(c# assembly which implements some interfaces) that's called by another app. the dll built on my machine works but the one built on our build machine does not work. I have very little control on that app and can not debug it, I can only see the output of it. Is there any way to check the differences of the dlls? I have used reflector, but it only shows limited info like classes and methods.
I also tried building it on other machines with vs2005, xps can create correctly, server 2008 and win7 can not.
could you guys help me with it? any help would be appreciated. If I was not clear, please let me know.
Thank you!
Since you didn-t tell us the error-symptoms of "does not work" here is my guess formulated as a question:
Does your dll reference other dlls that are installed in global-assembly-cache? do all build machines have the same version of the gac-dll installed?

Debugging C# application that is already built

I have an application I made that I lost the source code for, but the application has worked on my Win 2K computer. Now when moving to a Windows 7 computer it won't start. Probably some dependencies that needs to be solved, but I don't know which. The only error I got is a System.InvalidOperation without further description
Is there any tools(free) that I can use to get more specific information on what goes on
I am not sure how/if you can debug the application, but here is another idea.
There are tool out there called "reflectors", which allow you to look inside the .NET dll or executable.
They basically do the reverse of the compiler convert the dll/exe to source code (Now it won't be exactly the code you wrote, for example some local variables might have changed their names and some things might have been optimized, but the end result is the same, since this reflected code came from the same dll/exe.)
Now you can take the output of this and use it to rebuild and then debug your application.
Here are some ofthese tool:
dotPeek - free
.NET Reflector - not free
I know dotPeek doesn't allow you to debug inside of it, so you have to rebuild your application. The other one seems to be able to do that with its most expensive licence. Good luck!
You can also use Microsoft Debugging Tools for Windows (WinDbg). Here is an article that can help you.
http://www.dependencywalker.com/ will tell you dependencies and missing ones.
Also, you can attach visual studio, or get visual studio to launch a exe in debug mode without the source code.
my first try would be dependency walker just to make sure your not
missing some piece of native code
then I would look to just attempting to attach the program to visual
studio.
My next step would be to use something like reflector to get some
version of source code.
The pro version of regate's reflector let's you debug an existing dll without the sourcecode, costs $ 138 tho.
Ilspy will let you see the source for free, maybe you can figure it out from that.
Rgds Gert-JAn

Anybody else using MonoDevelop?

I'm starting a new project in MonoDevelop, and I want to see how other projects are using it.
I tried searching through SourceForge, code.google.com, etc., but mostly I was just finding things like add ins or something related to MonoDevelop itself.
So is there anyone else using MonoDevelop, especially open source?
Basically, MonoDevelop is designed to function very similar to Visual Studio, including using all the same sln/proj file types. You can take a VS solution, open it in MD, and hit F5 to run it, and vice versa.
Because of this, I don't know that many people are going to write about "how they use MD as part of their project" any more than someone is going to write about how they use Notepad.
Any project that is using sln/proj files on Linux/Mac is likely using MD.
MonoDevelop is multiplatform IDE, especially for Linux. Works with Visual Studio solution and project files (100% both direction compatibility). So you can't find project using it. Any C#/VB.NET project can be developed in MD.
Three years ago me and a friend started work a new mono project and tried to use MonoDevelop for it. However - this was an impossible mission - we got ridden with all kinds of bugs and crashes and in the end I said - go to hell MonoDevelop - I'll use my tried and true Emacs.
To tell you the truth with no features other than formatting and font locking Emacs turned out to be 10 times more productive environment for me. My friend somehow endured using MonoDevelop for the whole run of the project, but afterwards he said he was done with Linux for good if it offered such low quality dev tools.
Times were different back then, I've been following mono's development and monodevelop's as well - they seem to be turning out quite well. I think that the actual cause of your problem - not finding anything - lies in the fact that most Linux devs openly shun Mono as a development platform because of it's Microsoft roots. This is sad - because it's a solid alternative of Java - especially at the desktop applications front(GTK# is seriously cool).
Banshee seems to be using MonoDevelop. Probably most of the prominent mono projects with a GUI use it as well to some extent.
I've found MonoDevelop to be excellent so far. I've only been using it for about a month, but once I got it set-up the way I want it, I wouldn't go back to any other editor or IDE on Linux. It took me a while to figure out how to set the debugger up and configure the editor to how I like it.
It's almost like having Visual C# Express on Linux.
Try searching for MonoTouch projects. Mac + MonoDevelop + .NET iPhone apps.
I just tried compiling my project, 2 problems:
couldn't load Setup projects
couldn't load SQL Server Library projects
There is a way around this of course, just have to consider that not all project types can be built in mono and must design solution the way it doesn't stop you from building what you want.

Categories

Resources