- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello!
I would like to build an executable file (*.exe)by using the subroutine below.
subroutine hypela(d,g,e,de,s,temp,dtemp,ngens,n,nn,kc,mats,ndi,nshear)
implicit real*8 (a-h,o-z)
include '/msc/marc2003/common/concom' dimension e(1),de(1),temp(1),dtemp(1),g(1),d(ngens,ngens),s(1) dimension n(2) if (ncycle.eq.0) epsend=e(1) if (ncycle.gt.0) epsend=e(1)+de(1) c1=1.0d0 c2=2.0d4 d(1,1)=c1+2.0d0*c2*epsend s(1)=c1*epsend+c2*epsend*epsend return endWhen I build the solution, I see the following errors:
Error1 error LNK2019: unresolved external symbol _MAIN__ referenced in function _mainlibifcoremt.lib
Error2 fatal error LNK1120: 1 unresolved externalsDebugConsole6.exe
Does anyone have an idea about what theproblem can be?
Thanks!
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You cannot build an executable from just a subroutine - you need a main program which calls the subroutine, passing it the necessary data.
You can build a DLL if you want which can then be used by a separately compiled program. Read the on-disk documentation for information on building libraries and DLLs.
You can build a DLL if you want which can then be used by a separately compiled program. Read the on-disk documentation for information on building libraries and DLLs.

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