For Programmers: Free Programming Magazines  


Home > Archive > Fortran > November 2004 > error link 2001???









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author error link 2001???
lorrie

2004-11-17, 3:59 pm

i get the following error in building:

Linking...
dfor.lib(DFORMAIN.OBJ) : error LNK2001: unresolved external symbol _MAIN__
Debug/ifdpar.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

any ideas??
beliavsky@aol.com

2004-11-17, 3:59 pm


lorraine100@hotmail.com (lorrie) wrote:
>i get the following error in building:
>
>Linking...
>dfor.lib(DFORMAIN.OBJ) : error LNK2001: unresolved external symbol _MAIN__
>Debug/ifdpar.exe : fatal error LNK1120: 1 unresolved externals
>Error executing link.exe.
>
>any ideas??


You probably do not have a main program. If source file xmain.f90 calls a
function in func.f90, you can create an executable with

df func.f90 xmain.f90

or you can create object files func.obj and xmain.obj with

df -c func.f90 xmain.f90

and then link to create an executable with

df func.obj xmain.obj

Other Windows compilers such as Lahey and Absoft also work this way.



----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com