Jump to content
  • 0

Issues with compiling sample code, having namespace issues


cjanand

Question

Hi,

We use both the USB DAQ and PCI DAQ cards.

Trying to compile the example ULDO01.c in the Visual Studio 2019 IDE.

Seem to be running in to namespace errors like:

Identifier "using" undefined from file cstdint 

Identifier "namespace" undefined from file cstdio

etc.

Suspect that I am having a compiler/linker setup issue.

Could you please indicate a solution?

Thanks,

Anand C J

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Hello,

Unlike the Visual Basic and C# examples, the C examples require you to create a Win32 Console Application project. Create the project so that it is in our folder C:\Users\Public\Documents\Measurement Computing\DAQ\C\Sample32\. In the wizard, uncheck precompiled headers and security lifecycle checks. In the Solution Explorer, right-mouse-click on the project and choose to Add Existing Item. Add the ULDO0.c code file. Also, add the cbw.h, and cbw32.dll from C:\Users\Public\Documents\Measurement Computing\DAQ\C\. The examples use the strcpy function, which is now deemed to be unsafe, so you may get warnings about it when you build the project. However, it shouldn't affect the operation.

Best regards,
John

Link to comment
Share on other sites

  • 0

John,

Pardon me for being a bother. But I certainly don't seem to have divined the way to compile the code. I tried several methods including the suggestions given by you but I run into project configuration issues giving rise to a large list of errors.

I am attaching the zip of the project using Visual Studio COmmunity Edition 2019.

I have also attached the outputs, error and warnings that show up while compiling.

Enlighten me on where exactly I am goofing - I still think it is a slew of project configuration / settings issues.

Thnaks, Anand C J

MccDaqPrj.zip MyBuildOutputs.txt

Link to comment
Share on other sites

  • 0

Hello,

I have attached a simple C program that I created with Visual Studio. It demonstrates how to update the 96 lines on a USB-DIO96H using the cbDOut and cbDBitOut functions. The port direction is first set using cbDConfigPort. Then I use a loop to update each port and another to update each bit one at a time. 

Best regards,
John

VC_2013_USB_DIO96H.zip

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...