07-21-2004 08:59 AM
07-22-2004 01:25 AM
10-07-2004 10:33 PM
07-02-2015 05:18 AM
Hi
I am trying to do same but with different tool. Its Visual studio C++.
I have got sample code from NI-FBUS installlation files. Using same for compilation.
Any starting point you would like to share? I am very new to both 1) Using NI-FBUS API and 2) Visual studio
07-02-2015 09:31 PM
Hi dopplerdude,
The installer has installed manual guides. Please refer to them.
Start Menu->Programs->National Instruments->NI-FBUS->Documentation
07-03-2015 02:15 AM
Yeah thats very true. I am using those manuals as reference already.
Okay, let me little elaborate what I am actually want to do..
I want to read parameters of different function blocks by name. For that i am aware NI-FBUS provides APIs. I saw list of APIs categorized as per their function namely administrative, core and device description function.
Now to develop an application using visual C++, I installed Visual studio 2010 SP1 on my machine (Windows 7)
In VC++ I am not very sure which project type to select to create application. So I tried with both 1)win32 Console Application and 2)Win32 Project.
I took source "nifbtest.cpp" and header "nifb.h" files' samples from "MS Visual C" subdirectory of NIFBUS installation folder.
As I am runing NI-FBUS' 4.1.1 version, I linked nifb64.lib to the project.
Quote from the manual-- "Note NI-FBUS software supports 64-bit since version 4.0.1. To build a 64-bit application,
you must link your application with nifb64.lib. nifb64.dll should be automatically installed in your Windows system directory."
When I hit DEBUG I get - 1>nifbtest.obj : error LNK2019: unresolved external symbol _nifOpenSession referenced in function _main
There are many of them each for every NI-FBUS API used.
Yes Of course NI-FBUS comm manager is running while I DEBUG.
I guess thats it!
I am not aware of C# or .NET for that matter. I know C and C++, the reason why I want to develop host app using VC++.
Thank you very much for your earlier quick reply.
Please see attached image for better and quick understanding of the problem.
07-08-2015 10:15 PM
Hi dopplerdue,
Sorry for replying late.
From the screenshot I see that you are not very familiar with VS.
The following step should be a start for you:
1. create an empty project.
2. open the property page of your project, and edit the a.)Linker ->Input for the nifb.lib (because you are developing 32-bit app), b.) C/C++ for the header files. Click OK.
3. In the Header Files add existing files from folder C:\Program Files (x86)\National Instruments\NI-FBUS\MS Visual C\includes so that you can debug better.
4. Add one source file nifbtest.c into Source Files.
Don't forget to start NI-FBUS Communication Manager.
07-08-2015 10:44 PM
HI LewisL,
Thanks for detailed reply.
Yes, I am very new to VC, in fact this is the first project in which I am using VC.
All those errors vanished as soon as I replaced nifb64.lib with nifb.lib. As you rightly said,it is a 32-bit application.
Thanks a lot.