C++ Example Files

Post your C and C++ discussions here
Post Reply
Scribe
Newbie
Posts: 1
Joined: Mon Sep 15, 2008 9:54 am

C++ Example Files

Post by Scribe »

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.

ziko
Advanced User
Advanced User
Posts: 1705
Joined: Fri Dec 01, 2006 10:03 am
Location: St Neots

Post by ziko »

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

kyamon

Re: C++ Example Files

Post by kyamon »

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!

Robin
Advanced User
Advanced User
Posts: 558
Joined: Fri Sep 19, 2008 10:17 am

Re: C++ Example Files

Post by Robin »

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 845 times

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

Re: C++ Example Files

Post by kyamon »

Great! Thanks.

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

Re: C++ Example Files

Post by kyamon »

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

Robin
Advanced User
Advanced User
Posts: 558
Joined: Fri Sep 19, 2008 10:17 am

Re: C++ Example Files

Post by Robin »

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

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

Re: C++ Example Files

Post by kyamon »

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!

greyvvolf
Newbie
Posts: 0
Joined: Mon Sep 19, 2011 1:54 pm

Re: C++ Example Files

Post by greyvvolf »

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.

Hitesh

Re: C++ Example Files

Post by Hitesh »

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,

greyvvolf
Newbie
Posts: 0
Joined: Mon Sep 19, 2011 1:54 pm

Re: C++ Example Files

Post by greyvvolf »

ok, thanks. Application run in BCB in Windows XP ;)

Eminar1101
Newbie
Posts: 0
Joined: Mon Mar 05, 2012 8:12 am

Re: C++ Example Files

Post by Eminar1101 »

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,

Hitesh

Re: C++ Example Files

Post by Hitesh »

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,

Post Reply