- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to link some object files to create a executable file. The source code contains only fortran. the source files were compiled without any problem. But i am not able to link them as i am getting this error.
libifcoremt.lib(libifcoremain.obj) : error LNK2019: unresolved external symbol _
MAIN__ referenced in function _main
test.exe : fatal error LNK1120: 1 unresolved externals
any help would be very much appreciated
--kskr
libifcoremt.lib(libifcoremain.obj) : error LNK2019: unresolved external symbol _
MAIN__ referenced in function _main
test.exe : fatal error LNK1120: 1 unresolved externals
any help would be very much appreciated
--kskr
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This means that you do not have a main program, just subroutines. You will need a main program (starts with either a PROGRAM statement or something other than SUBROUTINE, FUNCTION, MODULE or BLOCK DATA.)
Most likely you need to create a main program that calls a subroutine.
Most likely you need to create a main program that calls a subroutine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve is on vacation, so let me answer.
Your .f file looks fine. Are you linking on the command line? If so you should try linking with ifort (it will call the Microsoft linker). If you are linking from inside Microsoft Visual Studio, make sure your project includes and builds all the files. For some custom advice you can file an issue at premier.intel.com with a complete test case (inluding build instructions or a complete project.
Wendy D.
Intel Developer Support

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page