Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
33 Views

LINK2019 LNK1120

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 

AREZKI

 

0 Kudos
13 Replies
Highlighted
Black Belt Retired Employee
33 Views

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.

--
Steve (aka "Doctor Fortran") - https://stevelionel.com/drfortran
0 Kudos
Highlighted
Beginner
33 Views

hi, 

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 !!!

AREZKI SALEM

0 Kudos
Highlighted
Black Belt Retired Employee
33 Views

You shouldn't have to name the library if you created the project properly. If you're building from the command line, use /libs:qwin.

I suggest you read 

--
Steve (aka "Doctor Fortran") - https://stevelionel.com/drfortran
0 Kudos
Highlighted
Beginner
33 Views

program PILE
     use dflib
     use ifqwin
     LOGICAL(4) resultt, result
     TYPE (qwinfo)    winfo
     open(0,file='user',title="PILECAL"C)
     ii=setactiveqq(0)
     winfo.type=qwin$max
     resultt=setwsizeqq (qwin$framewindow , winfo)
     resultt=setwsizeqq (0, winfo)
    end program PILE
    logical(4) function initialsettings () 
    LOGICAL(4)  result
    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)
INITIALSETTINGS= .TRUE. 
    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 ? 

AREZKI SALEM

0 Kudos
Highlighted
Black Belt Retired Employee
33 Views

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.

--
Steve (aka "Doctor Fortran") - https://stevelionel.com/drfortran
0 Kudos
Highlighted
Beginner
33 Views




0 Kudos
Highlighted
Beginner
33 Views

excuse me Dr , i am a student in geotechnics and programming is new for me , i didn't understand what i lust do to solve this probleme !!

Arezki Salem

0 Kudos
Highlighted
Black Belt
33 Views

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.

0 Kudos
Highlighted
Beginner
33 Views

it is for final studies project and it is very important that I managed to solve the problem, and in addition I must continue on a program already realize because and I put it in days. So if you can orient me on this case it would be awesome on your part
0 Kudos
Highlighted
Black Belt Retired Employee
33 Views

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.

--
Steve (aka "Doctor Fortran") - https://stevelionel.com/drfortran
0 Kudos
Highlighted
Black Belt
33 Views

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.

0 Kudos
Highlighted
Beginner
33 Views

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.

 

AREZKI SALEM

0 Kudos
Highlighted
Beginner
33 Views

Hi, 

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 .

AREZKI SALEM

0 Kudos