JohnLangford/vowpal_wabbit — pull request #126 by nicknussbaum (2013-05-13 04:24:27+00:00)
Title: fix c interface to the windows vw librar

Fixed vwdll.h so it will work with both c++/c# and c
Added a trivial c_test project
removed an extra. delete from VW_Finish

changes to the library include for C compatibility are;

remove vw.h from the vwdll.h This save a bunch of works unless you need something from the vw.h
if you do need something in c++ include the vw.h directly
you'll have to figure out the c story separately.

change occurences of uint32_t to size_t since it does'nt seem to be recognized.
There's some possibility of overflow.

change the one ref argument in export example to a pointer

eliminate the default do_init=true argument in VW_StartParser. Just add the true explcitly where needed.

Trying to run the cs_test there's a problem with VW_Finish.

It does a VW:Finish which deletes the all pointer
followed by a delete of the all pointer
removing the second delete in VW_Finish fixes the problem and cs_test seems to work in both

Other problems

the wind32 configuration doesn't build because because static lib dumps its output in PlatformShortName (x86) and not PlatformName (Win32) and
static lib looks for it in Win32 and fiddling that didn't help
Since win32 has been taken for the code processor the debug and release files would end up there along with the source if you change everything to use platform shortname
I'd suggest changing everything to use x86 and rename the configuration appropriately and eliminate the Win32 configuration unless there's a need for it I missed
For now I haven't tested for x86/Win32