Test and Measurement Forum

C++ Example Files

Post your C and C++ discussions here

C++ Example Files

Postby Scribe » Mon Sep 15, 2008 10:00 am

Hi guys,

I need to start coding for the ADC11 however can't find the example source files! The option to install them wont come up in the install. Are they located in a certain folder by default?

Could someone possibly upload the examples or email them to me at ali_lowe@sky.com.

Many thanks.
Scribe
Newbie
 
Posts: 1
Joined: Mon Sep 15, 2008 9:54 am

Postby ziko » Mon Sep 15, 2008 10:26 am

Hi the way the programming examples are installed have changed. They now come in a separate file that you can download. If you go to our software download web page and choose your product from the list you will find the SDK available to download from the list.

Hope this helps.
Ziko

Technical Specialist
ziko
Zen Master
Zen Master
 
Posts: 1705
Joined: Fri Dec 01, 2006 10:03 am
Location: St Neots

Re: C++ Example Files

Postby kyamon » Thu Feb 25, 2010 5:27 pm

Hi

I am trying to start coding for my ps6000 on windows 7. Unfortunately, I have the feeling that I am missing some files - the example code is not here, nor are the required libraries, only the dll's.
Am I doing something wrong? I downloaded the sdk, but that does not change anything.

Any help is appreciated!
kyamon
 

Re: C++ Example Files

Postby Robin » Fri Feb 26, 2010 12:32 pm

Hi

Here is the C example for the 6000. The current SDK release is a bit behind.

Regards

Robin
Attachments
ps6000Api.zip
(14.89 KiB) Downloaded 279 times
Robin
Zen Master
Zen Master
 
Posts: 558
Joined: Fri Sep 19, 2008 10:17 am

Re: C++ Example Files

Postby kyamon » Fri Feb 26, 2010 3:14 pm

Great! Thanks.
kyamon
Newbie
 
Posts: 0
Joined: Thu Feb 25, 2010 5:33 pm

Re: C++ Example Files

Postby kyamon » Fri Feb 26, 2010 3:54 pm

As a matter of fact, it still does not work - I can get it to compile, but it crashes when I try to run it, even though it does not issue any function call.
I am using MINGW - is it possible that the dll does not work with this compiler (on either XP or win7), or am I doing something wrong in the linking/inclusion?

Thanks
kyamon
Newbie
 
Posts: 0
Joined: Thu Feb 25, 2010 5:33 pm

Re: C++ Example Files

Postby Robin » Mon Mar 01, 2010 8:22 am

Hi

It certainly works with Visual Studio.

I don't know anything about MINGW, but I would have expected it to run if it builds successfully.

What happens when you run it? Do you get any error message? Are you running it in the debugger?

Robin
Robin
Zen Master
Zen Master
 
Posts: 558
Joined: Fri Sep 19, 2008 10:17 am

Re: C++ Example Files

Postby kyamon » Thu Mar 04, 2010 4:24 pm

Hi Robin,

I finally managed to open a device - it turned out that the problem had nothing to do with the Pico library, but instead I had two mistakes in my code. One was that the handle of the scope was ill-defined, and the other was QT-related.
The good news is, I guess, that the PS6000 library seems compatible with 64bit W7 and mingw.

Thanks for your help!
kyamon
Newbie
 
Posts: 0
Joined: Thu Feb 25, 2010 5:33 pm

Re: C++ Example Files

Postby greyvvolf » Mon Sep 19, 2011 2:04 pm

hello!
I use Borland Builder C++ and PT-104 (USB). I recompile library .lib but I have a program and I compile but I have a problem with my aplication; I have problem with procedure EncodePointer in library KERNEL32.dll. I know, that is library OS. I use Windows 2000 with SP4 and Borland C++ Builder 5. Is that problem with old system operating or IDE? If I write program in Visual Studio Express 2010 I have e linker error :
Error 1 error LNK1107: invalid or corrupt file: cannot read at 0x21E0

please for help, because I have not idea where is the problem.
greyvvolf
Newbie
 
Posts: 0
Joined: Mon Sep 19, 2011 1:54 pm

Re: C++ Example Files

Postby Hitesh » Mon Sep 19, 2011 3:34 pm

Hi,

If you are building the console application in MS Visual C++ 2010 Express, please ensure the following files are added to your project in the locations specified below:

  • Header files - picoStatus.h & UsbPt104Api.h
  • Resource files - UsbPt104.lib
  • Source files - USBPT104con.c

This should build successfully although you may need to deal with some warnings from the compiler.

Regards,
Hitesh

Technical Specialist
Pico Technology
Hitesh
Site Admin
Site Admin
 
Posts: 2009
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: C++ Example Files

Postby greyvvolf » Tue Sep 20, 2011 9:58 am

ok, thanks. Application run in BCB in Windows XP ;)
greyvvolf
Newbie
 
Posts: 0
Joined: Mon Sep 19, 2011 1:54 pm

Re: C++ Example Files

Postby Eminar1101 » Mon Apr 16, 2012 7:26 pm

Hitesh wrote:Hi,

If you are building the console application in MS Visual C++ 2010 Express, please ensure the following files are added to your project in the locations specified below:

  • Header files - picoStatus.h & UsbPt104Api.h
  • Resource files - UsbPt104.lib
  • Source files - USBPT104con.c

This should build successfully although you may need to deal with some warnings from the compiler.

Regards,



Hi Hitesh,
I am working on the USB DrDAQ SDK and I added the 2 header, library file and the source file but i still get the following 2 errors when I debug the program:

Error 1 error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup MSVCRTD.lib USBDrDAQcon

Error 2 fatal error LNK1120: 1 unresolved externals C:\Users\acer\Documents\Visual Studio 2008\Projects\USBDrDAQcon\Debug\USBDrDAQcon.exe USBDrDAQcon

any idea of whats going wrong?
thank you,
Eminar1101
Newbie
 
Posts: 0
Joined: Mon Mar 05, 2012 8:12 am

Re: C++ Example Files

Postby Hitesh » Tue Apr 17, 2012 11:08 am

Hi Eminar101,

Presumably by the 4 files you mean:

  • picoStatus.h
  • usbDrDaqApi.h
  • USBDrDAQ.lib
  • USBDrDAQcon.c

It looks as though you may have selected the Windows Application option in the Application settings for your project. You will need to ensure that 'Console Application' option is selected.

Also, ensure that you have the latest Microsoft .NET Framework installed on your PC.

Best wishes,
Hitesh

Technical Specialist
Pico Technology
Hitesh
Site Admin
Site Admin
 
Posts: 2009
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire


Return to C and C++

Who is online

Users browsing this forum: No registered users and 0 guests