LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

compile error of LabVIEW C code in vxworks 5.5.1/tornado 2.2.1

Ladies and Gentlemen,

 

I am trying to run a LabVIEW-generated C code {Calling a LabVIEW-built DLL in C to Acquire, Analyze, and Present Data (http://zone.ni.com/devzone/cda/epd/p/id/1515)} in VxWorks 5.5.1. However, I have the following errors in using Tornado 2.2.1 to compile:

 
vxrm *.o *.rpo ctdt.c symTbl.c vxApp* *.out *.pl
vxrm ..\prjComps.h ..\prjParams.h ..\prjConfig.c ..\linkSyms.c
vxrm ..\libs.nm ..\libs.size
ccsimpc -g -mpentium -ansi -fno-builtin -fno-defer-pop -I. -IC:\WindRiver\Tor2.2-PPC\targe
t\h\ -DCPU=SIMNT -DTOOL_FAMILY=gnu -DTOOL=gnu -Wall  -c ..\callLVDLL.c
In file included from ..\extcode.h:14,
                 from ..\LV_AAP.h:1,
                 from ..\callLVDLL.c:23:
..\platdefines.h:308: #error
..\platdefines.h:339: parse error
In file included from ..\extcode.h:15,
                 from ..\LV_AAP.h:1,
                 from ..\callLVDLL.c:23:
..\fundtypes.h:17: parse error
..\fundtypes.h:43: stdint.h: No such file or directory
In file included from ..\fundtypes.h:61,
                 from ..\extcode.h:15,
                 from ..\LV_AAP.h:1,
                 from ..\callLVDLL.c:23:
..\lv_prolog.h:37: parse error
In file included from ..\extcode.h:15,
                 from ..\LV_AAP.h:1,
                 from ..\callLVDLL.c:23:
..\fundtypes.h:157: parse error
In file included from ..\fundtypes.h:252,
                 from ..\extcode.h:15,
                 from ..\LV_AAP.h:1,
                 from ..\callLVDLL.c:23:
..\lv_epilog.h:17: parse error
In file included from ..\extcode.h:15,
                 from ..\LV_AAP.h:1,
                 from ..\callLVDLL.c:23:
..\fundtypes.h:361: parse error
..\fundtypes.h:370: parse error
..\fundtypes.h:386: parse error
In file included from ..\LV_AAP.h:1,
                 from ..\callLVDLL.c:23:
..\extcode.h:40: parse error
..\extcode.h:49: parse error
..\extcode.h:57: parse error
In file included from ..\extcode.h:116,
                 from ..\LV_AAP.h:1,
                 from ..\callLVDLL.c:23:
..\lv_prolog.h:37: parse error
In file included from ..\LV_AAP.h:1,
                 from ..\callLVDLL.c:23:
..\extcode.h:526: parse error
..\extcode.h:959: parse error
In file included from ..\extcode.h:1080,
                 from ..\LV_AAP.h:1,
                 from ..\callLVDLL.c:23:
..\lv_epilog.h:17: parse error
make: *** [callLVDLL.o] Error 0x1

Done.

 
I would appreciate your help in this matter. "LV_AAP.h" and "callLVDLL.c" will be furnished upon request OR you can download from

 
http://zone.ni.com/devzone/cda/epd/p/id/1515

 
The rest of the header files are in my directory:

 
C:\Program Files\National Instruments\LabVIEW 2010\cintools

 
Regards,

Chi

 

0 Kudos
Message 1 of 6
(3,682 Views)

Hi Chi,

 

Can you provide some more information on what you're trying to accomplish?  What is your target hardware that's running the VxWorks OS?

 

Are you trying to build that example code, and you're running into that error?  if not, where and how are you obtaining your source files?

 

Did you include "C:\Program Files\National Instruments\LabVIEW 2010\cintools" in your build environment?

 

Please note that this article was intended to be used with Microsoft Visual C++ 2008 or LabWindows/CVI, and creates a dll.  You may not be able to compile a .out file for the VxWorks OS with this example.

 

Lastly, please look at this documentation and to ensure that you have everything configured correctly.  It talks about how to compile for a VxWorks target.

 

 

Regards,

Che T.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 6
(3,658 Views)

Hello Che,

 

Thanks for your response. My real-time target hardware is MVME5100. However, at present I want to see whether a C code {see the attached callLVDLL.c} generated from LabVIEW can be compiled in VxWorks 5.5.1/Tornado 2.2.1. The reason why I am using an old version of VxWorks/Tornado is my company is transitioning to NI PXIe hardwares and LabVIEW software, and phasing out all of VME boards {Power 4e, Power 7e, and MVME5100}.

 

All of header files are included in Tornado 2.2.1. If you are correct about compiling an .out file using Tornado 2.2.1, then what changes should be made to "callLVDLL.c" for a successful Tornado compilation?

 

The documentation you recommended refers to a newer version of VxWorks/Tornado, which I do not think is helpful.

 

Thanks for your help,

Chi

 

 

 

Download All
0 Kudos
Message 3 of 6
(3,650 Views)

Hi Chi,

 

The error messages seem to indicate that it's missing some files that it's expecting.  The article that you referenced was written near LabVIEW 8.0 days, and it's possible that some of the functions/header files that used to exist in LabVIEW 8.0 no longer exists for LabVIEW 2010.

 

Let's take a step back and get a bigger picture of what you're trying to accomplish.

  1. Are you planning on using the LabVIEW C Code Generator?  Do you have it already?
  2. Can you provide some details on why you'd need to call LabVIEW code as a dll rather than running it as an exe?  An easier method would be to use the LabVIEW Real-Time Module, create your code in that environment, build an exe and have that running.  This way, all of the code will be contained in LabVIEW, and you won't have to worry about interfacing it with any C code

 

Regards,

Che T.
Applications Engineer
National Instruments
0 Kudos
Message 4 of 6
(3,629 Views)

Thanks, Che,

 

(1) Currently, I do NOT have C Code Generator on my LabVIEW 2010 SP1, but I could request a trial copy from National Instruments.

(2) I still want to experiment "callLVDLL.c" in the VxWorks 5.5.1/Tornado 2.2.1/MVME5100 environment, then per your suggestion should I re-create "callLVDLL.c" in LabVIEW 2010 SP1 using C Code Generator?

 

Regards,

Chi

 

0 Kudos
Message 5 of 6
(3,616 Views)

Hi Chi,

 

I reread your post, and I realized that you're getting new PXI systems.  Your PXI system will be running PharLap instead of vxWorks!  So, going down the route of generating C code for vxWorks is no longer necessary.

 

 

Regards,

Che T.
Applications Engineer
National Instruments
0 Kudos
Message 6 of 6
(3,599 Views)