[cantera-users] Re: Re: A question about the MinGW-w64 compiler - 64bit option - further question: posix or win32 threading

92 views
Skip to first unread message

arief...@gmail.com

unread,
Jun 16, 2017, 12:06:29 PM6/16/17
to canter...@googlegroups.com

Hello Nick,

Many thanks!

Yes. I mistakenly installed the 32bit-version of the compiler (i686-w64-mingw32-gcc.exe).

Now I have the 64bit-version (x86_64-w64-mingw32-g++.exe). And everthing works fine now for my codes based on the third edition of Numerical Recipes in C++.

The recipe for installing the 64bit-version is as follows:

(A) Installation Directory:
C:\mingw-w64\

(B) Add to Path:
   C:\x86_64-7.1.0-posix-seh-rt_v5-rev0\mingw64\bin

(C) If you want to compile for 64-bit use 64-bit compiler:
   x86_64-w64-mingw32-g++.exe

(D) If you want to use the make utility:
   mingw32-make.exe

(E) To check if executable is 32bit or 64 bit:
  (1) Open the executable with a text editor.
  (2) Check the first printable characters after the first occurrence of "PE".
  (3) Here is what you're going to find:
          "PE  L"   ==> executable is 32bit
          "PE  d†"   ==> executable is 64bit

One further question:
When downloading the compiler there are two possibilities for the threading model :
(a) posix
(b) win32


Which one of these threading modeld must be selected to compile the CANTERA source?

Arief

From: Nick Curtis <arg...@gmail.com>
Date: Thu, Jun 15, 2017 at 3:24 PM
Subject: [cantera-users] Re: A question about the MinGW-w64 compiler - 64bit option
To: Cantera Users' Group <canter...@googlegroups.com>


i686-w64-mingw32-gcc.exe

is the 32 bit mingw compiler if I'm not mistaken.  Make sure that your g++ is pointing to the path you expect

Also, this may help: https://stackoverflow.com/a/38589950/1667311

Nick

On Thursday, June 15, 2017 at 7:51:39 AM UTC-4, Arief Dahoe wrote:

Dear Colleagues,

When I compile a test code with the MinGW-w64 compiler everything works fine with the options "cflags= -m32 -O3 -Wall"

But when I invoke "cflags= -m64 -O3 -Wall" then I'm getting the following error message:

g++ -m64 -O3 -Wall -c ../src/xtest.cpp
cc1plus.exe: sorry, unimplemented: 64-bit mode not compiled in
Makefile:12: recipe for target 'objxtest' failed
mingw32-make.exe: *** [objxtest] Error 1

I tried both executables in the compiler distribution: "g++.exe" and "i686-w64-mingw32-gcc.exe".

With both executables option "-m64" leads to the aforementioned error message.

Your help with resolving this is much appreciated.

Best Regards,
Arief Dahoe



Nick Curtis

unread,
Jun 16, 2017, 1:42:40 PM6/16/17
to Cantera Users' Group
Arief,

I don't think it should matter which threading model is selected.
I would probably choose the pthreads implementation as it offers Cxx11 multithreading features per your link (and will be more future proof)

Nick

arief...@gmail.com

unread,
Jun 17, 2017, 10:59:24 AM6/17/17
to canter...@googlegroups.com

Ok Nick,

Will continue with the posix variant.

Arief


From: Nick Curtis <arg...@gmail.com>
Date: Fri, Jun 16, 2017 at 6:42 PM
Subject: Re: [cantera-users] Re: Re: A question about the MinGW-w64 compiler - 64bit option - further question: posix or win32 threading
To: Cantera Users' Group <canter...@googlegroups.com>


Reply all
Reply to author
Forward
0 new messages