I have been doing some experiments using Anton's DLLs.

Using Visual C++ you can use the existing OpenHPI header files and directly 
call the OpenHPI DLLs. You can write GUI or command line programs.

Using Visual C# is a little more challenging. It wants to use managed objects 
and is not happy with the unmanaged DLLs. You can use PInvoke to call the 
unmanaged DLLs from C#, but you need to do a bit of work to marshal (the 
Microsoft definition, not the OpenHPI definition) the unmanaged information 
from the DLLs into managed objects.

For the Microsoft world the best thing to have would be a set of Visual C++ 
wrapper classes that externally worked with managed objects and internally 
worked with the unmanaged DLLs. The C++ wrapper classes could be used with C++ 
or C# applications.

I would be very happy using the normal OpenHPI source, but using a different 
build system to produce the windows DLLs and libs.

-----Original Message-----
From: [email protected] [mailto:[email protected]] 
Sent: Monday, July 19, 2010 4:18 PM
To: [email protected]
Subject: [Openhpi-devel] Windows version of base HPI library - for discussion

Hello!

I'd like to raise a topic about OpenHPI base library for Windows.
Current top of openhpi svn trunk is quite appropriate for this.
Created feature request #3031797.

Let's discuss the code model and distribution options:
- separate source tree or single?
- separate build system or single?
- what compilers use?
- distribute source code?
- distribute binary libraries?
- make native windows build or use cross-compiler?
- make build on SourceForge side?

The current status of my investigations:
- There is base library libopenhpi
- It depends on aux libraries:
-- libopenhpiutils (various helper functions)
-- libopenhpimarshal (marshalling layer)
-- libopenhpitranspirt (transport layer, TCP)
All libraries depend on glib-2.0 library which is available on Windows
under LGPL.

I used the following options:

- native mingw - ok, small code changes need only in two source files in
libopenhpiutils

- cross mingw on linux host - ditto
- visual studio 2005 - ok but code changes are quite big. microsoft
compilers still do not support C99.

However, DLLs produced with mingw are usable with visual studio.

For mingw I have to create a set of makefiles. Different from current build
system. I guess there is no need for configure, automake, autoconf hell
for this task.

I tried hpitop client and hpibrowser on windows - all was fine.

   Anton Pak


------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Openhpi-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openhpi-devel

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Openhpi-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openhpi-devel

Reply via email to