Test and Measurement Forum

Problem building the ps4000con example

Having problems ? let us know the details here

Problem building the ps4000con example

Postby jamesi » Thu Mar 02, 2017 1:53 pm

Hi,

I've been trying to build the example program ( ps4000con.vxcproj ) in Visual Studio. However, I have the following build errors which I can't understand why I am receiving.

I see that ps4000Api.h and picoStatus.h are already listed as External Dependencies, and I have also added ps4000.lib to the project as a 'Solution Item'.

I have also added the ps4000.dll in the Debug directory, but presumably this is only required at run-time.

Hope you can help.

James.

1>------ Build started: Project: ps4000con, Configuration: Debug Win32 ------
1>ps4000con.obj : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/OPT:LBR' specification
1>ps4000con.obj : error LNK2019: unresolved external symbol __imp__ps4000OpenUnit@4 referenced in function _main
1>ps4000con.obj : error LNK2019: unresolved external symbol __imp__ps4000GetUnitInfo@20 referenced in function _get_info
1>ps4000con.obj : error LNK2019: unresolved external symbol __imp__ps4000CloseUnit@4 referenced in function _main
1>ps4000con.obj : error LNK2019: unresolved external symbol __imp__ps4000MemorySegments@12 referenced in function _No_Agg_RapidBlockDataHandler
1>ps4000con.obj : error LNK2019: unresolved external symbol __imp__ps4000SetChannel@20 referenced in function _SetDefaults
1>ps4000con.obj : error LNK2019: unresolved external symbol __imp__ps4000SetNoOfCaptures@8 referenced in function _No_Agg_RapidBlockDataHandler
1>ps4000con.obj : error LNK2019: unresolved external symbol __imp__ps4000GetTimebase@28 referenced in function _BlockDataHandler
1>ps4000con.obj : error LNK2019: unresolved external symbol __imp__ps4000SetSigGenArbitrary@68 referenced in function _SetSignalGenerator
1>ps4000con.obj : error LNK2019: unresolved external symbol __imp__ps4000SetSigGenBuiltIn@60 referenced in function _SetSignalGenerator
1>ps4000con.obj : error LNK2019: unresolved external symbol __imp__ps4000SetEts@20 referenced in function _CollectBlockEts
1>ps4000con.obj : error LNK2019: unresolved external symbol __imp__ps4000SetTriggerChannelProperties@20 referenced in function _SetTrigger
1>ps4000con.obj : error LNK2019: unresolved external symbol __imp__ps4000SetTriggerChannelConditions@12 referenced in function _SetTrigger
1>ps4000con.obj : error LNK2019: unresolved external symbol __imp__ps4000SetTriggerChannelDirections@28 referenced in function _SetTrigger
1>ps4000con.obj : error LNK2019: unresolved external symbol __imp__ps4000SetTriggerDelay@8 referenced in function _SetTrigger
1>ps4000con.obj : error LNK2019: unresolved external symbol __imp__ps4000SetPulseWidthQualifier@28 referenced in function _SetTrigger
1>ps4000con.obj : error LNK2019: unresolved external symbol __imp__ps4000SetDataBufferBulk@20 referenced in function _No_Agg_RapidBlockDataHandler
1>ps4000con.obj : error LNK2019: unresolved external symbol __imp__ps4000SetDataBuffers@20 referenced in function _BlockDataHandler
1>ps4000con.obj : error LNK2019: unresolved external symbol __imp__ps4000RunBlock@36 referenced in function _BlockDataHandler
1>ps4000con.obj : error LNK2019: unresolved external symbol __imp__ps4000RunStreaming@32 referenced in function _StreamDataHandler
1>ps4000con.obj : error LNK2019: unresolved external symbol __imp__ps4000GetStreamingLatestValues@12 referenced in function _StreamDataHandler
1>ps4000con.obj : error LNK2019: unresolved external symbol __imp__ps4000GetValues@28 referenced in function _BlockDataHandler
1>ps4000con.obj : error LNK2019: unresolved external symbol __imp__ps4000GetValuesBulk@20 referenced in function _No_Agg_RapidBlockDataHandler
1>ps4000con.obj : error LNK2019: unresolved external symbol __imp__ps4000Stop@4 referenced in function _BlockDataHandler
1>ps4000.lib : warning LNK4272: library machine type 'x64' conflicts with target machine type 'X86'
1>C:\PicoSDK\PS4000\C console\Debug\ps4000con.exe : fatal error LNK1120: 23 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Visual Studio already seems to know about ps4000.lib and has added it in the Linker
Image
jamesi
User
User
 
Posts: 2
Joined: Thu Mar 02, 2017 1:02 pm

Re: Problem building the ps4000con example

Postby Martyn » Fri Mar 03, 2017 5:34 pm

Which version of the SDK are you using?

Are you building for any Cpu? If so try forcing to 32bit or 64bit.
Martyn
Technical Support Manager
Martyn
Site Admin
Site Admin
 
Posts: 2746
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Problem building the ps4000con example

Postby jamesi » Fri Mar 03, 2017 6:05 pm

Thanks for the response, Martyn.
I hope to build both a 32-bit version and a 64-bit version.
I've got Visual Studio running on a 64-bit machine.
Force it with compiler directives?
jamesi
User
User
 
Posts: 2
Joined: Thu Mar 02, 2017 1:02 pm

Re: Problem building the ps4000con example

Postby Martyn » Fri Mar 03, 2017 6:10 pm

If you are using Visual Studio there should be something in the toolbars, by default it usually says "Any CPU" check the drop down options
Martyn
Technical Support Manager
Martyn
Site Admin
Site Admin
 
Posts: 2746
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Problem building the ps4000con example

Postby Martyn » Mon Mar 06, 2017 7:07 am

I have just loaded up the solution from a clean install of the current SDK on our website, and using Visual Studio 2015 have built both 32bit and 64bit versions just by changing the build tools to the latest version for VS2015, which can be found in Project->Properties->Platform Toolset. No need to add any files or dependencies to the solution.
Martyn
Technical Support Manager
Martyn
Site Admin
Site Admin
 
Posts: 2746
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots


Return to Getting Started

Who is online

Users browsing this forum: No registered users and 1 guest