From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

barcode vision 2015

hi all 

   i have a problem for coding to read 1D barcode.

the visual studio error is:

        error LNK2019: 无法解析的外部符号 __imp__imaqReadBarcode2@28,该符号在函数 "protected: virtual int __thiscall COCRFunctionDlg::OnInitDialog(void)" (?OnInitDialog@COCRFunctionDlg@@MAEHXZ) 中被引用
1>E:\VS2010\OCRFunction\Debug\OCRFunction.exe : fatal error LNK1120: 1 个无法解析的外部命令

 

when my use other function (pattern match or match sharp)not this error, but imaqReadBarcode2 or imaqReadBarcode3 have this error , imaqReadBarcode function have no error

 

 

.h file :

      #include "nimachinevision.h"
#include "niocr.h"
#include "nivision.h"
#include "io.h"
#pragma comment(lib,"nivision.lib")

 

have comment  library

 

 

please  help  very thanks

0 Kudos
Message 1 of 5
(5,017 Views)

i think the command--"#pragma comment" doesn't work in labwindows. i got the same type error with you.so i copy the lib to my project folder and the error is gone.

0 Kudos
Message 2 of 5
(4,009 Views)

Please refer to the following link regarding with your question:

http://ae.natinst.com/public.nsf/web/searchinternal/36f561f57095cadb86257cc4006c275b?OpenDocument

0 Kudos
Message 3 of 5
(3,982 Views)

the ni sw engineer have compile a new vision nivision.lib to me, it a bug in lib.

0 Kudos
Message 4 of 5
(3,276 Views)

the ni sw engineer have compile a new vision nivision.lib to me, it a bug in lib.

so if you have this concern you can connect ni engineer 

0 Kudos
Message 5 of 5
(3,273 Views)