DLL linking in Watcom
Basically I'm pretty clueless about DLLs. I know the theory, it's just linking to the functions in the DLL and using them that has me baffled.
This is my first attempt to do this, and it is proving to be more difficult than I imagined. I think part of my problem may be some strange name mangling on Watcom's part.
But what I really need is an overview of what is required to link to a DLL and utilize it. How is it usually done? What are my options?
I'll ask more specific questions later.
Links to pertinent information always welcome.
with each dll an lib file is supplied.
you link this file as if it is static library.
That's all. The only difference from using static library - this supplied lib file does not contain actual functions, but for the caller this is of no interest
I am linking the .lib file, and including the .h file where appropriate. Yet I still get an 'undefined reference' error when linking. I don't think Watcom is able to match up the names of the exported .dll functions to what it is expecting them to be called...
After trying everything I could think of to get this to link, I gave up.
However, I did manage to get this to work by using LoadLibrary() and GetProcAddress().
I then call the functions by using their address. Seems to work so far; will test tonight when I can actually hook up the hardware and see results.