Print

Print


Hi all
I have problem with linking my simple program...  Problem is in line with conversion...
I don't understand it :-(
Hep me with this please...
I'm using MS FPS 4.0
Thanks

Pavel Houdek

Output of linker>

Linking...
qwin.lib(qwkentry.obj) : error LNK2005: _WinMain@16 already defined in console.obj
qwin.lib(qwkentry.obj) : error LNK2001: unresolved external symbol _main
Debug/Input.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.


My program:

integer function WinMain( hInstance, hPrevInstance, lpszCmdLine, nCmdShow )
!MS$ ATTRIBUTES STDCALL, ALIAS : '_WinMain@16' :: WinMain
!To use win32 definitions
 use msfwin

 implicit none

 !Function parameters
 integer(4), intent(in) :: hInstance, hPrevInstance,nCmdShow,lpszCmdLine

 !Function returns and Window+Message Structure
 integer(4) :: iErr=0
 real(8)    :: nRead
 character (len=1024) :: szText=""

 read(szText, *, IOSTAT=iErr) nRead

end