From f45a0fa599217c0e74c63e99299199e888f5ec9d Mon Sep 17 00:00:00 2001 From: Rostislav Lisovy Date: Fri, 25 Feb 2011 23:57:00 +0100 Subject: [PATCH] Compilable version; Example 'test' seems to work properly. --- src/HuLinux-2.4.3/MF624.c | 2 +- src/HuLinux-2.4.3/makefile | 2 +- src/HuLinux-2.4.3/samples/Makefile | 3 +++ src/HuLinux-2.4.3/samples/readme.txt | 1 + src/HuLinux-2.4.3/samples/test.c | 4 ++-- 5 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 src/HuLinux-2.4.3/samples/Makefile create mode 100644 src/HuLinux-2.4.3/samples/readme.txt diff --git a/src/HuLinux-2.4.3/MF624.c b/src/HuLinux-2.4.3/MF624.c index 98fdb0e..bd9bbf0 100644 --- a/src/HuLinux-2.4.3/MF624.c +++ b/src/HuLinux-2.4.3/MF624.c @@ -8,7 +8,7 @@ #if defined(_WIN32) || defined(_WIN64) #include #else -#include +#include #endif #include #include diff --git a/src/HuLinux-2.4.3/makefile b/src/HuLinux-2.4.3/makefile index 5689786..ffa3df8 100644 --- a/src/HuLinux-2.4.3/makefile +++ b/src/HuLinux-2.4.3/makefile @@ -82,7 +82,7 @@ $(TARGET_LIB): $(OBJECTS) $(MAKEFILE_LIST) ar rcs $(TARGET_LIB) $(OBJECTS) $(TARGET_DLL): $(LOBJECTS) $(MAKEFILE_LIST) - gcc -shared $(LOBJECTS) -fvisibilty=hidden -lrt -Wl,-soname,libhudaqlib.so -o $(TARGET_DLL) + gcc -shared $(LOBJECTS) -fvisibilty=hidden -lrt -lm -Wl,-soname,libhudaqlib.so -o $(TARGET_DLL) ln -s -f $(TARGET_DLL) libhudaqlib.so $(OBJDIR) : diff --git a/src/HuLinux-2.4.3/samples/Makefile b/src/HuLinux-2.4.3/samples/Makefile new file mode 100644 index 0000000..4cba1e7 --- /dev/null +++ b/src/HuLinux-2.4.3/samples/Makefile @@ -0,0 +1,3 @@ +all: + gcc test.c -I .. -lhudaqlib -o test + diff --git a/src/HuLinux-2.4.3/samples/readme.txt b/src/HuLinux-2.4.3/samples/readme.txt new file mode 100644 index 0000000..544e236 --- /dev/null +++ b/src/HuLinux-2.4.3/samples/readme.txt @@ -0,0 +1 @@ +Run examples as root diff --git a/src/HuLinux-2.4.3/samples/test.c b/src/HuLinux-2.4.3/samples/test.c index 19d6e2c..da3b171 100644 --- a/src/HuLinux-2.4.3/samples/test.c +++ b/src/HuLinux-2.4.3/samples/test.c @@ -12,8 +12,8 @@ int main(void) // h = HudaqOpenDevice("PCI1753",1,0); // h = HudaqOpenDevice("PCD7004",1,0); - h = HudaqOpenDevice("PCT7303B",1,0); - // h = HudaqOpenDevice("MF614",1,0); + // h = HudaqOpenDevice("PCT7303B",1,0); + h = HudaqOpenDevice("MF614",1,0); if(h==0) { h = HudaqOpenDevice("MF624",1,0); -- 2.39.2