- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've just tried to use the XE compiler 12.1.0.233 (32-bit) to rebuild my application that built fine in 11.1 and have a few "observations":
1) I get an error message "#6405 The same name entity from different modules and/or program units cannot be referenced [cb_routine]" when there are multiple calls to a external call back in a dialog type program. Code abstract given below:
module test
contains
subroutine dialog
use iflogm
include 'resource.fd'
! Declarations
type(DIALOG) :: dlg
:
:
external cb_routine
if(i.eq.0) then
call cb_routine(dlg,IDC_EDIT1,DLG_CHANGE)
else
call cb_routine(dlg,IDC_EDIT2,DLG_GAINFOCUS)
endif
if(DlgModal(dlg).eq.IOK) then
:
:
endif
end subroutine
! Other
end module
subroutine cb_routine(dlg,idc,idd)
use iflogm
include 'resource.fd'
! Declarations
type(DIALOG) :: dlg
integer :: idc,idd
:
:
end
If I dollar out one of the calls to cb_routine they error goes away. (OK in 64-bit version)
2) Internal complier error when trying to compile the Opengl statements:
use opengl_gl
type(T_BITMAPINFO) :: BitmapInfo
integer(BYTE),target :: Pixels(*)
pointer(pPixels, Pixels)
integer(Glenum) :: type = GL_TEXTURE_2D
integer :: err
call glTexImage2D(type, 0, 3, BitmapInfo%bmiHeader%biWidth, &
BitmapInfo%bmiHeader%biHeight, 0, &
GL_RGB, GL_UNSIGNED_BYTE, Pixels)
err = gluBuild1DMipmaps(type, 3, BitmapInfo%bmiHeader%biWidth, &
GL_RGB, GL_UNSIGNED_BYTE, Pixels)
err = gluBuild2DMipmaps(type, 3, BitmapInfo%bmiHeader%biWidth, &
BitmapInfo%bmiHeader%biHeight, &
GL_RGB, GL_UNSIGNED_BYTE, Pixels)
I suspect the last parameter "Pixels" is causing the problem. OK in 64-bit version
3) Linking gives the error:
"fatal error LNK1104: cannot open file 'libguide.lib', What is this? (Applies to both 32 & 64 bit versions)
4) How do you stop the message "remark #8290: Recommended relationship between field width 'W' and the number of fractional digits 'D' in this edit descriptor is 'W>=D+7'"?
Any recommended workarounds would be welcome.
Thanks in advance,
Steve
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2. We do not supply a module opengl_gl. Where did that come from?
3. You are linking in an object or library compiled with a pre-11.0 compiler that uses OpenMP. Please rebuild with a newer compiler.
4. You can correct your formats so that in a Ew.d, Dw.d or Gw.d so that "w" is large enough to contain all the digits. Or you can use /Qdiag-disable:8290 to turn off that message.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I willexplaina bit more and since my first post I have run into further difficulties mainly relating to IMSL. Isuspected this upgrading would be painfull experience.
1) My project is quite large so I will spend some time trying to create a simple example.
2) the opengl_gl is part of the f90gl package that you made available some time ago.
3) The libguide.liblibrary is called upfor IMSL in the code snippet:
!DEC$ IF DEFINED (IMSL)
INCLUDE 'link_fnl_static.h'
!DEC$ OBJCOMMENT LIB:'libguide.lib'
!DEC$ ENDIF
How do you interface with IMSL in XE version if this is no longer valid?4) I can't seem to get any Help documentation anymore. I get a web page saying"Start Here" but that just leads to a single dumb page with Optimization Notes.
5) When Installing IMSLI am asked if I want to make a copy of IMSL 6.0 but does not give any infromation as to what directory I should copy or why. On my laptop I ignored this but now I can't build the file which contains the code snippet included in3) above (I get acompiler error).
6) I want to be able tohave two sepatateProject Solutions (1 for 11.1 and one for XE 12.0) so that I can test the new one once it isworking but still having the safety net of the tried and trusted 11.1 available in case of problems. My current project is set up with six configurations (32-bit Debug/Release & Release with No Optimisation & the same for 64-bit). The source files are all stored in a none default project areaso that I could originally carry on using CVF of the same files.Although this CVF requirement has now gone I want to be able to do something similar with XE. I can simply copy the top level project folder and all subfolders and filesand this will sit alongside the original one. I've renamed the copied folder to
7) I have asubroutine thatis designed to intercept the windows SysCommand messages and in 11.1 I had to add an interface block within to get it to work.
integer function SysCommands(hWnd,mesg,wparam,lparam)
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_SysCommands@16' :: SysCommands
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS : 'SysCommands' :: SysCommands
!DEC$ ENDIF
!******************************************************************************
! Process Menu & Toolbar Commands
!******************************************************************************
use femglobals
use dfwin
use camera
implicit none
!include 'femwin.fi'
include 'resource.fd'
!
!! Interface
interface
integer function SysCommands( hWnd, mesg, wParam, lParam )
use dfwinty
integer(HANDLE) hWnd
integer(UINT) mesg
integer(UINT_PTR) wParam
integer(ULONG_PTR) lParam
end function
end interface
! Arguments
integer(HANDLE) :: hWnd ! Window Handle
integer(UINT) :: mesg ! Message
integer(UINT_PTR) :: wparam ! Message Parameter (1)
integer(ULONG_PTR) :: lparam ! Message Parameter (2)
This is now not allowed. If I remove it then compiling under 11.1 does not work.The SysCommand interfacerefers tothe API but has the same name as the Fortran so a naming conflict seems to be the likely cause. What is the correct way to do this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4. Ignore the "Start Here". You should see an index in the left column.
5. The instructions suggest you make the copy manually, but that's only if you want to keep the old version. Since you do, what I suggest is reinstall the older IMSL to a separate folder. You will need to change your 11.1 settings to reference the copy of the old IMSL's include and lib folders
6. The setting for which compiler version to use is not stored in a solution, it is in the registry for your username. I can't think of a way offhand to open a solution and automatically have it select a compiler version.
7. I don't recognize SysCommands. What is it? How does the code "not work"? It may be that you need to write an interface block for this routine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've now managed to solve all the problems. I just have to remember to switch compilers depending on which version I want to build. It probabyly would be better to creat new configurations in a single project. In doing so different compilers can be assigned to different configurations. Help has finally appeared as well after reinstallation.
Item 7 was down to dodgy programming from way back. It seems I declared an interface block inside a function with the same name. 11.1 allowed this but 12.1 does not. It was easily fixed by removing the interface block and declaring the function in the calling program.
Item 2 required some code rewriting. I tried to create a same example to demonstrate the compiler error but in the end time got the better of me and I reorganised the code relating to the problem function and associated modules.
In the past I recall that you didn't recommend switching to Visual Studio 2010 although now it seems that there are certain features that might be beneficial with Composer XE. What a the pros and cons of upgrading to VS 2010 (apart from the inevitable purchase price of upgrade)?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page