Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29245 Discussions

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

Syed_R_
Beginner
541 Views

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!

0 Kudos
2 Replies
Syed_R_
Beginner
541 Views

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

0 Kudos
Steven_L_Intel1
Employee
541 Views

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.

0 Kudos
Reply