industrialNETworXnetx

Dennis Lickay

Dennis Lickay

Hirschmann Automation and Control GmbH

| 07.07.2010 | 10:41 | 3 replies

Link error LNK2019 symbol "_xDriverRestartDevice" not found

Hello,

I'm trying to write a C/C++ Windows application using cifx32DLL.dll (+.lib file) and got the error that xDriverRestartDevice symbol is not found when linking. I had the same problem with all other methods of the driver until I included "windows.h". Do somebody know what I'm doing wrong?

My setup:

- Windows 7
- Visual C++ 2005 Express Edition
- Project type: DLL project

Regards!

M T

M T

Hilscher Gesellschaft für Systemautomation mbH

| 08.07.2010 | 07:29

Hi,

First of all when you include "cifXUser.h" for the cifX functions you will need Windows.h which provides the APIENTRY define, which declares the calling conventions for these functions. But as usually every Wizard-Generated Application includes the Windows-Headerfiles it should already be in your project.

If you do not include "Windows.h" and "cifXUser.h" Headerfile undefined references may happen as calling conventions, improper name mangling, prototype conflicts and other things may happen.

You don't write which version of the lib and driver you are using. Probably this is an old lib file which does not yet contain this function (which is unlikely as starting with Windows Driver 0.931 this function is available).

 

You usually don't need this function anyway.It was introduced to allow tools like SYCON.net and cifXSetup to physically restart devices by restarting the Kernel Mode Driver internally. A user usually only uses xChannelReset / xSysdeviceReset to reset devices. So you could try to comment out the function call in your code first of all to see if this fixes the problem.

 

Regards

MT

Dennis Lickay

Dennis Lickay

Hirschmann Automation and Control GmbH

| 08.07.2010 | 10:31

Hello MT,

thanks for you answer!

The version of the cifx Driver is 0.936
How do I retrieve the version of the Library?

I will try to reset the channel only!

Regards!

M T

M T

Hilscher Gesellschaft für Systemautomation mbH

| 08.07.2010 | 13:46

There is no possibility to read the version out of a lib file. The only way to determine this, is to know where it came from. If you copied it from cifX Driver 0.936 it is from this version and should contain the xDriverRestartDevice function.

If you copied it from somewhere else it might not contain it.

 

Regards

MT

Login