linux - OMP Cross compilation with x86_64-w64-mingw32-g++ -
I have a problem with the crosscompling C ++ program which takes advantage of the OpenMP library. I'm using Linux Ubuntu 12.04 LTS. I want to get a executable file running on Windows
I have no problem compiling the program with OMP with a regular G ++ command: < / P>
G ++ a.cpp b.cpp -o OMPres -pg -O3-I./ CBAS / Include -L-LCLAS
In addition to this When I try the cross-compilation without OMP, then everything is alright:
x86_64-w64-mingw32-g ++ A CPPP BCP-O3-i / CBLS / Evening ./CBLAS/cblas_WIN64.a./BLAS/blas_WIN64.a-o res.exe -l gfortran -static
But when I croscipil with it with the OMP Try:
Include x86_64-w64-mingw32-g ++ a.cpp b.cpp -O3-I./CBLAS/ ./CBLAS/cblas_WIN64 .a. / BLAS / Blas_Wine 64.AO Operates.XA-L Bluff -STeetic -Fopmomp
I get this error: a.cpp: 41: 17: Fatal error: Omp.h: No such file or directory compilation was exhausted.
I've found that where the omp.h file is located on my disk, and added the path to the command after executing it:
x86_64-w64 Include -mingw32-g ++ a.cpp b.cpp -O3-I./CBLAS/- include / usr / lib / gcc / x86_64-linux-gnu / 4.6/ ./CBLAS/cblas_WIN64.a./ I got another error: x86_64 -w64-mingw32-g ++: error: libgomp .spec: No such file or directory I have this file on disk so I want to copy it to different places. Shish and then it worked when I copied it directly in the directory where the compilation. Then another error occurred:
/ usr / bin / x86_64-w64-mingw32-ld: can not be found - lgomp / usr / bin / x86_64-w64-mingw32-ld: no Can get -lrt collect 2: LD returns 1 exit status I do not understand how compilers work at all I try to update all the amingwow-w64 compilers That, which I could get with APT-cache search but nothing helped. I do not know what I can do: (.
First of all, @ nmair Right from the Ubuntu x86_64-w64-mingw32 toolchane is crippled, and that you can make the toolchain yourself.
I suggest that you use that which will allow you to manually prepare a GCC Saves time and its every dependency should be sufficient for the purpose of the following steps:
# MXE GIT Clause Do not receive https://github.com/mxe/mxe.git and CD MX # settings cat settings.mk MXE_TARGETS: = x86_64-w64-mingw32.static JOBS: = Create 4 EOF #GCC, libgomp, blas, and CLAS. It will take some time - add toolbar to j2 libgomp cblas # PATH #http: //htmlpreview.github.io/?https://github.com/mxe/mxe/ Blob / master / index.html # tutorial Step 4 Export View PATH = `pwd` / usr / bin: $ PATH # You do not need to see - I / CBLAS / include ./CBLAS/cblas_WIN64.a./BLAS/blas_WIN64 .a # Headers and libraries have been installed at standard location and # I already have `-lblblas -lblas` Used X86_64-w64-mingw32-g ++ a.cpp b.cpp -fopenmp -O3 -o res.exe -lcblas -lblas -lgfortran -lquadmath
Comments
Post a Comment