good evening everyone , I program using intel visual fortran (xe2018) with visual studio 2015 company, in my program I want to create a windows application and thus modify the menu bar according to my needs, and that by using (logical (4) initialsetting ()) As soon as I run my program, it shows me: - fatal error lnk1120 : unresolved external
- error lnk 2019 : unresolved external symbol _main_refercened in function _main libifcoremt.lib(for_main.obj)
please help me to solve this problem
In your Twitter message to me you said you were creating a QuickWin application. A QuickWin program must have a Fortran main program (starts with a PROGRAM statement or something other than SUBROUTINE, FUNCTION or BLOCK DATA). You don't have one.
I'll also suggest that when you report error messages you copy and paste them and not retype them, as you can introduce misleading changes.
Start a new project of the type "QuickWin Application". Use the source:
program hello print *, "Hello!" end
Build and run it to demonstrate how a QuickWin project builds and runs.
In your Twitter message you also mentioned INITIALSETTINGS, which is used in QuickWin applications. If you need more help, it would be best to attach a ZIP of your project, including sources, so we can see what you are doing.
finally the problem was in the no declaration of the library (IFQWIN) . now the programm work very well , thanks Dr for your help .
I have just a question plz, in my Quickwin application i would to personalize my bar menu (file ,edit,help ,......) but the probleme isi don't know what the command should i use to !!!
LOGICAL(4) resultt, result
TYPE (qwinfo) winfo
resultt=setwsizeqq (qwin$framewindow , winfo)
resultt=setwsizeqq (0, winfo)
end program PILE
logical(4) function initialsettings ()
EXTERNAL NewFile, OpenProjet, SaveProjet
result = APPENDMENUQQ(1, $MENUENABLED, '&File'C, NUL )
result = APPENDMENUQQ(1, $MENUENABLED, '&New'C, NewFile)
result = APPENDMENUQQ(1, $MENUENABLED, '&Open'C, OpenProjet)
result = APPENDMENUQQ(1, $MENUENABLED, 'Save &As'C,SaveProjet)
result = APPENDMENUQQ(1, $MENUENABLED, '&Exit Ctrl+C'C, WINEXIT)
END FUNCTION INITIALSETTINGS
Hi doctor, when i run the programme above it desplayed me :
1) error lnk2019 : unresolved external symbol_saveprojet referenced in function_initialsettings
2) error lnk2019 : unresolved external symbol_openprojet referenced in function_initialsettings
3) error lnk2019 : unresolved external symbol_newfile referenced in function_initialsettings
4) error lnk2019 : unresolved external symbol_appendmenuqq referenced in function_initialsettings
5) error lnk1120 : 4 unresolved externals
what do i have to do Dr ?
When you add menu items, you are naming a procedure to be called when someone selects that item. You have named at least three of these, OpenProjet, SaveProject and NewFile, that aren't in your source.
It would also seem, unless you changed the text of the error messages, that you have specified an option such as /names:lowercase, which causes other problems. Don't use such options.
Lastly, you need to add a USE IFQWIN in subroutine INITIALSETTINGS as well.
My suggestion is that you limit yourself to programming character-mode applications for a while. You can focus on the computational aspects of the task without wasting time on the GUI. If, furthermore, these applications are for just personal use, you have full control over input and output and you can keep the user interface parts simple.
It sounds as if you're asking us to write your program for you. You've chosen a method (QuickWin) that isn't as difficult as some other options, but it does require a basic understanding of Fortran programming including subroutines and functions. I pointed you at a document that explains this to some degree, but it may not be enough for you. In particular you want Controlling Menus. You could also look at the QuickWin samples in the Intel Parallel Studio XE for Windows Samples Bundle, but the only sample that really seems relevant to what you're doing, POKER, is quite complex.
The reason for APPENDMENUQQ being flagged as an unresolved symbol in #5 is probably that you did not have "USE IFWIN" in the function INITIALSETTINGS. Inserting that declaration will take care of that symbol. I do not know if the other unresolved procedures (NEWFILE, etc.) are contained in other source files supplied by you.
hello, the cause of all this is that you have to declare a menu routine that I will select as (WINPRINT: for the menu to print), or (WINSAVE: for the menu to save), but in the program there is a possibility not to put the routine and given only a name to the menu that I have to choose, like (Open), because the program that is already done, work like that, there's a possibility to do that but you have to declare with EXTERNAL, but I still can not understand how to do it.
the cause of all of this is you have to declare a menu routine that i that i will select as (WINPRINT:for the menu to print) ,(WINSAVE : for the menu to save), but in the program there is a possibilty to not to put the routine and given only a to the menu that i have to choose , like (open).
The programm i'm working on ,there is a possibility to do that but you have to declare with EXTERNAL . and i still can't understand how to do it .