05-26-2010 10:35 PM
Hello,
I am trying to compile the old C code and .UIR code using Labwindow/CVI evaluation Version 9.1.0 to get the header .h file from UIR file, and EXE file. After the UIR changed the font because UIR file has been coded with LABwindows 8.1.0, and the following errors are displayed. Any help is appreciated.
ATHOS47.C - 20 errors
"ATHOS47.h"(689,45) Redefinition of macro 'menubar_panel_SEPARATOR'.
320, 1 Missing prototype. (Require function prototypes build option is enabled.)
322, 9 Missing prototype. (Require function prototypes build option is enabled.)
323, 9 Missing prototype. (Require function prototypes build option is enabled.)
324, 9 Missing prototype. (Require function prototypes build option is enabled.)
325, 9 Missing prototype. (Require function prototypes build option is enabled.)
326, 9 Missing prototype. (Require function prototypes build option is enabled.)
327, 9 Missing prototype. (Require function prototypes build option is enabled.)
328, 9 Missing prototype. (Require function prototypes build option is enabled.)
329, 9 Missing prototype. (Require function prototypes build option is enabled.)
330, 9 Missing prototype. (Require function prototypes build option is enabled.)
331, 9 Missing prototype. (Require function prototypes build option is enabled.)
332, 9 Missing prototype. (Require function prototypes build option is enabled.)
333, 9 Missing prototype. (Require function prototypes build option is enabled.)
334, 9 Missing prototype. (Require function prototypes build option is enabled.)
335, 9 Missing prototype. (Require function prototypes build option is enabled.)
336, 30 Missing prototype. (Require function prototypes build option is enabled.)
337, 9 Missing prototype. (Require function prototypes build option is enabled.)
347, 9 Missing prototype. (Require function prototypes build option is enabled.)
348, 9 Missing prototype. (Require function prototypes build option is enabled.)
05-27-2010 12:43 AM - edited 05-27-2010 12:44 AM
Hi, two minor comments:
- it's better to use relative path, i.e. #include <userint.h>
- furthermore, to my knowledge, there is no more a file such as 'lwsystem.h'
05-27-2010 03:52 AM
This code has old K&R-style function declarations, and the header files (especially lwsystem.h) indicate it was written in LabWindows for DOS, not LabWindows/CVI. It is clearly rather old!
If you want to try to get the code working as-is, you will at the very least need to turn off the 'Require function prototypes' option in the CVI Options|Build Options... panel, then start working through any other errors.
I note also that the compiler is not complaining about a missing lwsystem.h - have you copied this into the CVI include folder from somewhere else? You should not have done this. Functions previously covered by lwsystem.h are covered by different include files in CVI, and the compiler will normally prompt you when you try to compile if a standard header file is required. You should check carefully that the files in the ...\CVI2009\include folder are ONLY those installed with CVI2009.
05-27-2010 07:48 AM
Thank for your inputs. Labwindows/CVI has the tool to translate this DOS programs so It can be run in LabWindows/CVI.
05-27-2010 10:32 AM
That's true. But although CVI's translation tool helps a lot, it is by no means the whole answer. You still have work to do once it has been run over your code.
It does not appear to have been applied to the source code you posted, by the way.
06-04-2010 08:00 AM
Hi,
We have used LabVIEW for other projects, so is it necessary to use LabWindows/CVI to modify the old C code from Labwindows for DOS 4.6.1?.
If we select LabVIEW, so we will need to start over from beginning to create vi programs to replace the old C codes, or may use some C old codes from old program Labwindow for DOS 4.6.1 to transfer to Labview. Please give us a recommendation for selection, and it seems to us LabVIEW will take a lot of work.
Thank.
06-07-2010 05:04 PM
Hi btran,
There is no automatic method for converting c code directly into LabVIEW code, so if you choose LabVIEW, you would need to write everything as LabVIEW code. However, if you can compile functions of your c code into a dll, you could call that dll from LabVIEW to access those particular functions. As an alternative, you could use the tool discussed above as a starting point for updating the code to be compatible with LabWindows CVI.
Have a great afternoon!
John M
01-23-2013 10:17 AM
Hi,
I'm new in this forum, bat I'm in a similar situation, having to perform some slight modifications to an old application realized with LabWindows for DOS.
The source code is available, but unfortunately I do not have any longer the legacy LabWindows compiler.
What do you suggest? Is it possible to find anywhere this program, or is it necessary to pass to LW CVI?
Thank you in advance
01-24-2013 10:44 AM
Hi willkacka,
At this point the easiest procedure is going to be to convert your code to LabWindows/CVI and just create a new project and reincorperate all of your code to it and fix the errors as they come.
Regards,