Utilization Questions

May 14, 2009 at 1:20 PM

Hi, I know I am sounding like a dunce, but can anyone give me insight how to strap this library to a Visual C++ project? I see that there is not a .lib or a .tlb file with the project, the source code is C# and there is a .dll. I am using Visual Studio 2005 Visual C++. Any insight would be most appreciated!

Thanks

Christopher DelGross

Coordinator
May 14, 2009 at 6:01 PM

You can use C++/CLI to talk to managed code from Visual C++.  There should be alot of search hits for using a managed binary from Visual C++.  I'm curious, why is C++ a requirement for you?

Coordinator
May 14, 2009 at 6:21 PM

I should also add that you should probably target VS2008.  LinqToStdf leverages features of .NET Framework 3.5 (Linq, etc).  You can probably make it work with C++ in VS2005, but you're really making more work for yourself.

May 15, 2009 at 12:28 PM
Strapping this to a CLR project does the trick for me actually!
Thanks!


From: marklio [mailto:notifications@codeplex.com]
Sent: Thursday, May 14, 2009 2:24 PM
To: DelGross, Christopher
Subject: Re: Utilization Questions [LinqToStdf:56301]

From: marklio

I should also add that you should probably target VS2008. LinqToStdf leverages features of .NET Framework 3.5 (Linq, etc). You can probably make it work with C++ in VS2005, but you're really making more work for yourself.

Coordinator
May 15, 2009 at 4:21 PM

Great.  Things have been busy lately and we haven't progressed much.  The available library is pretty solid for common scenarios.  Let us know if you encounter problems or perf issues.

May 28, 2009 at 11:54 AM
I have not actually been able to get this rolling. Do you happen to have any implemetation examples in Visual C++.
Right now I have a CLR console application to put the library through its paces (actually it is me who is getting put through the paces here). I am using the library as a managed binary.
Thanks
Chris


From: marklio [mailto:notifications@codeplex.com]
Sent: Friday, May 15, 2009 12:23 PM
To: DelGross, Christopher
Subject: Re: Utilization Questions [LinqToStdf:56301]

From: marklio

Great. Things have been busy lately and we haven't progressed much. The available library is pretty solid for common scenarios. Let us know if you encounter problems or perf issues.

May 28, 2009 at 12:03 PM
Actually, even if it is in C# I can at least see a implementation example to get me moving...
Thanks


From: cjdelgross [mailto:notifications@codeplex.com]
Sent: Thursday, May 28, 2009 7:55 AM
To: DelGross, Christopher
Subject: Re: Utilization Questions [LinqToStdf:56301]

From: cjdelgross

I have not actually been able to get this rolling. Do you happen to have any implemetation examples in Visual C++.
Right now I have a CLR console application to put the library through its paces (actually it is me who is getting put through the paces here). I am using the library as a managed binary.
Thanks
Chris


From: marklio [mailto:notifications@codeplex.com]
Sent: Friday, May 15, 2009 12:23 PM
To: DelGross, Christopher
Subject: Re: Utilization Questions [LinqToStdf:56301]

From: marklio

Great. Things have been busy lately and we haven't progressed much. The available library is pretty solid for common scenarios. Let us know if you encounter problems or perf issues.

Coordinator
May 28, 2009 at 4:51 PM

You can see C# examples in the wiki: http://linqtostdf.codeplex.com/Wiki/View.aspx?title=Example%20Usage

Let me know if you have questions on those.

I'm really going to recommend you not try to leverage the library from C++.  The library was designed to leverage the LINQ syntax, which isn't available in C++/CLI, so you'd have to use the regular method calls, and many of these are implemented as extension methods (another feature that C++/CLI doesn't have) so you'd have to call those by hand as static methods.

If calling from C++ is a requirement, I would take the operations that you need and write a C# library that does them and returns the result.  Then, you can call those "wrapper" functions from C++ and get the results without having to write the queries in C++.

May 28, 2009 at 4:56 PM
I can write something in C# (I really have limited to exposure to C#).
Thanks for the link to the wiki!


From: marklio [mailto:notifications@codeplex.com]
Sent: Thursday, May 28, 2009 12:52 PM
To: DelGross, Christopher
Subject: Re: Utilization Questions [LinqToStdf:56301]

From: marklio

You can see C# examples in the wiki: http://linqtostdf.codeplex.com/Wiki/View.aspx?title=Example%20Usage

Let me know if you have questions on those.

I'm really going to recommend you not try to leverage the library from C++. The library was designed to leverage the LINQ syntax, which isn't available in C++/CLI, so you'd have to use the regular method calls, and many of these are implemented as extension methods (another feature that C++/CLI doesn't have) so you'd have to call those by hand as static methods.

If calling from C++ is a requirement, I would take the operations that you need and write a C# library that does them and returns the result. Then, you can call those "wrapper" functions from C++ and get the results without having to write the queries in C++.

Dec 7, 2009 at 7:43 PM

Hi, it's me again. I have spent the last few months working on some projects on C# and I am really ready to utilize your library. The only problem that I am having is that LINQ is not supported in VS2005 as far as I can tell, so I cannot begin.  Any tips on how to proceed? Upgrading to VS2008 is out of the question. I would rather utilize your library then reinvent the wheel and create a entire parser from scratch.

Thanks again,

Chris

Dec 10, 2009 at 1:19 PM
Edited Dec 10, 2009 at 1:19 PM

Hi Mark..

 

I have since thrown in the towel and decided to download the VS2008 Express Edition to get something done. Thanks!

Any implementation help would be appreciated!

 

Coordinator
Dec 10, 2009 at 6:08 PM

I am curious why upgrading to VS2008 is out of the question.  LinqToStdf was written to depend on Linq and other feature present in .NET 3.5, it isn't usable from previous framework versions.  The language features that it is intended to leverage are not available in the compilers provided with VS2005, so it would be very difficult to use there.

If you really are stuck in 2005, and you don't want to write your own parser, the core parsing capabilities of LinqToStdf could still be leveraged with a bit of factoring.  I highly recommend simply using the new tools in VS2008 (or express as you have discovered, or even good ol' notepad) as the library was intended.

Mark

Dec 10, 2009 at 6:13 PM
Edited Dec 10, 2009 at 7:01 PM

Thanks again! It seems eveything is coming up roses now.

 I am off and running....

Thanks

Chris

Dec 10, 2009 at 7:24 PM

Upgrading is out of the question due to the lack of enthusiasm to purchase software here where I work.  Especially since this is a “rouge” project I am working on.

From: marklio [mailto:notifications@codeplex.com]
Sent: Thursday, December 10, 2009 3:20 PM
To: DelGross, Christopher
Subject: Re: Utilization Questions [LinqToStdf:56301]

From: marklio

I am curious why upgrading to VS2008 is out of the question. LinqToStdf was written to depend on Linq and other feature present in .NET 3.5, it isn't usable from previous framework versions. The language features that it is intended to leverage are not available in the compilers provided with VS2005, so it would be very difficult to use there.

If you really are stuck in 2005, and you don't want to write your own parser, the core parsing capabilities of LinqToStdf could still be leveraged with a bit of factoring. I highly recommend simply using the new tools in VS2008 (or express as you have discovered, or even good ol' notepad) as the library was intended.

Mark

Read the full discussion online.

To add a post to this discussion, reply to this email (LinqToStdf@discussions.codeplex.com)

To start a new discussion for this project, email LinqToStdf@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com

Coordinator
Dec 10, 2009 at 10:22 PM

I see.  I can totally sympathize with your situation, as I was in a similar predicament in a previous job, where I did development for years with a simple text editor and command line build environment.  As you've no doubt discovered, the free express versions are quite good, and should be more than sufficient to build apps with this library.

Dec 11, 2009 at 12:29 PM

Thanks Mark, I guess I should then consider myself fortunate as I have never developed in the dreaded text editor and command line environment!

Maybe you can also help me with a query here:

                var results = from prr in stdf.GetRecords().OfExactType<Prr>()

                              from ptr in prr.GetChildRecords().OfExactType<Ptr>()

                              let result = ptr.Result

                              where result != null

                              select new { testNumber = ptr.TestNumber,

                                           testHead = ptr.HeadNumber,

                                           testSite = ptr.SiteNumber,

                                           testText = ptr.TestText,         

                                           testResult = ptr.Result,

                                           testUnits = ptr.Units,

                                           lolimit = ptr.LowLimit,

                                           hilimit = ptr.HighLimit };

I am using this to return test results. What I am trying to do is return them by PartID, in a SQL query, I would simply group by partid, but that does not seem to work in this case. Could you give me some insight as to how to do this with LINQ?

Thanks for all your help..

Chris

From: marklio [mailto:notifications@codeplex.com]
Sent: Thursday, December 10, 2009 6:23 PM
To: DelGross, Christopher
Subject: Re: Utilization Questions [LinqToStdf:56301]

From: marklio

I see. I can totally sympathize with your situation, as I was in a similar predicament in a previous job, where I did development for years with a simple text editor and command line build environment. As you've no doubt discovered, the free express versions are quite good, and should be more than sufficient to build apps with this library.

Read the full discussion online.

To add a post to this discussion, reply to this email (LinqToStdf@discussions.codeplex.com)

To start a new discussion for this project, email LinqToStdf@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com