mingw64 installation

137 views
Skip to first unread message

Fernando Acácio Monteiro dos Santos

unread,
Oct 13, 2016, 4:56:01 AM10/13/16
to dislin...@googlegroups.com

G'Day Helmut

sorry for not answer you about the question on pdf file and background lines (if you remember my email)..I'll back to that question later.

 

Now I have another question about the installation of the mingw64 compiler..

-I have installed  dl_10_mg package together with the mingw-w64 

(i686-6.2.0-posix-dwarf-rt_v5-rev1)

I've compiled the dislin file in the fg folder ....

I've read all emails in the user group about this subject and tried several things but I still get the same error  "undefined reference to.."


What am I doing wrongly?

Sorry to bother you with this and thanks for you patience

Best regards


The test program is:


use dislin
call swgtit('hh')
write(*,*)'sdsd'

stop
end

and got this




Fernando A. Monteiro Santos
________________________________
University of Lisbon - DEGGE-IDL
Campo Grande Ed. C8, 1749-016 Lisboa
Portugal
 

Helmut Michels

unread,
Oct 13, 2016, 6:51:46 AM10/13/16
to dislin-users
Hi Fernando,

I think that it is a mismatch of 32- and 64-bit components. Does your gfortran compiler create 32- or 64-bit applications?
Do you have installed the corresponding 32- or 64-bit distribution of Dislin for Mingw?

With best regards,

Helmut

fernando m santos

unread,
Oct 13, 2016, 8:04:22 AM10/13/16
to dislin...@googlegroups.com

Hi Helmut

The mingw-W64 seems to be for 32 and 64..actually, I do not know how to choose (if you have time take a look on it

https://sourceforge.net/projects/mingw-w64/) . I download Dislin 64 bits for sure…so, the trouble is probably in the compiler.

I will try to get another one…the gcc version 4.5.2, you used is not available any more but they have a new one.

Many thanks

 

Fernando A. Monteiro Santos

________________________________

University of Lisbon - DEGGE-IDL

Campo Grande Ed. C8, 1749-016 Lisboa

Portugal

Phone: +351 21750 0811

--
You received this message because you are subscribed to the Google Groups "dislin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dislin-users...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Helmut Michels

unread,
Oct 13, 2016, 8:27:38 AM10/13/16
to dislin-users
Hi Fernando,

the Mingw distribution below works on 32- and 64-bit Windows systems, but creates 32-bit applications. You have to install
the 32-bit distribution of Dislin for Mingw. I have tested it successfully.

With best regards,

Helmut

fernando m santos

unread,
Oct 13, 2016, 8:30:54 AM10/13/16
to dislin...@googlegroups.com

Dear Helmut,

I got the new TDM-GCC version (here I could cancel the 32b) and it is working now…

Many thanks for your help

Best regards

 

Fernando A. Monteiro Santos

________________________________

University of Lisbon - DEGGE-IDL

Campo Grande Ed. C8, 1749-016 Lisboa

Portugal

Phone: +351 21750 0811

website: http://www.igidl.ul.pt/santos.htm

 

 

From: dislin...@googlegroups.com [mailto:dislin...@googlegroups.com] On Behalf Of Helmut Michels
Sent: quinta-feira, 13 de outubro de 2016 11:52
To: dislin-users
Subject: Re: mingw64 installation

 

Hi Fernando,

--

Helmut Michels

unread,
Oct 13, 2016, 8:40:06 AM10/13/16
to dislin-users
Dear Fernando,

okay, that's another solution.

Best regards,

Helmut

Fernando Acácio Monteiro dos Santos

unread,
Oct 24, 2016, 5:48:10 PM10/24/16
to dislin...@googlegroups.com

Dear Helmut,

sorry to back again with these trivial(?) problems. I thought I had the MingW64 installed but it seems I have troubles somewhere. I can compile and run your examples exa_f90 and map_f90 without any trouble but when I try to run this example below I got an error of segmentation fault and I do not understand why? also I do not understand why the 32 lib(?) are called during the link..

Thanks for your patience and help.

Cheers


the teste.f90 file


real a(4)
integer num
character*40 FTM,fname
a(1:4)=22.8
x=19098.11
y=9876.09
nf=4
write(FTM,*)nf
write(*,'(f12.2,2x,f12.2,2x,'//adjustl(FTM)//'(F6.1,2x))')x,y,a(1:4)
ftm="pathvlf.txt"
fname=adjustL(ftm)
open(UNIT=14,file=fname,form='formatted',status='old')
read(14,'(i3)')num
write(*,*)num
write(*,*)ftm
close(14)
​stop
end

the file to open only contains two rows:

342
c:\Users\fer



and the error is:




Fernando A. Monteiro Santos
________________________________
University of Lisbon - DEGGE-IDL
Campo Grande Ed. C8, 1749-016 Lisboa
Portugal

De: dislin...@googlegroups.com <dislin...@googlegroups.com> em nome de Helmut Michels <mic...@dislin.de>
Enviado: 13 de outubro de 2016 13:40
Para: dislin-users
Assunto: Re: mingw64 installation
 

Helmut Michels

unread,
Oct 25, 2016, 3:25:20 AM10/25/16
to dislin-users
Dear Fernando,

your test program is linking with Dislin and the system libraries user32, gdi32 and opengl32 since you are using
the Dislin script f90link for compiling and linking. You can also call gfortran directly in the form

gfortran -o teste.exe teste.f90

if you don't have any Dislin routines in your code. I think that you will get the same result. By the way, the number 32
in user32, gdi32 and opengl32 is a little bit confusing. If you create 64-bit applications, the libraries will also have 64-bit
addresses.

I see nothing wrong with your program, but I would suggest to use the command

gfortran -o teste.exe  -g  -fcheck=all  -Wall  -fbacktrace  teste.f90   

for compiling and linking, and include the statement 'implicit none' into your code. Perhaps, you can get some
more hints what's going wrong. The code is running fine with my gfortran version.

With best regards,

Helmut

Fernando Acácio Monteiro dos Santos

unread,
Oct 25, 2016, 4:04:43 AM10/25/16
to dislin...@googlegroups.com

G'Day Helmut

Thanks for your quick response. I include the implicit none statement and compile with the debug option and the result is a bit frustrating since I did not get any information..

could I have any conflict with other programs? I have a Oracle virtual machine can this be the problem? I have tested also in a new laptop which has also the Oracle and I got the same trouble...I go to run teste.exe in other machines...

thanks

Best regards


  


Fernando A. Monteiro Santos
________________________________
University of Lisbon - DEGGE-IDL
Campo Grande Ed. C8, 1749-016 Lisboa
Portugal
Enviado: 25 de outubro de 2016 08:25

fernando m santos

unread,
Oct 25, 2016, 4:09:47 AM10/25/16
to dislin...@googlegroups.com

Dear Helmut

I move for a different computer and the program asked for the libgfortran_64-3.dll that I could not find..where is it?

Thanks

Cheers

Helmut Michels

unread,
Oct 25, 2016, 5:03:52 AM10/25/16
to dislin-users
Fernando,

I've made the compilation and linking again with another mingw distribiution (tdm-gcc 51, 64-bit) and got the same
segmentation fault as you. The crash happened in the open statement. It is a bug in the gfortran 5.1 version of tdm-gcc,
which causes a segmentation fault if an existing file is opened. The bug should be corrected in version 5.2.

With best regards,

Helmut

Am Dienstag, 25. Oktober 2016 10:04:43 UTC+2 schrieb fernando m santos:

G'Day Helmut

Thanks for your quick response. I include the implicit none statement and compile with the debug option and the result is a bit frustrating since I did not get any information..

could I have any conflict with other programs? I have a Oracle virtual machine can this be the problem? I have tested also in a new laptop which has also the Oracle and I got the same trouble...I go to run teste.exe in other machines...

thanks

Best regards


  


Fernando A. Monteiro Santos
________________________________
University of Lisbon - DEGGE-IDL
Campo Grande Ed. C8, 1749-016 Lisboa
Portugal

fernando m santos

unread,
Oct 25, 2016, 5:18:12 AM10/25/16
to dislin...@googlegroups.com

Many thanks for your help Helmut.

Let’s wait for version 5.2 or try a different compiler.

Fernando Acácio Monteiro dos Santos

unread,
Oct 25, 2016, 5:56:15 AM10/25/16
to dislin...@googlegroups.com

Helmut,

after your last email I went to tdm-gcc and follow some emails and this problem is reported for some people and also reported as solved..

https://sourceforge.net/p/tdm-gcc/bugs/270/


it seems that the problem is in the libfortran_64-3.dll (that I finally found).  Someone reports that the problem is solved if the 5.1 file is changed by the 4.9 version...but he does not allow to install 4.9 version since there is  a new one...

I'll continue trying.

Cheers



Fernando A. Monteiro Santos
________________________________
University of Lisbon - DEGGE-IDL
Campo Grande Ed. C8, 1749-016 Lisboa
Portugal
 
Enviado: 25 de outubro de 2016 10:03

Fernando Acácio Monteiro dos Santos

unread,
Oct 26, 2016, 6:50:04 PM10/26/16
to dislin...@googlegroups.com

G'Day Helmut,

after the problems with the mingw64 I want to use a different compiler. Just a question: is DISLIN (dl_10_ic.zip​) compatible with Microsoft Visual Studio 2010 ?

Many thanks for your time

Best regards


Fernando A. Monteiro Santos
________________________________
University of Lisbon - DEGGE-IDL
Campo Grande Ed. C8, 1749-016 Lisboa
Portugal
 
Enviado: 25 de outubro de 2016 10:03

Helmut Michels

unread,
Oct 28, 2016, 2:17:33 AM10/28/16
to dislin-users
Fernando,

I think that you want to use the Intel Fortran compiler for Dislin from MS Visual Studio. Yes, this is working. Note, that are
again 32- and 64-bit distributions of Dislin for Intel Fortran for creating 32- and 64-bit applications.

With best regards,

Helmut


Am Donnerstag, 27. Oktober 2016 00:50:04 UTC+2 schrieb Fernando Acácio Monteiro dos Santos:

G'Day Helmut,

after the problems with the mingw64 I want to use a different compiler. Just a question: is DISLIN (dl_10_ic.zip​) compatible with Microsoft Visual Studio 2010 ?

Many thanks for your time

Best regards


Fernando A. Monteiro Santos
________________________________
University of Lisbon - DEGGE-IDL
Campo Grande Ed. C8, 1749-016 Lisboa
Portugal

fernando m santos

unread,
Oct 28, 2016, 8:32:01 AM10/28/16
to dislin...@googlegroups.com

Hello Helmut,

Many thanks, I will try.

Fernando Acácio Monteiro dos Santos

unread,
Nov 7, 2016, 5:17:07 PM11/7/16
to dislin...@googlegroups.com

Dear Helmut,

sorry to back you. As I told you I tried to use the microsoft visual studio 2010 and the Intel fortran. After some fight to run a short program including dislin I arrived at the point where I got the "fatal error LNK1561:entry point must be defined" .

I read quite a lot about this but I did not succeed finding a solution. I think this should be related with the visual configuration but I did not get the point. 


I tried to use the command line ifort  but it is not recognized...


I greatly appreciate any suggestion to overcome these troubles.

Once more, many thanks for your patience and time

Best regards 


Fernando A. Monteiro Santos
________________________________
University of Lisbon - DEGGE-IDL
Campo Grande Ed. C8, 1749-016 Lisboa
Portugal
Enviado: 28 de outubro de 2016 07:17

Helmut Michels

unread,
Nov 8, 2016, 3:04:12 AM11/8/16
to dislin-users
Dear Fernando,

for using the Intel compiler from MS Visual Studio you can do the following:

   -  Create a new Project
   -  select Intel Visual Fortran
   -  select Console Application and create an empty project
   -  Add a new item to your project and select Fortran Free Source or Fortran Fixed Source
   -  type your Fortran code, or include your Fortran code into the file
   -  execute Build for compiling and linking your code 

There should be two command prompts installed with your Intel Visual Fortran compiler, where you can run
the compiler from the command line for creating 32- and 64-bit applications. Take a look at the Intel compiler entry
of your Start menu. There should be the item ' Compiler and Performance Libraries'  and then 'Command Prompt with
Intel Compiler ...'.

With best regards,

Helmut


Am Montag, 7. November 2016 23:17:07 UTC+1 schrieb Fernando Acácio Monteiro dos Santos:

Dear Helmut,

sorry to back you. As I told you I tried to use the microsoft visual studio 2010 and the Intel fortran. After some fight to run a short program including dislin I arrived at the point where I got the "fatal error LNK1561:entry point must be defined" .

I read quite a lot about this but I did not succeed finding a solution. I think this should be related with the visual configuration but I did not get the point. 


I tried to use the command line ifort  but it is not recognized...


I greatly appreciate any suggestion to overcome these troubles.

Once more, many thanks for your patience and time

Best regards 


Fernando A. Monteiro Santos
________________________________
University of Lisbon - DEGGE-IDL
Campo Grande Ed. C8, 1749-016 Lisboa
Portugal

Fernando Acácio Monteiro dos Santos

unread,
Nov 11, 2016, 4:27:51 AM11/11/16
to dislin...@googlegroups.com

G'Day Helmut,

many thanks for your email and suggestions. Unfortunately I still have troubles ..for example, I got the error below when try to run in the command windows. 

Any suggestion?

Thanks for your time and patience

Best regards



Fernando A. Monteiro Santos
________________________________
University of Lisbon - DEGGE-IDL
Campo Grande Ed. C8, 1749-016 Lisboa
Portugal
Enviado: 8 de novembro de 2016 08:04

Helmut Michels

unread,
Nov 11, 2016, 5:04:00 AM11/11/16
to dislin-users
Hi Fernando,

it looks like that the environment variable DISLIN is not defined. However, you can use the Intel compiler directly
instead of the Dislin link script f90link:

   -   open the command prompt of your Intel compiler
   -   change to the \DISLIN\ifc subdirectory and give the command:
       ifort -c  dislin.f90
       this creates a dislin.mod file that corresponds to your compiler version
   -   change to the \DISLIN\examples directory and give the commands:
       ifort -c  -I\DISLIN\ifc   exa_f90.f90                  for compiling
       ifort  exa_f90.obj   \DISLIN\disifl.lib   user32.lib    gdi32.lib          for linking

The keywort DISLIN in the commands above means the path to your Dislin installation.

With best regards,

Helmut

 


Am Freitag, 11. November 2016 10:27:51 UTC+1 schrieb Fernando Acácio Monteiro dos Santos:

G'Day Helmut,

many thanks for your email and suggestions. Unfortunately I still have troubles ..for example, I got the error below when try to run in the command windows. 

Any suggestion?

Thanks for your time and patience

Best regards



Fernando A. Monteiro Santos
________________________________
University of Lisbon - DEGGE-IDL
Campo Grande Ed. C8, 1749-016 Lisboa
Portugal

fernando m santos

unread,
Nov 11, 2016, 5:36:56 AM11/11/16
to dislin...@googlegroups.com

Dear Helmut,

Many thanks..

I have the environmental variable defined but probably in a wrong way. I will try to follow your suggestion later (I do not have here the computer where intel is installed) and I will let you know about the results.

Many thanks for your attention

Fernando Acácio Monteiro dos Santos

unread,
Nov 11, 2016, 12:24:10 PM11/11/16
to dislin...@googlegroups.com

Dear Helmut,

Just to tell you that it works for the example...I will try with my programs (but should work) soon..

Many thanks for your help

Best regards



Fernando A. Monteiro Santos
________________________________
University of Lisbon - DEGGE-IDL
Campo Grande Ed. C8, 1749-016 Lisboa
Portugal
 
Enviado: 11 de novembro de 2016 10:04
Reply all
Reply to author
Forward
0 new messages