Thanks for the quick answer.
It looks like I wasn't clear enough about the problem.
Some detail I forgot:
-My OS is windows 7
-I use Silverfrost FTN95
And about my problem:
I try to recreate an existing program but:
-I'm only able to edit some subroutines and functions, so I don't have the original main program.
-Instead I have a *.lib library file and *.res compiled resource scrypt.
-So I have to create a Windows .exe by compiling some *.for files containing only subroutines and functions, then linking the created *.obj files, a *.lib file and a *.res file together.
My attempts so far:
-I used Intel Visual Fortran's trial version, and it worked by runing the following BATCH file:
@SET IFORT_COMPILER90=C:\\Program Files\\Intel\\Composer XE 2013 SP1
@SET INTEL_SHARED=C:\\Program Files\\Common Files\\Intel\\Shared Files
@SET INTEL_LICENSE_FILE=C:\\Program Files\\Common Files\\Intel\\Licenses
@SET PATH=%IFORT_COMPILER90%\\Bin\\ia32;%INTEL_SHARED%\\Ia32\\Bin;%PATH%
@SET LIB=%IFORT_COMPILER90%\\compiler\\lib\\ia32;%LIB%
@SET INCLUDE=%IFORT_COMPILER90%\\compiler\\Include;%INCLUDE%
ifort /nologo /O3 /align:dcommons /winapp /c *.for
link /out:'MyProg.exe' /incremental:no /nologo /subsystem:windows *.obj GivenLibrary.lib GivenResource.res
del UserSub.lib
del UserSub.exp
pause
-I want to continue the work whit this project, so I changed to Silverfrost FTN95, but I found that SLINK doesn't accept *.res files, instead it accepts a .obj file generated by Salford Resource Compiler from a .rc file.
-So I wanted to decompile the compiled resource scrypt (.res) into a resource scrypt (.rc) so I had an input file to Salford Resource Compiler. (Maybe this step caused some demage, so the linker doesn't find the WinMain function.) I generated the *.rc file from the .res file by ResEdit. This resource editor placed some include statements to the beginning of my resource scrypt (.h header files)
-Then I used Salford Resource Compiler by placing my resource file in the c:\Program Files\Silverfrost\FTN95\include\WIN32 directory and run SRC (Otherwise it wouldn't find the header files.) and it created an object file from the *.rc file without any errors.
-After this I tried to link my subroutine's *.obj, the resource's *.obj and the supplied *.lib files with SLINK and that caused the mentioned error:
...
[Silverfrost SRC/WIN32 Ver 3.65 Copyright (c) Silverfrost Ltd 2012]
NO ERRORS [<WINTEMPOSRC/WIN32 Ver 3.65]
c:\\Programing\\Fortran\\CT\\Dokumentacio\\other_comp\\System_silver>SLINK /OUT:'MyProg.exe' /SUBSYSTEM:WINDOWS Subroutine.OBJ CompiledResouce.OBJ GivenLibrary.LIB
*** No main, WinMain or LibMain function
...
So my aim is to link *.obj files whit a *.lib and a *.res file.