Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/vowpal_wabbit.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/c_test
diff options
context:
space:
mode:
authorVladimir Vladimirov <vladimir.vladimirov@magnetic.com>2014-09-09 16:30:38 +0400
committerVladimir Vladimirov <smartkiwi@gmail.com>2014-09-09 17:35:23 +0400
commit02d5f38f84db91dccce5f4e1380c574e6f09aa64 (patch)
tree0369751c7ce8ff5fb3893db48219db56d1494163 /c_test
parent169fdef4c08471e020e400e2229d961d3d17303e (diff)
gcc compatible vwdll.cpp and vwdll.h
Diffstat (limited to 'c_test')
-rw-r--r--c_test/sample.c4
-rw-r--r--c_test/sample_gcc.c34
2 files changed, 4 insertions, 34 deletions
diff --git a/c_test/sample.c b/c_test/sample.c
index d2bec3ba..17e1618f 100644
--- a/c_test/sample.c
+++ b/c_test/sample.c
@@ -1,5 +1,9 @@
#include <stdio.h>
+/*
+To compule with gcc use this command
+LD_LIBRARY_PATH=../vowpalwabbit/.libs ; gcc sample_gcc.c -I./../vowpalwabbit/ -L./../vowpalwabbit/.libs -lvw -lvw_c_wrapper -lallreduce -o sample_gcc
+*/
typedef short char16_t;
diff --git a/c_test/sample_gcc.c b/c_test/sample_gcc.c
deleted file mode 100644
index b8328409..00000000
--- a/c_test/sample_gcc.c
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <stdio.h>
-
-/*
-compile me with
-LD_LIBRARY_PATH=../vowpalwabbit/.libs ; gcc sample_gcc.c -I./../vowpalwabbit/ -L./../vowpalwabbit/.libs -lvw -lvw_c_wrapper -lallreduce -o sample_gcc
-*/
-
-
-typedef short char16_t;
-
-
-#define bool int
-#define true (1)
-#define false (0)
-
-#include "vwdll2.h"
-
-
-
-int main()
-{
- VW_HANDLE vw;
- VW_EXAMPLE example;
- float score;
-
- printf("this is a native c program calling vw\n");
- vw = VW_InitializeA("-q st --noconstant --quiet");
- example = VW_ReadExampleA(vw, "1 |s p^the_man w^the w^man |t p^un_homme w^un w^homme");
- score = VW_Learn(vw, example);
- VW_Finish(vw);
- printf("Score = %f\n", score);
- return 0;
-
-} \ No newline at end of file