K8055 coding help!

Hi all,

I’m currently using my k8055 to run an electric motor, which triggers when certain thresholds are met in a racing simulation game. I’ve been given the dll file to do so, and the source and header files which were used to compile the dll. I’ve dropped the dll file into the appropriate folder, and the k8055D_C dll into the windows directory and it all works fine.

Next I wanted to try and alter the code in order to add a few more features into the plugin and activate a few more digital outputs on the board when other thresholds are met… I used a visual express c++ 2010 project template which was used to create the original dll, and substituted the source and header files for the ones that were given to me. When I tried to compile to see if i could duplicate the plugin before I began altering code, it gave me the following error:

1>------ Build started: Project: ExamplePlugin, Configuration: Debug Win32 ------
1> Creating library .\Debug/ExamplePlugin.lib and object .\Debug/ExamplePlugin.exp
1>DLL_Calls.obj : error LNK2019: unresolved external symbol __imp__ClearAllDigital@0 referenced in function “void __fastcall ResetDigital(void)” (?ResetDigital@@YIXXZ)
1>DLL_Calls.obj : error LNK2019: unresolved external symbol __imp__ClearAllAnalog@0 referenced in function “void __fastcall ResetAnalog(void)” (?ResetAnalog@@YIXXZ)
1>DLL_Calls.obj : error LNK2019: unresolved external symbol __imp__OpenDevice@4 referenced in function “void __fastcall ConnectToHardware(void)” (?ConnectToHardware@@YIXXZ)
1>DLL_Calls.obj : error LNK2019: unresolved external symbol __imp__SetDigitalChannel@4 referenced in function “void __fastcall SetDigital(long)” (?SetDigital@@YIXJ@Z)
1>DLL_Calls.obj : error LNK2019: unresolved external symbol __imp__ClearDigitalChannel@4 referenced in function “void __fastcall ClearDigital(long)” (?ClearDigital@@YIXJ@Z)
1>DLL_Calls.obj : error LNK2019: unresolved external symbol __imp__OutputAnalogChannel@8 referenced in function “void __fastcall SetAnalog(long,long)” (?SetAnalog@@YIXJJ@Z)
1>DLL_Calls.obj : error LNK2019: unresolved external symbol __imp__CloseDevice@0 referenced in function “void __fastcall DisconnectFromHardware(void)” (?DisconnectFromHardware@@YIXXZ)
1>.\Debug/ExamplePlugin.dll : fatal error LNK1120: 7 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Could this be due to the fact that the project is not referenced to the K8055 plugin/library, and if so, how can I go about fixing it?

Kind regards,

Julian

P.S. I’m relatively new to all this!!

It seems that you are using the old version of the software package for the K8055.

You may try the latest package.
Here is the link to download latest software package for the K8055:
velleman.eu/distributor/supp … code=K8055
Download the: “[color=#000080]Complete SDK Pack (Rev 4.0)[/color]”.

The package includes new K8055D.DLL and sample projects written in various programming languages. - There is included an example project written in Visual C++ 2008 Express. It should convert to 2010 version when opened.

Pleas read the “README.TXT” and the “K8055 & VM110 Getting Started.pdf”.

Hmmm I’ve read all that before and looked at the example but still feeling very lost. What would I need to substitute on my code to make it compatible with the new software or would I need to re write the whole code?

If you get the new example code working then you can modify it according to your original code.
Indeed, you have to rewrite some code in this case…

But in the case of the example it outputs an exe file whilst in my case I want it to output a dll file? Would that involve heavy modifications?

Maybe you can use your original DLL source code to create the DLL.
Now there is no .LIB file available for the K8055D.DLL.
You have to use an explicit DLL linking to link the K8055D.DLL to your DLL code.
See: http://msdn.microsoft.com/en-us/library/784bt7z7.aspx

Here you can download a Visual C++ 2010 Express example how this kind of linking can be done in the DLL source code:
box.net/shared/mfdzysoul9m7nysai38r

There in the package is also an application software example using this example DLL.

I managed to get the fulll project from a friend and all that’s left is referencing the lib file to the correct directory. I had a look in all the properties but I can’t see any reference to the .lib file, in order to replace it with the new directory. When I debug the code it gives me the following error…

1>------ Build started: Project: RJ1, Configuration: Debug Win32 ------
1>LINK : fatal error LNK1181: cannot open input file ‘…\Visual Studio 2008\Projects\RJ K8055 Testbench\RJ K8055 Testbench\K8055D_C.lib’
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Now a) how can I find out the full path of the input file in order to mimic it OR b) how can I find out where that information is in the properties in order to change the path to an existing one?

Thanks