Tried simple test app in VS2008. It worked.
What I did is:
1) Downloaded openhpi-3.0.0 libraries for win32 and unpacked it
2) Run VS2008 and created new Win32 console project
3) Added "#include <SaHpi.h>" into stdafx.h
4) Added the following code into main function:
SaErrorT rv;
SaHpiSessionIdT sid;
rv = saHpiSessionOpen( SAHPI_UNSPECIFIED_DOMAIN_ID, &sid, 0 );
printf( "XXX %d %u\n" , rv, sid );
5) In project properties:
- C/C++ -> Additional Include Directories
-- Added directory where OpenHPI was unpacked (shall contain SaHpi.h)
- Linker -> General -> Additional Library Directories
-- Added directory where OpenHPI was unpacked (shall contain OpenHPI .dll
and .a files)
- Linker -> Input -> Additional Dependencies
-- Added "libopenhpi.a"
- Configuration Properties -> Debugging -> Environment
-- added "OPENHPI_DAEMON_HOST=192.168.1.254"
6) Compiled the project
7) Put required dll files into Debug/Release directory where compiled exe
was
8) Run the compiled exe
Looks like VS understands .a files and there is no need to produce .lib
files.
Anton Pak
On Mon, 09 Jan 2012 19:40:34 +0300, Thompson, Michael
<[email protected]> wrote:
> My notes from building Visual C++ clients:
>
> Added:
> C:\Program Files\OpenHPI\include;
> C:\Program Files\OpenHPI\glib-2.0\lib\glib-2.0\include;
> C:\Program Files\OpenHPI\glib-2.0\include\glib-2.0
> to Configuration Properties->VC++ Directories->Additional Include
> Directories.
>
> Added:
> libopenhpi.lib;
> libopenhpiutils.lib;
> glib-2.0.lib
> to Configuration Properties->Linker->Input->Additional
> Dependancies.
>
> Added:
> C:\Program Files\OpenHPI\lib;
> C:\Program Files\OpenHPI\glib-2.0\lib
> to Configuration Properties->Linker->Input->Additional Library
> Directories
>
> #include <glib.h> needs to be at the end of the list of includes or you
> will get linker errors.
>
> The file locations will depend on where you put the OpenHPI libraries
> and include files.
> ________________________________
> From: kevin barnard [mailto:[email protected]]
> Sent: Monday, January 09, 2012 11:25 AM
> To: [email protected]
> Subject: [Openhpi-devel] HPI browser and visual studio
>
> Hi !
>
> I have ran the windows openhpid with the test agent and hpitree under
> windows. All good
>
> However, after running lib to generate the two .lib files
>
> libopenhpi.lib
> libopenhpiutils.lib
>
> which I thought would enable me to compile the hpi browser under visual
> studio, getting linker errors eg
>
> saHpiSessionClose
>
> though I have added the two .lib files to the visual studio project
>
> Does anyone have a step by step guide to compiling hpi browser under
> visual studio ( 2008 express edition in my case ) ?
>
> Also is there a forum for this sort of question ?
>
> regards
> kevin
------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
Openhpi-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openhpi-devel