derov

Members
  • Content Count

    4
  • Joined

  • Last visited

About derov

  • Rank
    Newbie

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi attila! 1. It seems to me in sample.h there are problems, for example: sample.h .................................................. #ifdef WIN32 #include "../../inc/dwf.h" #else #include <digilent/waveforms/dwf.h> #endif ............................................. Windows instalation WaveForms v3.2.6 doesn't contain <digilent/waveforms/dwf.h>, but contains <Digilent/WaveFormsSDK/inc/dwf.h> 2. I have compiled WaveFormsSDK examples by Microsoft Visual Studio 2013 on Winx64, by: 2.0. Create "Win 32 Console Application Project". 2.1. While config "Win 32 Application Wizard" --> Application Settings -> Unmark "Precompiled header". 2.2. Delete all default "header & source" files from project. 2.3. Copy "sample.h, dwf.h, analogin_sample.c, dwf.lib (from Digilent/WaveFormsSDK/lib/x64)" to project catalog (may be to ../include, ../lib subcatalogs). 2.4. Add "sample.h, dwf.h, analogin_sample.c" to project. 2.5 Edit "sample.h" ............................................................. #include <stdio.h> #include <stdlib.h> #ifdef WIN32 /* #include "../../inc/dwf.h" */ #include "dwf.h" #else /* #include <digilent/waveforms/dwf.h> */ #include "dwf.h" #endif #ifdef WIN32 #include <windows.h> #define Wait(ts) Sleep((int)(1000*ts)) #else #include <unistd.h> #include <sys/time.h> #define Wait(ts) usleep((int)(1000000*ts)) #endif ............................... 2.6 Project Properties --> In "Configuration Manager" (top, right button) it is necessary to create a configuration "x64" Configuration Manager --> Active solution platform --> New Solution Platform --> Type or selected the new platform --> x64 Active solution platform --> must be x64 2.7. Project Properties --> C\C++ --> General --> Additional Include Directories --> "To add the catalog with: sample.h, dwf.h files" 2.8. Project Properties --> C\C++ --> All Options --> Calling Convention --> "__cdecl (/Gd)" 2.9. Project Properties --> C\C++ --> All Options --> Compile as --> "Compile as C code (/TC)" 2.10. Project Properties --> Linker --> General --> Additional Library Directories --> "To add the catalog with dwf.lib file" 2.11. Project Properties --> Linker --> Input --> Additional Dependencies --> "To add the 'dwf.lib;' string in file list" dig_vs.7z
  2. Hi JColvin!) l compile the project in two variants, with "dwf" and "dwf.lib". But compilation does not work. Sincerely Alex
  3. Hi JColvin! Thanks for the answer. 1. On the one hand: IDE Code::Bloks works correctly. For check, in the example project (analogin_sample.c + dwf.h + sample.h + dwf.lib ). I have changed original files (analogin_sample.c + sample.h + dwf.lib) for own stub files with the same names (simple program + external function in lib). The stub project was compiled well. That is IDE is settings correctly, but the problem remained. 2. On the other hand: in the "Reply to Custom designed Signal with Analog Discovery" post, the same problem has been solved! 3. The list of obj files in library (dwf.lib) (dumpbin.exe /exports dwf.lib >> out) contains the necessary references ............... FDwfDeviceConfigOpen FDwfDeviceEnableSet FDwfDeviceOpen FDwfDeviceReset FDwfDeviceTriggerGet ................. But direct procedure of compilation doesn't work gcc -std=c99 -c analogin_sample.c --> analogin_sample.o gcc analogin_sample.o dwf.lib -o out.exe -> ............ analogin_sample.o:analogin_sample.c:(.text+0x51): undefined reference to `FDwfDeviceOpen' analogin_sample.o:analogin_sample.c:(.text+0x67): undefined reference to `FDwfGetLastErrorMsg' analogin_sample.o:analogin_sample.c:(.text+0xa7): undefined reference to `FDwfAnalogInChannelOffsetSet' analogin_sample.o:analogin_sample.c:(.text+0xc1): undefined reference to `FDwfAnalogInChannelRangeSet' analogin_sample.o:analogin_sample.c:(.text+0xd5): undefined reference to `FDwfAnalogInConfigure' analogin_sample.o:analogin_sample.c:(.text+0x122): undefined reference to `FDwfAnalogInStatus' analogin_sample.o:analogin_sample.c:(.text+0x137): undefined reference to `FDwfAnalogInStatusSample' analogin_sample.o:analogin_sample.c:(.text+0x160): undefined reference to `FDwfDeviceCloseAll' collect2: ld returned 1 exit status Some questions: 1. GNU GCC (mingw) whether is compatible with dwf.lib? 2. What compiler you use? Alex
  4. Hi!) I installed Waveforms2015 on my system (Windows). The "pythone" scripts is working well. When I compile C examples (IDE Code::Blocks 16, GNU GCC compiler), receive a errors: ..................... C:\CODE\digilent\OpenDev\main.c|12|undefined reference to `FDwfDeviceOpen'| C:\CODE\digilent\OpenDev\main.c|13|undefined reference to `FDwfGetLastErrorMsg'| ..................... How to compile the c samples for Analog Discovery on Win? Whether it is necessary for this Microsoft Visual C++? Kind regards, Alex