[Liblas-devel] Building .NET bindings

Mateusz Łoskot mateusz at loskot.net
Thu Oct 9 06:05:55 EDT 2008


Martin Vales pisze:
> 2008/10/8 Mateusz Łoskot <mateusz at loskot.net>
>>
>> I can't find any instructions on the Wiki or README file in the source tree
>> about how to build .NET bindings.
> 
> Yes you are right. I need ad support for build the bindings.

Configuration for NMAKE and ./configure is needed but that can be done 
later. First, users need to have step by step instructions about how to 
build the bindings.

>> Could you please give me the list of steps needed to build .NET
>> bindings using Visual Studio 2005/2008 ?
> 
> sure. This bindings are build acording most engineering apps in .NET.
> 
> In .NET people can create solutions. 
 > [...]

Yes, I perfectly understand how to create and manage Visual Studio 
projects for .NET etc. I do it quite often.

What I'm asking is the list of steps specific to .NET bindings for 
libLAS. Here is information users will need:

1. What system and software is required to build .NET bindings
2. What solution/project open in Visual Studio
3. In what step to build native DLLs of libLAS and which API, C or C++
3.1. Does user need to build libLAS DLLs using NMAKE or using VS 
solution file from build/msvc80
4. If there is a need to change any properties of VS solution/project,
which one to change.
5. How to build and run tests
6. ...

In other words, users expect to see sth like this:

0. You need to have VS2005 or VS2008 + ...

1. Build libLAS DLL using NMAKE:
nmake /f makefile.vc

2. Open trunk/csharp/dotnetliblas.sln solution in Visual Studio

3. Go to properties of project X

4. Change settings Y in properties of project X to value Z

5. Build the solution

6. ...


> .NET project have references. Hello world app have liblasdotnet like
> reference. NUNIT test have NUnit and libladotnet like references.
 > [...]

Users should also be told what min version of NUNIT to install and where 
they can find NUNIT (a website)


> Here MSBuild help i a lot i think.
> http://www.monodevelop.com/Release_notes_for_MonoDevelop_2.0_Alpha_1#MSBuild_File_format
> MSBuild is like NMAKE but for .NET.
> Now MSBuild is the default build system for visual studio and monodevelop.
 > [...]

Sure, I know the msbuild quite well.

> Now the problems come.
> 
> Usually in .NET references are add magically to the projects. but native
> libraries not. This is not a common problem because
> if you call to the winapi for example you know that libraries in the system,
> but liblas.dll not.
> Therefore i think osgeo need choose a path in windows for all DLLs.
 > [...]

This is why we are lobbying for OSGeo4W - well-known standarized path: 
C:\OSGeo4\bin
C:\OSGeo4\lib
C:\OSGeo4\include

> In my case by now  i copy the liblas.DLL to all folders by hand. Perhaps we
> have some option in visual studio for that, but i don´t find it by now.

Why not to use Visual Studio Property Sheet (.vsprops) and specify 
LIBLAS_BIN_PATH there as macro.
libLAS DLL can be copied automatically using Post-Build Event configured 
in VS project.

>> To summarize, I have Windows XP + Visual Studio 2005 Pro (both VC++ and VC#
>> compilers installed). What should I do to build the .NET bindings?
> 
> The solution is for the  Visual Studio 2005 xpress and therefore i hope
> works for you.

Yes, it does.

>> Could you help me?
> 
> 
> I hope had help you a little. My spanglish really sucks.

It is helpful but we need to prepare short clear and understandible 
instructions for users. No worries about english.

So, my suggestion is to prepare file trunk/csharp/README.txt and let's 
master the instructions in there.
Next, we can copy them to the Wiki.

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net
Charter Member of OSGeo, http://osgeo.org



More information about the Liblas-devel mailing list