LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

GUI functions in MS eMbedded VC++

Hello,

I've been developing a UI for use in Microsoft eMbedded Visual C++ for
later port to a mobile device, and I have run into a number of linking
issues. Initially I developed a test program based around the files
given on the following page:

http://zone.ni.com/devzone/cda/epd/p/id/1354?submitted=yes

As I am using eMbedded VC++ I was unable to run the test program
there, but it helped me develop my code to transfer from CVI. I have
a very simple .uir file with only a button to close the window, and
even including the cvirt.lib and cvisupp.lib libraries and altering
the header paths to the correct folder I can't get everything
working.

The error is an Unresolved External Symbol Error (LNK 2019) for very
basic functions like DisplayPanel() and RunUserInterface(), which are,
I believe, defined in the refsym.c file in the /extlib directory.
When I include that file in the project as a resource, I get
identifier errors in refsym.c for obscure symbols I don't even use
(these return to unresolved symbol errors when these sections are
commented out).

My question is this: How can I correctly include the refsym.c file as
a part of the build so that I might finally avoid all of these
irritating symbol errors? Any help would be much appreciated,

Eccomi

0 Kudos
Message 1 of 4
(6,093 Views)
Hi Eccomi,
 
Unfortunately, LabWindows/CVI does not currently support compiling for PDA targets. If you would like to see this feature in a future version of CVI, I would encourage you to submit your feedback at ni.com/contact. Each product suggestion we receive goes directly to the applicable developer, and we take each suggestion very seriously.
 
As a workaround, if you have access to the LabVIEW PDA module, you should be able to call a CVI DLL from LabVIEW to open up a user interface on your PDA.
 
I hope this helps!
 
Regards,
 
Casey Weltzin
Applications Engineer
National Instruments 
0 Kudos
Message 2 of 4
(6,079 Views)
It's as I feared, then. Actually, as it happens, I'm already waiting
for the LabVIEW PDA Module to arrive in my hands and in the meantime
thought I might attempt another workaround. So I take it CVI can be
implemented in MSVC++ but not in the eMbedded version?

Is there a chance, however, that despite the doomed nature of the
final intent of my project, that my unresolved external symbol issues
and later identifiers errors are due to my incorrectness (or
ineptitude) in linking between CVI functions and the VC++ compiler
(e.g. can I get the eVC++ compiler to even recognize CVI functions
like QuitUserInterface() ?) ?

0 Kudos
Message 3 of 4
(6,048 Views)
Hi Eccomi,
 
Yes, you should be able to use CVI with an external compiler; specifically, Microsoft Visual C/C++ or Boorland C/C++ are supported. There are a number of steps that you need to take when using an external compiler (taken from the CVI help):

Complete the following steps to set up the project so that it can be built in an external compiler:

  1. Create a new project in the external compiler. Include in the external compiler project any source (.c, .lib, and .obj) files that the LabWindows/CVI project includes.
  2. In the external compiler project settings, specify the cvi\include directory as an include path for the LabWindows/CVI library include files.
  3. If the LabWindows/CVI project includes one or more instrument drivers, add the program files that correspond to those instrument driver files to the external compiler project. Select Instrument»Edit and then click Show Info to display the program file location.

    Also add any program files on which the listed instrument driver depends. Select Edit».FP Auto-Load List to access a list of other instrument drivers on which the current instrument driver depends.
  4. Add the following files to the external compiler project:
    • \extlib\cvirt.lib
    • \extlib\cvisupp.lib
    These libraries include the LabWindows/CVI startup library and an import library that contains the User Interface Library, Formatting and I/O Library, RS-232 Library, DDE Support Library, TCP Support Library, and Utility Library. The LabWindows/CVI \extlib directory contains additional files you can add to the external compiler project, depending on the LabWindows/CVI libraries you use in the project.
  5. Complete this step only if you are building your project in Microsoft Visual Studio 2005. Visual Studio 2005 removed support for the single-threaded version of its C library. Therefore, you must configure your project's linker settings to ignore directives to use the single-threaded C library. In Visual Studio, select Project»Properties and expand the properties tree to the Configuration Properties»Linker»Input item. Add libc to the Ignore Specific Library option.
  6. If the LabWindows/CVI project includes .uir files that have callbacks, use the External Compiler Support dialog box to create a .c or .obj file that contains a table of callback functions and function names. Add the generated source or object file to the external compiler project.

Please let me know if you need any additional information regarding using Visual C++ with CVI. Have a great day!

Regards,

Casey Weltzin
Applications Engineer
National Instruments

0 Kudos
Message 4 of 4
(5,679 Views)