Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

error data type

diana_g_1
Beginner
1,585 Views

hello, the program give me en error on the subroutine

SUBROUTINE tteta (ttx,tty)
use ifqwin

INTEGER(2) line,ttx,tty
TYPE (xycoord) xy
CALL moveto(INT2(ttx+2),INT2(tty),xy)
line=lineto(ttx,tty+4)
line=lineto(ttx+7,tty+4)
line=lineto(ttx+5,tty)
line=lineto(ttx+3,tty)
CALL moveto(INT2(ttx),INT2(tty+5),xy)
line=lineto(ttx+2,tty+9)
line=lineto(ttx+5,tty+9)
line=lineto(ttx+7,tty+5)
END SUBROUTINE tteta

the error is:

warning #6075: The data type of the actual argument does not match the definition

where is the problem???

0 Kudos
16 Replies
TimP
Honored Contributor III
1,585 Views

Is this with warn-interfaces (the default in GUI mode)?  It would indicate an argument doesn't match your caller, or what is specified in ifqwin.

0 Kudos
Steven_L_Intel1
Employee
1,585 Views

In this case, all of the routines being called are defined in module IFQWIN. The arguments are all declared to be INTEGER(2),  but when you say something like tty+4, the 4 is "default integer" (integer(4)), so the expression becomes integer(4), and that's a mismatch.  To fix this, add the suffix _2 to all of the integer constants, for example, tty+4_2.  This specifies that the 4 (in this case) is to be integer(2).

0 Kudos
diana_g_1
Beginner
1,585 Views

ok perfect! problem number one solve! thank yuoi! 

now I have another question, I have to do a resource file .fd and I followed the 6 step, but the program give me the error:

error PRJ0019: A tool returned an error code from "Generating Fortran include file..." Project

I read the topic at this link http://software.intel.com/en-us/forums/topic/291937 but I haven't found a solution yet!

 

0 Kudos
Steven_L_Intel1
Employee
1,585 Views

Ah, that would be the "deftofd" tool. Would you please ZIP the buildlog.htm from the Debug folder and attach it to a reply here? If you would also include the .vfproj file, that would be helpful.

0 Kudos
diana_g_1
Beginner
1,585 Views

here it is! 

0 Kudos
Steven_L_Intel1
Employee
1,585 Views

Something very strange there. The error is that it is trying to process rett.h but your project says rett2.h. The latter exists, the former doesn't.

Please do a build > Rebuild and see if that helps. If not, please attach a zip of the new buildlog.htm

0 Kudos
diana_g_1
Beginner
1,585 Views

sorry I forgot this file resource.h  in the zip file

0 Kudos
diana_g_1
Beginner
1,585 Views

I recreate the project but the error was the same! I rebuild and:

0 Kudos
Steven_L_Intel1
Employee
1,585 Views

Diana,

You did not quite properly follow the instructions for adding the resource file to the project. It looks to me as if you started to do this, then renamed one of the files, as I can't otherwise figure out how you got the project in the state it's in. The resource.h file that is created by the dialog editor needs to be added to the project and then a custom build step defined for it. You had a custom build step attached to figure.rc.

I have attached a corrected .vfproj file, but I find that the resource.h and figure.rc files you provided are out of sync (the .rc is looking for an IDC_EDIT1 value that the .h doesn't define), and the .bmp is ,missing, but I think this should get you going again. Note that in the custom build step for resource.h I have the output file labeled figure.fd as that's what your code uses. The instructions are on page 81 of Using Intel Visual Fortran to Create and Build Windows Applications.

0 Kudos
diana_g_1
Beginner
1,585 Views

thank you Mr. Lionel you are my angel!!!!! I forgot to add the .h file and as you said I renamed the file after the building, then I tried to use the "deftofd" on the .rc file not on the .h file.

Now I add the resource.fd file in a subroutine and I call this subroutine trought a menu button 

external initrett

....

bret=appendmenuqq(2,$menuenabled,'Rettangolo'C,initrett)

....and the subroutine is

subroutine initrett
use ifqwin
use iflogm
type (dialog) dlg
real  b,h,xo,yo,alfa
logical(4) bret
integer(4) iret
character(25)  dato
include 'resource.fd'
bret=dlginit(idd_dialog1,dlg)

bret=dlgset(dlg,idc_edit2,'0')
bret=dlgset(dlg,idc_edit3,'0')
bret=dlgset(dlg,idc_edit4,'0')
bret=dlgset(dlg,idc_edit5,'0')
bret=dlgset(dlg,idc_edit6,'0')
bret=dlgset(dlg,idc_radio1,.true.)
bret=dlgset(dlg,idc_radio1,.false.)

iret=dlgmodal(dlg)
call dlguninit(dlg)
end subroutine initrett

the program start, but when I click on the "Rettangolo" menu button the program tell me:

Unhandled exception in 0x7782E8A1 (ntdll.dll) in g-aree.exe: 0xC0000005: Access violation when writing path 0x00150FFC.

0 Kudos
Steven_L_Intel1
Employee
1,585 Views

Would you please attach a ZIP of the whole project, including everything needed to build it? I'll take a look.

0 Kudos
diana_g_1
Beginner
1,585 Views

I don't understand what is wrong now...I'm a disaster...

0 Kudos
Steven_L_Intel1
Employee
1,585 Views

Hmm - I can't get this to fail. I pull up the Rettangolo option, it displays a new dialog. I type some things in the box and click OK, it goes away. I am not sure what it is supposed to do. If you run this in the debugger, can you see where in the progam it stopped when the error occurred?

0 Kudos
diana_g_1
Beginner
1,585 Views

what I have to do to run it from in the debugger??? I dont understand...sorry for my ignorance...

0 Kudos
mecej4
Honored Contributor III
1,585 Views

what I have to do to run it from in the debugger?

Choose the win32/Debug or X64/Debug configuration in Visual Studio.

I would suggest that, if you are going to run your program under the symbolic debugger, you turn off the /check options. I compiled your sources from the command line with the /Zi option, and the program was built with no error messages. The resulting EXE ran fine in the debugger up to a point -- I don't know what the program is supposed to do, whether the menu choices actually result in actions or the underlying source code is just a skeleton at this stage.

0 Kudos
diana_g_1
Beginner
1,585 Views

I read other topic to find something like my problem as:

http://software.intel.com/en-us/forums/topic/273908

http://software.intel.com/en-us/forums/topic/277220

but I didn't found a solution. I know the problem is in the line where I call the callback function that create the dialog box but I don't how to solve it

0 Kudos
Reply