Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

problem with c code for ni vision

Hi,

I am getting a trouble building a c file created by NI VISION. The c file is design for camera acquisition, the problem his that it his given me 5 errores 23 error LNK2019: .
I was using Visual c++ express 2005 edition, but I changed to Microsoft visual studio .NET, because I thougt that could be the problem.
I folowed the tips in http://digital.ni.com/public.nsf/websearch/3139ebe28d28cfd6862567c500093c27?OpenDocument&Highlight=2,1O4JKDIN. and I still have errors. The only thing I didn´t do was inserting the nitypes.h file , but i didn´t find it in the include directory, so I reinstalled 3 times all the NI VISION software and I still can´t find it.

These are the errors:

23 error LNK2019: unresolved external symbol __imp__imgClose@8 referenced in function _main
23 error LNK2019: unresolved external symbol __imp__imgGetAttribute@12 referenced in function _main
23 error LNK2019: unresolved external symbol __imp__imgInterfaceOpen@8 referenced in function _main
23 error LNK2019: unresolved external symbol __imp__imgSessionOpen@8 referenced in function _main
23 error LNK2019: unresolved external symbol _WinMain@16 referenced in function _WinMainCRTStartup

Hope somewone can help me.

0 Kudos
Message 1 of 4
(3,606 Views)
Hi Hugot,

I get a similar problem with visual studio 2005 express edition (can't compile while using vision) and I found somewhere that it is because the MFC or PFSDK included with this version of studio is too old (that's maybe why it's free!) and not compatible with vision. I bought the visual studio 2005 standard edition and all was working perfectly.

I don't know for the .NET version... but I think that you need to use MFCs (a version that support CLR language). Maybe someone else could confirm before you spend money on another compiler.

For sure, VS2005 Express is not compatible with VISION.

Hope that help... or may resolve a part of your problem.

DSA




0 Kudos
Message 2 of 4
(3,592 Views)
Well I tried the use of MFC and it still don´t work. Can anybody answer if the .NET version can be used for this?

Thank you
0 Kudos
Message 3 of 4
(3,571 Views)
Hi,

If the same errors appear using MFCs (and the /clr compiler option - for VS2005 and I guess it's valid for .NET too), I can't help you more. But if you came out with heap error, system.typeinitializationexception or System.AccessViolationException, there is a way to make it work.

Good luck...

DSA




0 Kudos
Message 4 of 4
(3,567 Views)