Ah. Project Properties needs to be fiddled with as well as the paths in
Tools->Options. Doesn't say that in the documentation. For reference;
Linker->General->Additional Library Directories, add the VXIpnp lib
directory
Linker->Input->Additional Dependencies, add nidmm_32.lib.
--
Dr. Craig Graham, Software Engineer
Advanced Analysis and Integration Limited, UK. http://www.aail.co.uk/
"Craig Graham" wrote in message
news:3f24eb20@newsgroups....
> I've now given up on trying to use the NIDMM DLL from VB.NET and am
delving
> into doing it in C++. As far as I can tell, this code should build and run
>
> #include "stdafx.h"
>
> #using
> #include
> #include "nidmm.h"
>
> using namespace System;
>
> // This is the entry point for this application
> int _tmain(void)
> {
> // TODO: Please replace the sample code below with your own.
> ViChar resourceName[256] = "DAQ::1::INSTR";
>
> ViSession vi = VI_NULL;
> ViBoolean idQuery = VI_TRUE;
> ViBoolean reset = VI_TRUE;
> ViStatus error = VI_SUCCESS;
> Console::WriteLine("Hello World");
> niDMM_init(resourceName, idQuery, reset, &vi);
> niDMM_close(vi);
>
> return 0;
> }
>
>
> However, on building I get this output;
>
> Linking...
> DMM2.obj : error LNK2001: unresolved external symbol "long __stdcall
> niDMM_close(unsigned long)" (?niDMM_close@@$$J14YGJK@Z)
> DMM2.obj : error LNK2001: unresolved external symbol "long __stdcall
> niDMM_init(char *,unsigned short,unsigned short,unsigned long *)"
> (?niDMM_init@@$$J216YGJPADGGPAK@Z)
> Debug/DMM2.exe : fatal error LNK1120: 2 unresolved externals
>
>
> I have added the include and lib directories to the search paths and can
> build the examples. I have distilled one of the examples down until it is
> not very different from the above, and I can start working with that, but
I
> would like to know why the example works and mine doesn't. Any
suggestions?
>
>
> --
> Dr. Craig Graham, Software Engineer
> Advanced Analysis and Integration Limited, UK. http://www.aail.co.uk/
>
>
>