- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Im using 2 projects, "Fortran Windows Application" and "QuickWin", in one Workspace.
The Fortran Windows Application Project is for In- and Output purposes, the QuickWin for a calculation program. I have to use this QuickWin-Project to get two Graphics-Librarys(disp.lib and relp.lib)running.
And I get now the following Error:
dfor.lib(DFORMAIN.OBJ) : error LNK2001: unresovled external symbol _MAIN__
One of the Graphic Librarys(relp.lib) has several calls to this dfor.lib, but I dont know how to deactivate the dfor.lib
Is there a chance that I get the whole program running?
Here are some additional information:
Im using CVF Professional Edition 6.5.0
Link Settings for the projects:
1. Fortan Windows Application Project:
kernel32.lib c: empdisp.lib c: emp
elp.lib /nologo /subsystem:windows
/incermental:yes /pdb:"Debug/lt.pdb" /debug /machine:l386
/out:"Debug/lt.exe" /pdbtype:sept
2. QuickWin Project:
kernel32.lib c: empdisp.lib c: emp
elp.lib /nologo /entry:"WinMainCRTStartup
/subsystem:windows /incermental:yes /pdb:"Debug/cf.pdb" /debug /machine:l386
/nodefaultlib:"dfconsol.lib" /out:"Debug/cf.exe" /pdbtype:sept
Thanks toeveryboby, who can help me.
Alex
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
A QuickWin project cannot be a library - it must be an executable application. You could, I suppose, extend the user interface by adding Win32 calls, but QuickWin expects to see a Fortran main program (and not WinMain@16).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok thanks Steve, got that point.
is it then possible to generate a main program in QuickWin which calls the WinMain@16?
Something like:
program main
call WinMain( hInstance, hPrevInstance, lpszCmdLine, nCmdShow )
end program
When I try this, I get the errormessage:
main.obj : error LNK2001: unresolved external symbol _WINMAIN@16
Sorry for this perhaps stupid question but Im only programming for time to time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You won't be able to call it _WinMain@16, but I suppose you can have a subroutine which creates windows. You'd really want to have any message loops in their own thread, otherwise the QuickWin code wouldn't be able to execute.
Note that if you are trying to call WinMain, you will need a directive in the caller identical to the one in your WinMain routine. But don't bother - you'll just get another error from the linker if you do, since QuickWin supplies its own WinMain.
Note that if you are trying to call WinMain, you will need a directive in the caller identical to the one in your WinMain routine. But don't bother - you'll just get another error from the linker if you do, since QuickWin supplies its own WinMain.

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