2205A Example on CodeBlocks

Post your C and C++ discussions here
Post Reply
searchresults
Newbie
Posts: 0
Joined: Thu Oct 06, 2011 7:48 pm

2205A Example on CodeBlocks

Post by searchresults »

Hi all,
I am trying to get an example program running for the 2205A on CodeBlocks.

As I understand it, there is no C++ example for the 2205A, only a C example. I am completely inexperienced in these matters; so, I don't actually know if the difference between C & C++ is trivial or not.

Can anyone offer help getting a C or C++ example for the 2205A running?

thanks!
Charlie

Martyn
Site Admin
Site Admin
Posts: 4491
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: 2205A Example on CodeBlocks

Post by Martyn »

I am not familiar with CodeBlocks as an IDE, I use Microsoft Visual C++ 2010 Express Edition for which the process is
  • Create an empty Windows Console Application
  • Copy "PS2000con.c", "ps2000.h", and "PS2000.lib" to the project folder
  • Add these existing items to the project
  • Build and Run
Martyn
Technical Support Manager

searchresults
Newbie
Posts: 0
Joined: Thu Oct 06, 2011 7:48 pm

Re: 2205A Example on CodeBlocks

Post by searchresults »

Hi Martyn,
Thanks for the help!

I think I did what you suggested, but I still get a bug:
I did the following:
- Installed Microsoft Visual C++ 2010 Express Edition
- Created a new empty console application
- Copied the three files into the project folder
- Placed them into their respective folders in VC++ (PS2000.h -> Header Files, PS2000.lib -> Resource Files, and PS2000con.c -> Source Files.)

The code will successfully build but, when I try to run it I get the following error:

"This application has failed to start because ps2000.dll was not found. Re-installing the application may fix the problem."

I'm not sure what they mean by re-installing the application. I tried putting ps2000.dll in the project file, but that didn't work either.

I have the Picoscope 2205A plugged in and have checked it with PicoScope 6.

Thanks!

searchresults
Newbie
Posts: 0
Joined: Thu Oct 06, 2011 7:48 pm

Re: 2205A Example on CodeBlocks

Post by searchresults »

Hi Martyn,
I was able to get the example going; thanks again for the help.

I followed your instructions but got an error saying it couldn't locate PS2000.dll. I copied this file to the "WINDOWS/system32" folder and it worked perfectly.

(I'm mentioning this for anyone else who comes across the same problem)

natnat
Newbie
Posts: 0
Joined: Mon Jun 25, 2018 9:16 pm

Re: 2205A Example on CodeBlocks

Post by natnat »

In 2018, your solution of adding the DLL file to Windows/system32 still works! The usual advice of adding linkers and such did not work for me, so thanks for your solution.

Post Reply