LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

missing parameter type

When I compile my file there is no error, but when I try to Build a popup appears saying "missing parameter type in header file".
This header file is AnalysisFunctions.h and in AnalysisFunctions.c I have #include <defs.h> .
 
In defs there is a type definition
 
typedef struct {
 int   iStep;
 char *sComments;
 } t_Item;
  
which is used in one function in AnalysisFunctions (where the error occurs).
 
I'm using LabWindows/CVI 8.0.1 and I'm trying to create a dll.
 
Thanks,
 
 
 
0 Kudos
Message 1 of 6
(4,666 Views)
Hi cortiz2,
 
LabWindows/CVI 8.5 help says the following: 'Type specifier is missing from a parameter declaration in a new-style (prototype) function declaration. Ensure that the function declaration is not mixing old-style parameter declarations with new-style (prototype) declarations.' It seems there's a mismatch in your header file so make sure you you can try saving last version of both .c and .h files and if the problems persists you should check your header file.
 
Hope this helps. Regards,
David Oña
0 Kudos
Message 2 of 6
(4,614 Views)
Thanks for your reply.
 
I read this help but I was not able to relate that with my problem.
I've repeat what I've done (eventually I decided to put this function in other .c file that it's used in the proyect but it is not the main one).
and the error has changed to "Error compiling "AnalysisFunctions.h" for DLL exports.Error in header file "AnalysisFunctions.h" at line 48, column 44:syntax error: found '*' expecting ')'. In line 48 appears a function that uses this type "int __stdcall GetSequence(t_Logic *signal,int iNum, char *seq); "
 
 
It seems as it does not recognize the parameter type  .
 
Regards
 
 
0 Kudos
Message 3 of 6
(4,605 Views)
Hi cortiz2,
 
Could you please post the prototype in AnalysisFunctions.h, the function definition in AnalysisFunctions.c and the whole sentence calling the function in your other .c file? It seems there's a parameter not expected when calling the function GetSequence.
 
I've noticed you've cretaed an structure called t_Item and that you use t_Logic as a parameter for GetSequence, does this have something to do with your problem? I don't know whether you've also defined an structure called t_Logic, that's why I'm asking. Furthermore, I think type char is not used as a pointer in Labwindows/CVI when calling a function - that might something to do with error: found '*' expecting ')'.
 
Regards,
David Oña
0 Kudos
Message 4 of 6
(4,597 Views)

Sorry,as I was having the same problem with two defferent types I tried to make a simplified example I should have mistake.This is the real one:

    
typedef struct {
 double Time;
 int Level;
 int Sync;
 char *Data;
} t_Logic; 

int __stdcall GetSequenceFromLogic(t_Logic *signal,int iNumLogic, char *seq);

About the char*, I don't think it is the problem because I have used it in others functions.

I'v etried, only to check

int __stdcall GetSequenceFromLogic(t_Logic signal,int iNumLogic, char *seq); and it says:

...found identifier expected ')'

Reagrds

 

0 Kudos
Message 5 of 6
(4,588 Views)

Hi cortiz2,

It look like a programming error, not a CVI error. This error use to take place when the function prototype in the .h file and the function definition in the .c file don`t match up. Compare that these three lines are the same:

-the line in your source code

-the line in the header file of the library

-the line in the source file of the library

Other reason could be you are using an undefined parameter type in the header file or in the source file. Check you have defined this parameter type in both files (source and header).

Regards,


0 Kudos
Message 6 of 6
(4,552 Views)