forum.alglib.net
http://forum.alglib.net/

How to use ALGLIB with C# and Microsoft Visual Studio
http://forum.alglib.net/viewtopic.php?f=2&t=8
Page 1 of 2

Author:  Dylan Williams [ Thu May 20, 2010 3:28 am ]
Post subject:  How to use ALGLIB with C# and Microsoft Visual Studio

Hello,

ALGLIB looks very useful, and I would like to try it out with Microsoft Visual Studio and VB.NET. So I downloaded the C# version, thinking that I would set up a class library in C# that I could easily call from VB.NET. I was confused by the instructions regarding the .bat files. Is there a straight forward way of creating a class library in Microsoft Visual Studio that contains all of the ALGLIB subroutines?

Thank you for making what appears to be great code available to all,

Dylan

Author:  Sergey.Bochkanov [ Thu May 20, 2010 4:18 am ]
Post subject:  Re: How to use ALGLIB with C# and Microsoft Visual Studio

Yes, you just have to add all *.cs files from /src directory to your project. However, there are 101 files in this directory. You may try either to pick what you need from them or to compile assembly by calling "build.bat csc" and to attach it to your project.

Author:  Sergey.Bochkanov [ Thu May 20, 2010 4:20 am ]
Post subject:  Re: How to use ALGLIB with C# and Microsoft Visual Studio

BTW, I am considering making one big alglib.cs from all units, so there will be just one file instead of 100+. Do you think it will be better than current situation?

Author:  Dylan Williams [ Thu May 20, 2010 3:38 pm ]
Post subject:  Re: How to use ALGLIB with C# and Microsoft Visual Studio

Dear Sergey,

I think that the best way to do this is to create a single file in the form of a "class library." This allows other programs in Microsoft Visual Studio to call any of the subroutines in ALGLIB without actually having to load them into the program.

Best regards,

Dylan

Author:  Doug Jenkins [ Sat May 22, 2010 1:11 pm ]
Post subject:  Re: How to use ALGLIB with C# and Microsoft Visual Studio

Dylan - I have just posted on my blog about linking Excel VBA to C++ using Microsoftg Visual Studio, which you might find useful:

http://newtonexcelbach.wordpress.com/20 ... excel-vba/

Author:  barggio [ Fri Jun 18, 2010 8:58 pm ]
Post subject:  Re: How to use ALGLIB with C# and Microsoft Visual Studio

Hi,
I think multiple files are fine. From a user standpoint, you can set up the class project such that when you compile, it produces 1 dll file in which you can refer from other project. I think what you set up now is very useful and easy to locate from the name of the file. It would probably need more documentation if you move everything into one single huge source file. Just my humble opinion.

Author:  Sergey.Bochkanov [ Sun Jun 20, 2010 12:01 pm ]
Post subject:  Re: How to use ALGLIB with C# and Microsoft Visual Studio

Quote:
From a user standpoint, you can set up the class project such that when you compile, it produces 1 dll file in which you can refer from other project.

Making Visual Studio project requires additional manual step in the ALGLIB release creation, so I don't think that I'll add something like that. There are exists tools like CMake which can generate Visual Studio project files. But as far as I know CMake doesn't support C# :(

Quote:
It would probably need more documentation if you move everything into one single huge source file. Just my humble opinion.

Original poster said about precompiled DLL distributed with ALGLIB source files, but I think that idea of one large .cs file has at least one benefit - it is much more easier to add to user's project. From the other side, alglib.cs will be about 3 Mbytes large. Such big file may be hard to debug or just to study.

Author:  Dylan Williams [ Wed Jun 23, 2010 10:53 pm ]
Post subject:  Re: How to use ALGLIB with C# and Microsoft Visual Studio

I still think that a properly set up class library would be easier to use, even if it is large. Especially for those of us that are not expert in how to set these things up ourselves.

Author:  Sergey.Bochkanov [ Thu Jun 24, 2010 11:22 am ]
Post subject:  Re: How to use ALGLIB with C# and Microsoft Visual Studio

Dylan Williams wrote:
I still think that a properly set up class library would be easier to use, even if it is large. Especially for those of us that are not expert in how to set these things up ourselves.

When you talk about class library you mean Visual Studio project shipped with ALGLIB which can be compiled to produce class library?

Author:  skyeyes99_ae [ Sat Oct 22, 2011 1:47 am ]
Post subject:  Re: How to use ALGLIB with C# and Microsoft Visual Studio

I tried to use interpolation file and FFT , with visual studio C# , but I got error says that COMPLEX name space id missing or not defined . How may I solve this ... thanks

Page 1 of 2 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/