K8055N C++ library

Hi

I’m having some difficulties getting my 8055 to communicate through Codeblocks C++
I somehow found (somewhere in french) instructions on how to link the library and include the header file from the VC++2005.zip, that worked or well, the implementation works ! but since this is using an older version of the DLL (2.x) i don’t get any communication. The K8055N works just fine with the demo v5.0.x so the hardware is fine, but i cannot find a .lib file that matches the format included in VC++2005.zip How can i create or find one, because i am sure that would fix my problem.

Rishi.

[quote]but i cannot find a .lib file that matches the format included in VC++2005.zip[/quote] I’m sorry, there is no .LIB file for the Microsoft C++.
You may use run-time dynamic linking: http://msdn.microsoft.com/en-us/library/windows/desktop/ms686944(v=vs.85).aspx
You can also use the Platform Invocation Services, PInvoke, that enables to call C-style functions in DLLs. See K8055DemoVC_2008 how to use the DllImport Attribute. For more info: “Calling Native Functions from Managed Code”: http://msdn.microsoft.com/en-us/library/ms235282(v=vs.110).aspx
Alternatively you can use the GetProcAddress function to retrieve the address of an exported function from the DLL.
Please see the demo in the subfolder K8055DemoDevC.

Here some more info: viewtopic.php?f=3&t=6069

Ok Thanx,

i’m gonna try what you suggest, although it does seem rather complicated for me to master in an environment that i am not fully at home in yet. Getting back into programming after 20 yrs and not having full tutorials does stretch my abilities to the max. I was so happy when i found the implementation using the v2.0 .DLL but then i remembered why it didn’t work since the newer firmware is not backwards compatible (as normal) Somehow though if the .LIB file was included with the v2.0 .DLL i don’t really see why it is not included with the v5.0 or even that it can be included now, it should be hard to do for the software developer, or should it ? (probably not more then 10 mins work, while i’ll be crunching my head for hrs without a garantee of result.
anyway those are my thoughts, of course the easiest solution is when someone does it all for me :wink:

So actually, just to get this straight, in 2006 the software that came with board included a file that delivers what the advertising promises. In a host that supports calling functions from a DLL, one can write their program calling functions within this DLL. Then came firmware update and software updates, and somehow now with the recent version of the software, this is not really possible anymore unless you are either a dedicated programming hobbyist or professional programmer/developer and/or own an expensive software package (because then there are working examples included and even excel is not free !) but i thought Velleman was aiming for starting electronics hobbyist…

Ok if i relax and calm a little i may have found a solution, i can import a DEV project in codeblocks, but i am sure you can understand my frustration, as i can understand why you put ‘No swearing on the forum’ so dominantly on the first page :smiley: … i still think the .LIB file should be included. bedtime now, work tomorrow.