Basically the line of code
extern char *strlwr OF((char *s));
gives the error
warning C4273: 'strlwr' : inconsistent dll linkage
and I don’t know why. It’s not my code so I’m having issues figuring out how to fix it.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
look for:
attached to declarations for strlwr. It is something to do with that.
Basically when you declare strlwr in the dll itself, e.g. when the header containing strlwr is read by code compiled into the .dll it should be declared export.
When code that calls the dll reads the header, it should be declared dllimport.
I tend make macro blocks like:
Then for all the symbols in a header which is part of the dll interface I declare those symbols with DLL_IFACE. When the header is read by dll code, I start the .cpp file with “#define DLL_IFACE_EXPORT”