Referencing a function from outside as well as inside when creating a DLL

Referencing a function from outside as well as inside when creating a DLL

I am creating a DLL.

I have a function that will be referenced from outside as well as inside.

For it to be referenced from outside, I have used DLLEXPORT. But then the inside referenced don't link and conplain with LNK2001 error i.e. unresolved external symbol for that function.

How can I fix this situation? Please help!

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Just want to add to this that I am using ALIAS in the DLLEXPORT with the same name as the function name.

DLLEXPORTing the name shoudn't prevent referencing it from inside the DLL. However, if you used ALIAS (why?), you'd have to also use ALIAS in a declaration visible to any code that calls this routine - unless the routine was in a module in which case all you need do is USE the module.

Steve - Intel Developer Support

Leave a Comment

Please sign in to add a comment. Not a member? Join today