micro-manager / mmCoreAndDevices

Micro-Manager's device control layer, written in C++
37 stars 101 forks source link

NIDAQ adapter: blanking property missing #464

Open dpshepherd opened 1 month ago

dpshepherd commented 1 month ago

Hi @nicost -

We are testing the new NIDAQ adapter, it is very nice! We are able to setup our digital output port0, control light switches, and it appears that the sequencing is working based on our oscilloscope. However, there aren't any "blanking" associated properties in the device property browser available when we add the device. It is clear from the digital output that the excitation is not being controlled by the "EXPOSURE OUT" signal from the camera. The NIDAQ webpage mentions it, so I'm hoping it is available and we just need to set up our .cfg file differently.

We are using a USB-6341, X-Series. What else can we provide to help troubleshoot?

Thanks!!

tlambert03 commented 1 month ago

pinging @linshaova, since he just this week has also been struggling with this

nicost commented 3 weeks ago

The easiest explanation would have been that your card does not support ChangeDetection, but it looks like it does. Can you generate a Trouble Report (Help > Report a Problem), in which you (re-) load the config file?

The NIDAQ adapter generate the Blanking properties only when the call to hub.StartDOBlankingAndOrSequence() succeeds. That function has some logging output, but it will only appear in debug mode. Hopefully this will shed some light on the issue, but it may be very difficult to fix without access to the hardware (and avoid breaking support for other hardware in the interim).

dpshepherd commented 3 weeks ago

I can confirm that this model supports ChangeDetection, as we use that property in our own python DAQ control class to control both digital and analog waveform playback.

I'll ask the team to generate the logs.

dpshepherd commented 3 weeks ago

Here is the report. nidaq_problem_report.txt

linshaova commented 3 weeks ago

pinging @linshaova, since he just this week has also been struggling with this

(probably unrelated to the current topic, but wanted to express my gratitude...) Thanks for the ping @tlambert03 ! I didn't know about the TriggerInputPin property of the digital I/O device (while playing with DAQmx in Labview or Python, I found AO and DO tasks can be programmed to share the same PFI as trigger input, hence I had assumed the same for the NIDAQ adapter in uManager). After I connected the PFI trigger to TriggerInputPin (which is p0.31 on my device), I saw the digital sequence being correctly executed. Also blanking works as advertised if I enable it by mmc.setProperty('NIDAQDO-Dev1/port0', 'Blanking', 'On').

nicost commented 3 weeks ago

Here is the key to the problem:

2024-06-10T10:11:39.461152 tid21440 [dbg,dev:NIDAQHub] Created DI task
2024-06-10T10:11:39.466330 tid21440 [dbg,dev:NIDAQHub] Starting on-demand task
2024-06-10T10:11:39.466401 tid21440 [dbg,dev:NIDAQHub] Created task
2024-06-10T10:11:39.467145 tid21440 [dbg,dev:NIDAQHub] Created DO channel
2024-06-10T10:11:39.472429 tid21440 [dbg,dev:NIDAQHub] Wrote Digital out with task autostart: 0
2024-06-10T10:11:39.474882 tid21440 [dbg,dev:NIDAQHub] Stopped task
2024-06-10T10:11:39.475322 tid21440 [dbg,dev:NIDAQHub] Created DI task
2024-06-10T10:11:39.475853 tid21440 [dbg,dev:NIDAQHub] Created DI channel for: Dev1/port0/line4
2024-06-10T10:11:39.475894 tid21440 [dbg,dev:NIDAQHub] Configured change detection timing to use Dev1/port0/line4
2024-06-10T10:11:39.475914 tid21440 [dbg,dev:NIDAQHub] Routed change detection timing to  /Dev1/ChangeDetectionEvent
2024-06-10T10:11:39.496855 tid21440 [dbg,dev:NIDAQHub] Started DI task
2024-06-10T10:11:39.497279 tid21440 [dbg,dev:NIDAQHub] Created DO task
2024-06-10T10:11:39.498010 tid21440 [dbg,dev:NIDAQHub] Created DO channel for: Dev1/port0/line0:3
2024-06-10T10:11:39.498053 tid21440 [dbg,dev:NIDAQHub] Configured sample clock timing to use /Dev1/ChangeDetectionEvent
2024-06-10T10:11:39.511634 tid21440 [IFO,dev:NIDAQHub] Specified digital channel contains more bits than supported by the 8-bit version of DAQmx Port Write.
                                    [                ] Use the version of DAQmx Port Write that supports wider digital ports.
                                    [                ] Minimum Write Size (In Bits): 32
                                    [                ] 
                                    [                ] Task Name: DOBlankTask
                                    [                ] 
                                    [                ] Status Code: -200565
2024-06-10T10:11:39.526527 tid21440 [dbg,dev:NIDAQHub] Stopped task
2024-06-10T10:11:39.526557 tid21440 [dbg,dev:NIDAQHub] Starting on-demand task
2024-06-10T10:11:39.526597 tid21440 [dbg,dev:NIDAQHub] Created task
2024-06-10T10:11:39.527324 tid21440 [dbg,dev:NIDAQHub] Created DO channel
2024-06-10T10:11:39.532776 tid21440 [dbg,dev:NIDAQHub] Wrote Digital out with task autostart: 0

So, NIDAQ advises that the digital port is 32 bits and needs to be addressed as such. The confusing thing is that NIDAQ also reports (correctly I believe) that the port is an 8 bit port (it looks from the documentation that port0 is an 8 pin port and I believe that you also have 8 bits port1 and port2, is that correct?). The NIDAQ adapter has different versions of the function hub.StartDOBlankingAndOrSequence() for 8, 16, and 32 pin ports, and the adapter chooses the 8 pin version based on the information this port is 8 pins (obtained using the call to DAQmxGetPhysicalChanDOPortWidth).

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA0VU0000000R6f0AE&l=en-US may be relevant.

What is really strange to me is that setting the output pins high or low directly seems to work for you, and that code uses the exact same (8bit) DAQMx Port Write function.

I could try to catch this error on initialization, then try to instantiate the 32 bit version and hope for the best, but I would feel a lot better more fully understanding what is going on.

dpshepherd commented 3 weeks ago

The confusing thing is that NIDAQ also reports (correctly I believe) that the port is an 8 bit port (it looks from the documentation that port0 is an 8 pin port and I believe that you also have 8 bits port1 and port2, is that correct?).

Correct. There are three ports, each with eight lines. And two analog outputs.

In Python using PyDAQMx, we only use the PFI pins for capturing input information and ChangeDetection. The relevant setup code from our adapter class (modified for readability here) should be:

import PyDAQmx as daq

channelDI_trigger_from_camera = "/Dev1/PFI0"
channelDI_start_trigger = "/Dev1/PFI1"
channelDI_change_trigger = "/Dev1/PFI2"

taskDI = daq.Task()
taskDI.CreateDIChan("/Dev1/PFI0", "", daq.DAQmx_Val_ChanForAllLines)

# Configure change detection timing (from wave generator)
taskDI.CfgInputBuffer(0)    # must be enforced for change-detection timing, i.e no buffer
taskDI.CfgChangeDetectionTiming("/Dev1/PFI0", "/Dev1/PFI0", daq.DAQmx_Val_ContSamps, 0)

# Set where the starting trigger 
taskDI.CfgDigEdgeStartTrig("/Dev1/PFI0", daq.DAQmx_Val_Rising)

 # Export DI signal to unused PFI pins, for clock and start
taskDI.ExportSignal(daq.DAQmx_Val_ChangeDetectionEvent, "/Dev1/PFI2")
taskDI.ExportSignal(daq.DAQmx_Val_StartTrigger, "/Dev1/PFI1")
nicost commented 3 weeks ago

The problem is later, when actually sending a digital out sequence to the port using

DAQmxWriteDigitalU8(doTask, samplesPerChan, false, DAQmx_Val_WaitInfinitely, DAQmx_Val_GroupByChannel, samples, numWritten, NULL);

If you are able to compile the NIDAQ adapter, you can try hard coding portWidth_ in NIDigitalOutputPort.cpp to 32 bit, and see if that works correctly.

Also, can select other ports than port0? If so, do those fail the same way for ChangeDetection?

dpshepherd commented 3 weeks ago

Also, can select other ports than port0? If so, do those fail the same way for ChangeDetection?

Selecting the other ports individually or selecting all together produces the same error.

If you are able to compile the NIDAQ adapter, you can try hard coding portWidth_ in NIDigitalOutputPort.cpp to 32 bit, and see if that works correctly.

Yes, we can do this. It will probably take a week or two as we'll need the time to setup the build environment.

dpshepherd commented 2 weeks ago

@nicost - we are starting to work on this. Is there a reason you used an older NIDAQ-mx version for the library? Version 9.2.2 was released in 2010.

nicost commented 1 week ago

No reason other than that it works and the adapter binary is nicely compatible with many runtime version of NIDAQmx. Is there anything specific function you would like to use that is not in the headers of 9.2.2?

dpshepherd commented 1 week ago

Not necessarily, just curious because we've not tested our Python code against that older version. I was also going to try compiling against a newer version once I got it working with 9.2.2.

However, I'm having some trouble building the driver correctly with 9.2.2, partially because I'm having to guess what files should be in the 3rdpartyprivate to build the adapter. I assume it should be be the .h and .lib file with the described directories, but I'm still getting build failures.

nicost commented 1 week ago

Layout is:

NationalInstruments/DAQmx_9.2 /include/NIDAQmx.h /lib64/msvc/NIDAQmx.lib

dpshepherd commented 1 week ago

Thanks! I have that layout but am getting errors with NIDAQ.

I can build MMCore, DemoCamera, etc.. successfully so I'll keep troubleshooting.

nicost commented 1 week ago

Feel free to post the errors, maybe I (or Mark) can help.

FWIW, here is the output when I build this in VS:

Build started...
1>------ Build started: Project: MMDevice-SharedRuntime, Configuration: Release x64 ------
1>MMDevice.cpp
1>ModuleInterface.cpp
1>MMDevice-SharedRuntime.vcxproj -> C:\projects\micro-manager\mmCoreAndDevices\build\Release\x64\MMDevice-SharedRuntime.lib
2>------ Build started: Project: NIDAQ, Configuration: Release x64 ------
2>NIDAQ.cpp
2>NIAnalogOutputPort.cpp
2>NIDigitalOutputPort.cpp
2>C:\projects\micro-manager\mmCoreAndDevices\DeviceAdapters\NIDAQ\NIDigitalOutputPort.cpp(135,60): warning C4018: '>=': signed/unsigned mismatch
2>C:\projects\3rdpartypublic\boost-versions\boost_1_77_0\boost\math\common_factor_rt.hpp(14,1): warning C4081: expected 'identifier'; found 'string' (compiling source file NIDAQ.cpp)
2>   Creating library C:\projects\micro-manager\mmCoreAndDevices\build\Release\x64\mmgr_dal_NIDAQ.lib and object C:\projects\micro-manager\mmCoreAndDevices\build\Release\x64\mmgr_dal_NIDAQ.exp
2>Generating code
2>Previous IPDB was built with incompatible compiler, fall back to full compilation.
2>All 1878 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
2>Finished generating code
2>NIDAQ.vcxproj -> C:\projects\micro-manager\mmCoreAndDevices\build\Release\x64\mmgr_dal_NIDAQ.dll
2>Done building project "NIDAQ.vcxproj".
========== Build: 2 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
dpshepherd commented 1 week ago

I've verified that all of the PATH variables are correct and match what you posted above. I am building via the command line because I have nearly no experience with ant, visual studio, etc... I am using VS2019 for the build and DAQMX v9.2.2. I kept MMCore in this build to show that it builds correctly.

Build log ``` msbuild micromanager.sln /t:"MMCore;NIDAQ" /p:Configuration=Release /p:Platform=x64 Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET Framework Copyright (C) Microsoft Corporation. All rights reserved. Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch. Build started 6/29/2024 4:03:17 PM. Project "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\micromanager.sln" on node 1 (MMCore;NIDAQ target(s)). ValidateSolutionConfiguration: Building solution configuration "Release|x64". Project "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\micromanager.sln" (1) is building "C:\Users\qi2lab\Documents\GitHub\mic ro-manager\mmCoreAndDevices\MMCore\MMCore.vcxproj" (2) on node 1 (default targets). Project "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\MMCore\MMCore.vcxproj" (2) is building "C:\Users\qi2lab\Documents\GitHu b\micro-manager\mmCoreAndDevices\MMDevice\MMDevice-SharedRuntime.vcxproj" (3) on node 1 (default targets). PrepareForBuild: Creating directory "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\MMDevice-SharedRuntime\". Creating directory "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\Release\x64\". Creating directory "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\MMDevice-SharedRuntime\MMD evice.B8C95F39.tlog\". InitializeBuildStatus: Creating "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\MMDevice-SharedRuntime\MMDevice.B8C9 5F39.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified. ClCompile: C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\CL.exe /c /Zi /nologo /W4 /WX- /diagn ostics:column /MP /O2 /Oi /D NDEBUG /D _CRT_SECURE_NO_WARNINGS /D _SCL_SECURE_NO_WARNINGS /D _MBCS /Gm- /EHsc /MD /GS /Gy /fp:precise /Zc:wcha r_t /Zc:forScope /Zc:inline /Fo"C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\MMDevice-Share dRuntime\\" /Fd"C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\Release\x64\MMDevice-SharedRuntime.pdb" /external:W4 /Gd /TP /wd4127 /wd4290 /wd4828 /FC /errorReport:queue /utf-8 Debayer.cpp DeviceUtils.cpp ImgBuffer.cpp MMDevice.cpp ModuleInterface.cpp Property .cpp Debayer.cpp DeviceUtils.cpp ImgBuffer.cpp MMDevice.cpp ModuleInterface.cpp Property.cpp Lib: C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\Lib.exe /OUT:"C:\Users\qi2lab\Documen ts\GitHub\micro-manager\mmCoreAndDevices\build\Release\x64\MMDevice-SharedRuntime.lib" /NOLOGO /MACHINE:X64 "C:\Users\qi2lab\Documents\GitHub\ micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\MMDevice-SharedRuntime\Debayer.obj" "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\MMDevice-SharedRuntime\DeviceUtils.obj" "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\MMDevice-SharedRuntime\ImgBuffer.obj" "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\MMDevice-SharedRuntime\MMDevice.obj" "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\MMDevice-SharedRuntime\ModuleInterface.obj" "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\MMDevice-SharedRuntime\Property.obj" MMDevice-SharedRuntime.vcxproj -> C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\Release\x64\MMDevice-SharedRuntime.lib FinalizeBuildStatus: Deleting file "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\MMDevice-SharedRuntime\MMDevice .B8C95F39.tlog\unsuccessfulbuild". Touching "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\MMDevice-SharedRuntime\MMDevice.B8C9 5F39.tlog\MMDevice-SharedRuntime.lastbuildstate". Done Building Project "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\MMDevice\MMDevice-SharedRuntime.vcxproj" (default targets ). PrepareForBuild: Creating directory "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\MMCore\". Creating directory "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\MMCore\MMCore.tlog\". InitializeBuildStatus: Creating "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\MMCore\MMCore.tlog\unsuccessfulbuild " because "AlwaysCreate" was specified. ClCompile: C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\CL.exe /c /Zi /nologo /W4 /WX- /diagn ostics:column /MP /O2 /D MMDEVICE_CLIENT_BUILD /D NOMINMAX /D NDEBUG /D _CRT_SECURE_NO_WARNINGS /D _SCL_SECURE_NO_WARNINGS /D _MBCS /Gm- /EHsc /MD /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\interme diates\Release\x64\MMCore\\" /Fd"C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\Release\x64\MMCore.pdb" /external:W4 /G d /TP /wd4127 /wd4290 /wd4828 /FC /errorReport:queue /utf-8 CircularBuffer.cpp Configuration.cpp CoreCallback.cpp CoreFeatures.cpp CorePropert y.cpp DeviceManager.cpp Devices\AutoFocusInstance.cpp Devices\CameraInstance.cpp Devices\DeviceInstance.cpp Devices\GalvoInstance.cpp Devices\ HubInstance.cpp Devices\ImageProcessorInstance.cpp Devices\MagnifierInstance.cpp Devices\SerialInstance.cpp Devices\ShutterInstance.cpp Device s\SignalIOInstance.cpp Devices\SLMInstance.cpp Devices\StageInstance.cpp Devices\StateInstance.cpp Devices\XYStageInstance.cpp Error.cpp Frame Buffer.cpp LibraryInfo\LibraryPathsWindows.cpp LoadableModules\LoadedDeviceAdapter.cpp LoadableModules\LoadedModule.cpp LoadableModules\Loaded ModuleImpl.cpp LoadableModules\LoadedModuleImplWindows.cpp Logging\Metadata.cpp LogManager.cpp MMCore.cpp PluginManager.cpp Semaphore.cpp Task .cpp TaskSet.cpp TaskSet_CopyMemory.cpp ThreadPool.cpp CircularBuffer.cpp Configuration.cpp CoreCallback.cpp CoreFeatures.cpp CoreProperty.cpp DeviceManager.cpp AutoFocusInstance.cpp CameraInstance.cpp DeviceInstance.cpp GalvoInstance.cpp HubInstance.cpp ImageProcessorInstance.cpp MagnifierInstance.cpp SerialInstance.cpp ShutterInstance.cpp SignalIOInstance.cpp SLMInstance.cpp StageInstance.cpp StateInstance.cpp XYStageInstance.cpp Error.cpp FrameBuffer.cpp LibraryPathsWindows.cpp LoadedDeviceAdapter.cpp LoadedModule.cpp LoadedModuleImpl.cpp LoadedModuleImplWindows.cpp Metadata.cpp LogManager.cpp MMCore.cpp PluginManager.cpp Semaphore.cpp Task.cpp TaskSet.cpp TaskSet_CopyMemory.cpp ThreadPool.cpp Lib: C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\Lib.exe /OUT:"C:\Users\qi2lab\Documen ts\GitHub\micro-manager\mmCoreAndDevices\build\Release\x64\MMCore.lib" /NOLOGO /MACHINE:X64 "C:\Users\qi2lab\Documents\GitHub\micro-manager\mm CoreAndDevices\build\intermediates\Release\x64\MMCore\CircularBuffer.obj" "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\MMCore\Configuration.obj" "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\MMCore\CoreCallback.obj" "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\MMCore\CoreFeatures.obj" "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\MMCore\CoreProperty.obj" "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\MMCore\DeviceManager.obj" "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\MMCore\AutoFocusInstance.obj" "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\MMCore\CameraInstance.obj" "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\MMCore\DeviceInstance.obj" "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\MMCore\GalvoInstance.obj" "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\MMCore\HubInstance.obj" "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\MMCore\ImageProcessorInstance.obj" "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\MMCore\MagnifierInstance.obj" "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\MMCore\SerialInstance.obj" "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\MMCore\ShutterInstance.obj" "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\MMCore\SignalIOInstance.obj" "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\MMCore\SLMInstance.obj" "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\MMCore\StageInstance.obj" "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\MMCore\StateInstance.obj" "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\MMCore\XYStageInstance.obj" "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\MMCore\Error.obj" "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\MMCore\FrameBuffer.obj" "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\MMCore\LibraryPathsWindows.obj" "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\MMCore\LoadedDeviceAdapter.obj" "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\MMCore\LoadedModule.obj" "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\MMCore\LoadedModuleImpl.obj" "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\MMCore\LoadedModuleImplWindows.obj" "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\MMCore\Metadata.obj" "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\MMCore\LogManager.obj" "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\MMCore\MMCore.obj" "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\MMCore\PluginManager.obj" "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\MMCore\Semaphore.obj" "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\MMCore\Task.obj" "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\MMCore\TaskSet.obj" "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\MMCore\TaskSet_CopyMemory.obj" "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\MMCore\ThreadPool.obj" "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\Release\x64\MMDevice-SharedRuntime.lib" MMCore.vcxproj -> C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\Release\x64\MMCore.lib FinalizeBuildStatus: Deleting file "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\MMCore\MMCore.tlog\unsuccessful build". Touching "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\MMCore\MMCore.tlog\MMCore.lastbuilds tate". Done Building Project "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\MMCore\MMCore.vcxproj" (default targets). Project "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\micromanager.sln" (1) is building "C:\Users\qi2lab\Documents\GitHub\mic ro-manager\mmCoreAndDevices\DeviceAdapters\NIDAQ\NIDAQ.vcxproj" (4) on node 1 (default targets). PrepareForBuild: Creating directory "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\NIDAQ\". Creating directory "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\NIDAQ\NIDAQ.tlog\". InitializeBuildStatus: Creating "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\NIDAQ\NIDAQ.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified. ClCompile: C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\CL.exe /c /I"C:\Users\qi2lab\Document s\GitHub\micro-manager\mmCoreAndDevices\buildscripts\VisualStudio\\..\..\..\..\3rdparty\NationalInstruments\DAQmx_9.2\include" /I"C:\Users\qi2 lab\Documents\GitHub\micro-manager\mmCoreAndDevices\buildscripts\VisualStudio\\..\..\MMDevice" /I"C:\Users\qi2lab\Documents\GitHub\micro-manag er\mmCoreAndDevices\buildscripts\VisualStudio\\..\..\..\..\3rdpartypublic\boost-versions\boost_1_77_0" /Zi /nologo /W4 /WX- /diagnostics:colum n /MP /O2 /Oi /GL /D WIN32 /D NDEBUG /D _WINDOWS /D _USRDLL /D _CRT_SECURE_NO_WARNINGS /D _SCL_SECURE_NO_WARNINGS /D _WINDLL /D _UNICODE /D UN ICODE /Gm- /EHsc /MD /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevic es\build\intermediates\Release\x64\NIDAQ\\" /Fd"C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x6 4\NIDAQ\vc142.pdb" /external:W4 /Gd /TP /wd4127 /wd4290 /wd4828 /FC /errorReport:queue /utf-8 NIDAQ.cpp NIAnalogOutputPort.cpp NIDigitalOutput Port.cpp NIDAQ.cpp NIAnalogOutputPort.cpp NIDigitalOutputPort.cpp C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\DeviceAdapters\NIDAQ\NIDigitalOutputPort.cpp(135,60): warning C4018: '>=': signe d/unsigned mismatch [C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\DeviceAdapters\NIDAQ\NIDAQ.vcxproj] C:\Users\qi2lab\Documents\GitHub\3rdpartypublic\boost-versions\boost_1_77_0\boost\math\common_factor_rt.hpp(14,1): warning C4081: expected 'iden tifier'; found 'string' (compiling source file NIDAQ.cpp) [C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\DeviceAdapters\NIDAQ\ NIDAQ.vcxproj] Link: C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\link.exe /ERRORREPORT:QUEUE /OUT:"C:\ Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\Release\x64\mmgr_dal_NIDAQ.dll" /INCREMENTAL:NO /NOLOGO /LIBPATH:"C:\Users\ qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\buildscripts\VisualStudio\\..\..\..\..\3rdparty\NationalInstruments\DAQmx_9.2\lib64\msv c" /LIBPATH:"C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\buildscripts\VisualStudio\\..\..\..\..\3rdpartypublic\boost-versi ons\boost_1_77_0-lib-x64" nidaqmx.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32. lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"C:\Users\qi2lab\ Documents\GitHub\micro-manager\mmCoreAndDevices\build\Release\x64\mmgr_dal_NIDAQ.pdb" /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /LTCG:incremental / LTCGOUT:"C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\NIDAQ\mmgr_dal_NIDAQ.iobj" /TLBID:1 / DYNAMICBASE /NXCOMPAT /IMPLIB:"C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\Release\x64\mmgr_dal_NIDAQ.lib" /MACHINE: X64 /DLL "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\NIDAQ\NIDAQ.obj" "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\NIDAQ\NIAnalogOutputPort.obj" "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\intermediates\Release\x64\NIDAQ\NIDigitalOutputPort.obj" "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\Release\x64\MMDevice-SharedRuntime.lib" Creating library C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\Release\x64\mmgr_dal_NIDAQ.lib and object C:\Users\q i2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\Release\x64\mmgr_dal_NIDAQ.exp NIDAQ.obj : error LNK2001: unresolved external symbol DAQmxGetSysDevNames [C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\Devic eAdapters\NIDAQ\NIDAQ.vcxproj] NIDAQ.obj : error LNK2001: unresolved external symbol DAQmxWriteDigitalU8 [C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\Devic eAdapters\NIDAQ\NIDAQ.vcxproj] NIDAQ.obj : error LNK2001: unresolved external symbol DAQmxWriteAnalogF64 [C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\Devic eAdapters\NIDAQ\NIDAQ.vcxproj] NIDAQ.obj : error LNK2001: unresolved external symbol DAQmxExportSignal [C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\DeviceA dapters\NIDAQ\NIDAQ.vcxproj] NIDAQ.obj : error LNK2001: unresolved external symbol DAQmxReadDigitalLines [C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\Dev iceAdapters\NIDAQ\NIDAQ.vcxproj] NIDAQ.obj : error LNK2001: unresolved external symbol DAQmxClearTask [C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\DeviceAdap ters\NIDAQ\NIDAQ.vcxproj] NIDAQ.obj : error LNK2001: unresolved external symbol DAQmxCfgChangeDetectionTiming [C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDev ices\DeviceAdapters\NIDAQ\NIDAQ.vcxproj] NIDAQ.obj : error LNK2001: unresolved external symbol DAQmxStartTask [C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\DeviceAdap ters\NIDAQ\NIDAQ.vcxproj] NIDAQ.obj : error LNK2001: unresolved external symbol DAQmxCreateDOChan [C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\DeviceA dapters\NIDAQ\NIDAQ.vcxproj] NIDAQ.obj : error LNK2001: unresolved external symbol DAQmxCreateTask [C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\DeviceAda pters\NIDAQ\NIDAQ.vcxproj] NIDAQ.obj : error LNK2001: unresolved external symbol DAQmxCreateAOVoltageChan [C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\ DeviceAdapters\NIDAQ\NIDAQ.vcxproj] NIDAQ.obj : error LNK2001: unresolved external symbol DAQmxGetDevAOPhysicalChans [C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevice s\DeviceAdapters\NIDAQ\NIDAQ.vcxproj] NIDAQ.obj : error LNK2001: unresolved external symbol DAQmxGetDevTerminals [C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\Devi ceAdapters\NIDAQ\NIDAQ.vcxproj] NIDAQ.obj : error LNK2001: unresolved external symbol DAQmxWriteDigitalU16 [C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\Devi ceAdapters\NIDAQ\NIDAQ.vcxproj] NIDAQ.obj : error LNK2001: unresolved external symbol DAQmxCfgSampClkTiming [C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\Dev iceAdapters\NIDAQ\NIDAQ.vcxproj] NIDAQ.obj : error LNK2001: unresolved external symbol DAQmxWriteDigitalU32 [C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\Devi ceAdapters\NIDAQ\NIDAQ.vcxproj] NIDAQ.obj : error LNK2001: unresolved external symbol DAQmxGetExtendedErrorInfo [C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices \DeviceAdapters\NIDAQ\NIDAQ.vcxproj] NIDAQ.obj : error LNK2001: unresolved external symbol DAQmxGetErrorString [C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\Devic eAdapters\NIDAQ\NIDAQ.vcxproj] NIDAQ.obj : error LNK2001: unresolved external symbol DAQmxGetDevDOPorts [C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\Device Adapters\NIDAQ\NIDAQ.vcxproj] NIDAQ.obj : error LNK2001: unresolved external symbol DAQmxCreateDIChan [C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\DeviceA dapters\NIDAQ\NIDAQ.vcxproj] NIDAQ.obj : error LNK2001: unresolved external symbol DAQmxGetDevAOVoltageRngs [C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\ DeviceAdapters\NIDAQ\NIDAQ.vcxproj] NIDigitalOutputPort.obj : error LNK2001: unresolved external symbol DAQmxGetPhysicalChanDOPortWidth [C:\Users\qi2lab\Documents\GitHub\micro-mana ger\mmCoreAndDevices\DeviceAdapters\NIDAQ\NIDAQ.vcxproj] C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\Release\x64\mmgr_dal_NIDAQ.dll : fatal error LNK1120: 22 unresolved extern als [C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\DeviceAdapters\NIDAQ\NIDAQ.vcxproj] Done Building Project "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\DeviceAdapters\NIDAQ\NIDAQ.vcxproj" (default targets) -- FAILED. Done Building Project "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\micromanager.sln" (MMCore;NIDAQ target(s)) -- FAILED. Build FAILED. "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\micromanager.sln" (MMCore;NIDAQ target) (1) -> "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\DeviceAdapters\NIDAQ\NIDAQ.vcxproj" (default target) (4) -> (ClCompile target) -> C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\DeviceAdapters\NIDAQ\NIDigitalOutputPort.cpp(135,60): warning C4018: '>=': sig ned/unsigned mismatch [C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\DeviceAdapters\NIDAQ\NIDAQ.vcxproj] C:\Users\qi2lab\Documents\GitHub\3rdpartypublic\boost-versions\boost_1_77_0\boost\math\common_factor_rt.hpp(14,1): warning C4081: expected 'id entifier'; found 'string' (compiling source file NIDAQ.cpp) [C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\DeviceAdapters\NIDA Q\NIDAQ.vcxproj] "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\micromanager.sln" (MMCore;NIDAQ target) (1) -> "C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\DeviceAdapters\NIDAQ\NIDAQ.vcxproj" (default target) (4) -> (Link target) -> NIDAQ.obj : error LNK2001: unresolved external symbol DAQmxGetSysDevNames [C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\Dev iceAdapters\NIDAQ\NIDAQ.vcxproj] NIDAQ.obj : error LNK2001: unresolved external symbol DAQmxWriteDigitalU8 [C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\Dev iceAdapters\NIDAQ\NIDAQ.vcxproj] NIDAQ.obj : error LNK2001: unresolved external symbol DAQmxWriteAnalogF64 [C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\Dev iceAdapters\NIDAQ\NIDAQ.vcxproj] NIDAQ.obj : error LNK2001: unresolved external symbol DAQmxExportSignal [C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\Devic eAdapters\NIDAQ\NIDAQ.vcxproj] NIDAQ.obj : error LNK2001: unresolved external symbol DAQmxReadDigitalLines [C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\D eviceAdapters\NIDAQ\NIDAQ.vcxproj] NIDAQ.obj : error LNK2001: unresolved external symbol DAQmxClearTask [C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\DeviceAd apters\NIDAQ\NIDAQ.vcxproj] NIDAQ.obj : error LNK2001: unresolved external symbol DAQmxCfgChangeDetectionTiming [C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndD evices\DeviceAdapters\NIDAQ\NIDAQ.vcxproj] NIDAQ.obj : error LNK2001: unresolved external symbol DAQmxStartTask [C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\DeviceAd apters\NIDAQ\NIDAQ.vcxproj] NIDAQ.obj : error LNK2001: unresolved external symbol DAQmxCreateDOChan [C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\Devic eAdapters\NIDAQ\NIDAQ.vcxproj] NIDAQ.obj : error LNK2001: unresolved external symbol DAQmxCreateTask [C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\DeviceA dapters\NIDAQ\NIDAQ.vcxproj] NIDAQ.obj : error LNK2001: unresolved external symbol DAQmxCreateAOVoltageChan [C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevice s\DeviceAdapters\NIDAQ\NIDAQ.vcxproj] NIDAQ.obj : error LNK2001: unresolved external symbol DAQmxGetDevAOPhysicalChans [C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevi ces\DeviceAdapters\NIDAQ\NIDAQ.vcxproj] NIDAQ.obj : error LNK2001: unresolved external symbol DAQmxGetDevTerminals [C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\De viceAdapters\NIDAQ\NIDAQ.vcxproj] NIDAQ.obj : error LNK2001: unresolved external symbol DAQmxWriteDigitalU16 [C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\De viceAdapters\NIDAQ\NIDAQ.vcxproj] NIDAQ.obj : error LNK2001: unresolved external symbol DAQmxCfgSampClkTiming [C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\D eviceAdapters\NIDAQ\NIDAQ.vcxproj] NIDAQ.obj : error LNK2001: unresolved external symbol DAQmxWriteDigitalU32 [C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\De viceAdapters\NIDAQ\NIDAQ.vcxproj] NIDAQ.obj : error LNK2001: unresolved external symbol DAQmxGetExtendedErrorInfo [C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevic es\DeviceAdapters\NIDAQ\NIDAQ.vcxproj] NIDAQ.obj : error LNK2001: unresolved external symbol DAQmxGetErrorString [C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\Dev iceAdapters\NIDAQ\NIDAQ.vcxproj] NIDAQ.obj : error LNK2001: unresolved external symbol DAQmxGetDevDOPorts [C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\Devi ceAdapters\NIDAQ\NIDAQ.vcxproj] NIDAQ.obj : error LNK2001: unresolved external symbol DAQmxCreateDIChan [C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\Devic eAdapters\NIDAQ\NIDAQ.vcxproj] NIDAQ.obj : error LNK2001: unresolved external symbol DAQmxGetDevAOVoltageRngs [C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevice s\DeviceAdapters\NIDAQ\NIDAQ.vcxproj] NIDigitalOutputPort.obj : error LNK2001: unresolved external symbol DAQmxGetPhysicalChanDOPortWidth [C:\Users\qi2lab\Documents\GitHub\micro-ma nager\mmCoreAndDevices\DeviceAdapters\NIDAQ\NIDAQ.vcxproj] C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\build\Release\x64\mmgr_dal_NIDAQ.dll : fatal error LNK1120: 22 unresolved exte rnals [C:\Users\qi2lab\Documents\GitHub\micro-manager\mmCoreAndDevices\DeviceAdapters\NIDAQ\NIDAQ.vcxproj] 2 Warning(s) 23 Error(s) Time Elapsed 00:00:09.11 ```
nicost commented 5 days ago

Very strange. The linker is unable to resolve the symbols that can be found in NIDAQmx.lib. The path to that file (as can be found in /LIBPATH looks correct to me. You could try: grep DAQmxGetSysDevNames NIDAQmx.lib which for me returns: Binary file NIDAQmx.lib matches but it would be very surprising if that were the problem.

B.t.w., it has become quite easy to work with VIsual Studio. You should be able to open the micromanager.sln file (refuse to let it update the toolsets), and build straight from the code checked out from github (as long as the 3rdparty libraries are there). Doubt that will make a difference for you though, your command line build does the same thing.

@marktsuchida, any ideas why the link step fails for @dpshepherd?

marktsuchida commented 5 days ago

Perhaps unlikely, but I think LNK2001 can be caused, among other things, by the .lib having the wrong architecture (32-bit in this case). To check this, you can use dumpbin /headers NIDAQmx.lib in the Developer PowerShell (or Command Prompt) for Visual Studio. It will print a lot of headers but each will have a Machine line saying x86 or x64.

Other than that, I don't have any ideas at the moment, since all the compile and link commands look correct to me.

dpshepherd commented 5 days ago

Thanks both! I'll check and redownload the SDK if necessary. The library should be for x64 right?

marktsuchida commented 4 days ago

The library should be for x64 right?

Yes.

dpshepherd commented 4 days ago

I figured out the compilation issue. The installer for NIDAQmx has multiple places with compiler support. The correct header and library files for the NIDAQ device driver are found at Program Files (x86)\National Instruments\Shared\ExternalCompilerSupport\C\include and Program Files (x86)\National Instruments\Shared\ExternalCompilerSupport\C\lib64.

When you install compiler support, there also is a Program Files (x86)\National Instruments\NI-DAQ\DAQmx ANSI C Dev directory, but this only contains the 32-bit (x86) header and library.

Using the correct location, we can compile the NIDAQ device driver.

We'll work to modify as requested and report back.