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

Fortran DLL in VS2019

Alexei
Beginner
1,024 Views

Hi all,

I am trying to build a fortran dll using VS2019 and get "fatal error LNK1561: entry point must be defined". I have tried all the solutions suggested here but none work. The funny thing is that if I create a "Dynamic-link Library with sample code (fortran)" in VS2019 the result of this code's compilation is exactly the same, - "fatal error LNK1561: entry point must be defined". 

 

Any ideas what I am doing wrong?

 

Thank you for your help.

0 Kudos
1 Solution
Steve_Lionel
Honored Contributor III
977 Views

You get that error when the /DLL link option is missing from the linker command line. Another user reported a similar problem, but I have not been able to duplicate it. It's really odd that you get this in the sample project.

Make sure you are using the latest Intel version. If nothing else, right click on the project, select Properties > Linker > Command Line. For each of the combinations of Configuration and Platform, if /DLL is not at the end of the command line displayed, type it in under Additional Options.

View solution in original post

0 Kudos
3 Replies
mecej4
Honored Contributor III
983 Views

You probably did not specify which symbols you want the DLL to export. Since I am unlikely to try "all the solutions suggested here but none work", perhaps you can attach the file Buildlog.htm that should have been produced as a result of your build attempt, and then we could make suggestions. 

You could also look at the project properties and display the Fortran compiler and linker command lines, and include them in your reply.

0 Kudos
Alexei
Beginner
979 Views

Black Belt,

Thank you for your reply! I still don't understand why and how but the solution is much simpler. When specifying Platform in "Solution Properties" one not only have to specify and use  "x64" platform (which I did) but also has delete "x32" (which I did not do before). After that everything started working/compiling.

0 Kudos
Steve_Lionel
Honored Contributor III
978 Views

You get that error when the /DLL link option is missing from the linker command line. Another user reported a similar problem, but I have not been able to duplicate it. It's really odd that you get this in the sample project.

Make sure you are using the latest Intel version. If nothing else, right click on the project, select Properties > Linker > Command Line. For each of the combinations of Configuration and Platform, if /DLL is not at the end of the command line displayed, type it in under Additional Options.

0 Kudos
Reply