problems using drivers with MinGW

Post general discussions on using our drivers to write your own software here
Post Reply
nbaxter
Newbie
Posts: 0
Joined: Fri Jan 21, 2011 5:16 pm

problems using drivers with MinGW

Post by nbaxter »

hello everyone,
i was just trying to compile the example file ps2000con.c from the pico dvk with the mingw shell but it didn't work.
i tried to follow the steps in the install notes(given at the beginning of the ps2000con.c file) for building the application under windows.
my question is, if anybody uses mingw and msys with the pico dvk and can help me to set up my system.
thanks a lot

Chris
Site Admin
Site Admin
Posts: 169
Joined: Tue Aug 17, 2010 9:00 am
Location: St. Neots

Re: problems using drivers with MinGW

Post by Chris »

Not got any experience of using this compiler, but if you're having trouble getting it to work by creating an empty project, and importing the files from the SDK, would suggest creating a new 'Hello World' type project, then start by trying to use the ps2000_open_unit & ps2000_close_unit functions, by comparing the code in the sdk example with the information in the ps2000 programmers guide, then building up your application from there.

nbaxter
Newbie
Posts: 0
Joined: Fri Jan 21, 2011 5:16 pm

Re: problems using drivers with MinGW

Post by nbaxter »

thank you for your reply. i stopped my efforts to work with the mingw environment. i think i will use the windows compiler with visual studio when i've got a little more time...

svebert

Re: problems using drivers with MinGW

Post by svebert »

I used MinGW for ps4000 and it works for me.
I had to deleted all #ifdef things for linux and than i compiled like
gcc test.c -lps4000 -oPS4000con

There were also some headers i had to delete in the code.
The main thing is that you have to compile with MinGW like under linux but you have to swap the c-File with the lib-File in the command line.

Post Reply