Jump to content
  • 0

Visual Studio SDK 32 vs 64 bit C project, and "readme.txt" errors


gcb

Question

I just downloaded and installed the WaveForms program, including the SDK.

The 'WaveFormsSDK/samples/c/readme.txt' file has instructions for creating a Visual Studio project using the SDK.  But these instructions are confusing. I need some clarification.

* It only references Visual Studio 2013. I assume that newer versions of VS are OK to use? I am using VS 2022.

* It says to create a new project via "File/New Project/Win32 Console Application...". Do I have to use 32 bit, or can I use 64 bit? 

* The statement in the file " - Copy C:\Program Files (x86)\Digilent\WaveFormsSDK\lib\x86\dwf.lib (or from x64 for 64bit application) to your project folder." certainly seems to imply that a 32 or 64 application is acceptable, as long as you copy the appropriate "dwf.lib" to the project.

* I created it as a new 64 bit console project, but it crapped out compiling it because the 'sample.h' file did not have an 'ifdef' case for _WIN64. So I added a case for this and then one of the sample programs would compile and run. 

* The statement "- Add Existing Items/ device_enumeration.cpp, samples.h, dwf.h" should read "- Add Existing Items/ device_enumeration.cpp, sample.h, dwf.h".

* The statement "  - Add Existing Items/ device_enumeration.cpp, samples.h, dwf.h" refers to a file "dwf.h" that you never mentioned needed to be copied to the project directory. You should have mentioned this needed to be copied, and where to get it from. I figured it out.

* There is also an 'if defined(WIN32)' statement in "dwf.h" file. It seemed to work even without changing this.

So bottom line - is a 64 application supported, or should I just stick with 32 bit? I prefer the speed of the 64 bit version, but I guess either is OK.

 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Hi @gcb

The instructions are the same or similar for newer VS versions.
You can build app for x86, x64, arm64 or arm64ec, just use the corresponding dwf.lib dependency under project/Properties/Linker/Input

image.png

image.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...