LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Link error: Undefined symbol '_profi_get_cntrl_info' referenced in "main.c"

Solved!
Go to solution

Hello.

 

I am trying to solve my linking error problem for some days, but I cannot find the right answer. I have searched the forum already and read some threads with "undefined symbol link error" but they are not fitting to my problem.

 

What I try to do: I want to communicate with my Softing profibus card. I have includes all the header files in my source code and also I included the two .lib files to the project. But the mentioned error won't leave.

It is curiously enough when I choose "Go To Definition" in the context menu, CVI finds the right declaration in the right header file.

 

Who can help? What's wrong?

 

Best regards

der_Ben

0 Kudos
Message 1 of 9
(4,876 Views)

Hi Ben,

 

could you please provide a little more information about your system and software?

Which version of CVI are you using?

Could you take a couple of screenshots of the problem?

 

Regards,

0 Kudos
Message 2 of 9
(4,848 Views)

What are the lib files that you added? If you are using daqmx did you add daqmxbase.lib?

0 Kudos
Message 3 of 9
(4,844 Views)

Hello,

I am using WindowsXP an CVI2009 (but with CVI9.0 i am getting the same issue).

The *.lib files I included in the are "papi.lib" and "pbtools.lib" from softing profibus device driver.

Which informations I should give you more?

 

Regards,

Ben Schmitz

0 Kudos
Message 4 of 9
(4,771 Views)

Hi Ben,

 

thanks for the extra info. I haven't found any specific references to problems with profibus and CVI. This may mean that the problem is local to your PC. Does this work on any other machine? If you haven't tried it, that would be a good test to check whether it's a general or a local problem.

 

Regards,

0 Kudos
Message 5 of 9
(4,716 Views)

Does the the documentation show that either papi.lib or pbtools.lib provide a function or global variable called profi_get_cntrl_info ? If neither papi.lib nor pbtools.lib provide that , you will have find add another library that includes  profi_get_cntrl_info.

0 Kudos
Message 6 of 9
(4,691 Views)
Solution
Accepted by topic author Ben_Schmitz

Hey,

 

one of the LIB's provides this function, yes.

But now i got it. I've checked the "Build Options" and change the "Default calling convention" from "__cdecl" (must be default) to "__stdcall" and now everything works fine with that function.

 

I like to say thank you for your advices 😃

 

Regards

Ben

0 Kudos
Message 7 of 9
(4,667 Views)

Hi Ben,

 

thanks for posting the solution. I also added to our databases for future reference.

 

Regards,

0 Kudos
Message 8 of 9
(4,664 Views)

change the "Default calling convention" from "__cdecl" (must be default) to "__stdcall" ,I have more link errorSmiley Frustrated

0 Kudos
Message 9 of 9
(3,941 Views)