LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Building Error - Project Link Error

Hello,
I'm trying to create a very simple ActiveX-Server, but ist more difficult then I've thought...
I've opened my (very simple) existing project,
run the ActiveX-Wizard,
run the Edit_ActiveX tool (create a new Interface, a sample method, an object),
copy the "WinMain" function from the "_axs.h" file to my ".c" file and try to build it. But I get following error:

Project Link Errors:
Undefined symbol '_CaSrvrwqeInit@20' referenced in "Test.c".

But there is no reference in my Test.c?

The second problem is to "access" to my User Interface Object (e.g. "Text String").

My aim is to call a function which increase a counter and show this counter in this TextString. In addition comes that i would read this value and retu
rn it by the ActiveX-Server.
The buidling-error reads:

70, 40 Undeclared identifier 'PANEL_Number'.

(Number is my Constant name of the TextString)

I hope you can help me to solve this "easily" problems (I think they are easily, but I'm very new in programming CVI and ActiveX)

Regards

Markus
0 Kudos
Message 1 of 5
(3,630 Views)
Hello

For the first error, i think the CaSrvrwqeInit function is probably defined in test.h, but not in test.c, which would explain that error. Go ahead and implement the function in the C file ( doesnt have to do anything, you can leave it empty). Just make sure you follow the prototype in the header, other wise the compiler will error out.

For the second error, make sure you're using the correct name for the control. You can check this by opening up the UIR file, double clinking on the appropriate control, or by opening the UIR file and going to View >> Preview User Interface Header. This would give you a list of all the control names that the panel defines.
And make sure you've included the header for the UI in the file where you are planning to use the UI
control.

You might also want to check out this tutorial here.

I hope this helps


Bilal Durrani
NI
Bilal Durrani
NI
0 Kudos
Message 2 of 5
(3,630 Views)
Hi Markus,

I think you have created an object called CaSrvr... and added an interface called ...wqe... to it. You seem to have a method in the interface called ...Init. Note that when you do this you have to implement the method, meaning you have to write this function. The header file generated by the wizard will have the declaration for this function and you should copy it and write the code for the function in your .c file. The header file has comments about this step, but more instructions are given in the tutorial Bilal is refering to.

Best regards,
Mohan
0 Kudos
Message 3 of 5
(3,630 Views)
Hi,
many thanks to you, I've found my mistake...
But there's an other problem, and I can't find the solution....
I've created a new "activex testproject" with following:
Object: MyObject
Interface: MyInterface
Method: MyMethod

after the procedure said above (first thread) and trying to create a debuggable Executable I get following error:

Undefined Symbol '_MyObjectMyInterfaceMyMethod@4' referenced in "Test_axs.c".

I can't retrace the error... I can't imagine why there's an error (projekt link error) between the axs-file.

Best Regards

Markus
0 Kudos
Message 4 of 5
(3,630 Views)
Looks like this might be the same thing. Open up the Test_axs.c file and check to see if you have a function defined with the name MyObjectMyInterfaceMyMethod. It looks like the function prototype is there in the header, but it has not been defined in the C file. Try copying and pasting the function prototype into the C file , leaving any implementation empty, and try building again. If you get compiler errors about the function having to return something, just return any value.


Bilal
Bilal Durrani
NI
0 Kudos
Message 5 of 5
(3,630 Views)