LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Link Error: "undefined symbol ' MessagePopup@8 referenced at "At71612.c"

I am getting Link Errors when I am trying to create DLL file from At71612.c, At71612.fp, At71612.h. The message that I am getting is:
At71612.prj(Debug) - 1 link error
undefined symbol ' MessagePopup@8 referenced in "At71612.c".
At71612.prj(Release) - 1 link error.

The program consists of following 'include' statements:
#include
#include
#include
#include
#include "At71612a.h"

Appreciate your urgent help. Thanks

swhamid
0 Kudos
Message 1 of 4
(3,061 Views)
Hi Swhamid,

If I understand you correctly, you are trying to create a DLL from your function panel (At71612.c, At71612.fp, and At71612.h) - when you're creating the DLL you get link errors with the above error message (undefined symbol). CVI's MessagePopup function is defined in userint.h which you have included in your code; are you perhaps redeclaring this function elsewhere? In what context are you using the function in At71612.c?

Thanks,
Ted F.
National Instruments
0 Kudos
Message 2 of 4
(3,061 Views)
Hi Ted,

This is exactly what I am trying to do i.e. to create a DLL from function panel. The piece of code where I am using the MessagePopup function is shown below:

int at71612a_check_instr_error_status (int instrumentID)
{
char *token;

if (at71612a_invalid_integer_range (instrumentID, 1, at71612a_MAX_INSTR, -1) != 0)
return at71612a_err;

Fmt (cmd, "%s<:SYST:ERR?");

if (at71612a_write_data (instrumentID, cmd, NumFmtdBytes ()) != 0)
return at71612a_err;

if (at71612a_read_data (instrumentID, cmd, 200) != 0)
return at71612a_err;


token = strtok (cmd, ",\n");
Fmt (&at71612a_err, "%d<%s", token);

token = strtok(NULL,"\n");
Fmt (errorstring, "%s<%s\n", token
);


if (at71612a_err != 0)
{
MessagePopup ("AT 71612A", errorstring);
return at71612a_err;
}

return at71612a_err;
}

This is the only function where I am calling the MessagePopup function.

I am not sure why CVI is giving me the Link error although it is compiling perfectly.

Can you throw some light on what are the reasons when CVI gives Link Errors?

Thanks

swhamid
0 Kudos
Message 3 of 4
(3,061 Views)
CVI, like all C compilers, gives "undefined symbol" link errors when you are using functions (in this case MessagePopup) that are not found in any linked in library or module. In this case, MessagePopup is defined in the CVI Run-time engine, so you must not be including the run-time engine when you compile. Go to Build->Target Settings... and make sure you have Full Run-time support selected. You probably have instrument driver only support selected.

Best Regards,

Chris Matthews
National Instruments
0 Kudos
Message 4 of 4
(3,061 Views)