- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, all! I am using intel fortran on Windows. When I link I get the Error
1>libifcoremt.lib(for_main.obj) : error LNK2019: unresolved external symbol MAIN__ referenced in function main
1>x64\\Debug\\Console8.exe : fatal error LNK1120: 1 unresolved externals
What I am doing wrong? Project files with build log in attachments.
Thanks,
Dmitriy
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Trion,
the linker error simply tells you that you don't have a main program in your console application. So you must do something like this:
You can use the main program simply as a test driver if you want to.
Pedro
the linker error simply tells you that you don't have a main program in your console application. So you must do something like this:
[bash]program main
C call the subroutine vumat()
end program main
subroutine vumat(
C Read only -
1 nblock, ndir, nshr, nstatev, nfieldv, nprops, lanneal,
2 stepTime, totalTime, dt, cmname, coordMp, charLength,
3 props, density, strainInc, relSpinInc,
4 tempOld, stretchOld, defgradOld, fieldOld,
3 stressOld, stateOld, enerInternOld, enerInelasOld,
6 tempNew, stretchNew, defgradNew, fieldNew,
C Write only -
5 stressNew, stateNew, enerInternNew, enerInelasNew )
.
.
.[/bash] You can use the main program simply as a test driver if you want to.
Pedro
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I need to know how to do obj without main function, because this file is used in abaqus and in this program it doesn't work with it
I have tried to do bat file with paths to libriries, but it doesnt help me
Any idea what I can do about this?
I have tried to do bat file with paths to libriries, but it doesnt help me
Any idea what I can do about this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Trion,
When you say obj you mean generating the .obj files? If this is what you want you just need to compile the source code. Under the Visual Studio go to the menu build then compile. The .obj are generated during the compilation. The error you are getting is a linker error. So if you only need the .obj you don't need to perform the link. I hope this solve your problem.
Pedro
When you say obj you mean generating the .obj files? If this is what you want you just need to compile the source code. Under the Visual Studio go to the menu build then compile. The .obj are generated during the compilation. The error you are getting is a linker error. So if you only need the .obj you don't need to perform the link. I hope this solve your problem.
Pedro
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