0

I have a project which is simulating a graphical environment. What I need in this program is to integrate it with NIDAQ library. Currently I am getting LNK2019 of unresolved external symbol.

LNK2019: unresolved external symbol DAQmxCreateTask referenced in function "public: virtual void __cdecl sofa::component::behaviormodel::MyBehaviorModel::updatePosition(double)" (?updatePosition@MyBehaviorModel@behaviormodel@component@sofa@@UEAAXN@Z) C:\Sofa\applications\plugins\NIPlugin\MyBehaviorModel.obj NIPlugin

I have included header file and lib file into my project but as my project is very big and includes lots of library and sub projects it seems that I have to add dynamic library of national instrument to the project as well. However I can not add any new reference to my new code in reference option of my project (there is no browse option abailable). I have also tried adding the path of the .dll file to the additional directory of the project and it doesn't seem to work. but when I add my .dll to additional dependency in Input-->Linker section of the project I get LNK1107 error.

LNK1107: invalid or corrupt file: cannot read at 0x2D0 C:\git\sofa\v15.12\src\lib\win64\nicaiu.dll 1 NIPlugin 1

Do you have any idea how I can make VS read my .dll file?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • What bitness (32-bit or 64-bit) is your application? – Joe Friedrichsen Apr 18 '16 at 14:58
  • it is 64 Actually I found out the problem.It turned out that NI has two versions of lib for his application one 64 bit and another 32bit and I was attaching the 32bit version to my 64bit project. thank you anyway for taking time and replying @Joe Friedrichsen – Mehdi Madani Apr 18 '16 at 16:40

0 Answers0