Windows : Visual Studio dengan Intel C++ Compiler
Ketika kompilasi, salah satu issue yang didapat adalah tidak dapat meng-include pthread.h, pthread.h dapat didapatkan di [1].Sesudah masalah pthread.h beres, tinggal mengedit Additional IncludeDirectories untuk memasukkan header-header MKL (Math Kernel Library).
Entri nya menjadi :
C:\Program Files (x86)\Intel\Composer XE 2015\mkl\include;D:\software\pthreads-w32-2-9-1-release\Pre-built.2\include;%
Masalah utama sekarang adalah, ada beberapa header yang tidak terdapat di windows, yaitu :
sys/sysinfo.h , sys/systime.h, sys/resource.h
Berikut error lengkap ketika proses kompilasi :
Error 1 error MSB6006: "icl.exe" exited with code 4. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Platforms\Win32\PlatformToolsets\Intel C++ Compiler XE 15.0\Toolset.targets 327 5 TIM-OS
2 IntelliSense: cannot open source file "sys/sysinfo.h" d:\!Photodinamic\TIM-OS\TIM-OS\TIM-OS\TIMOS.cpp 29 1 TIM-OS
3 IntelliSense: cannot open source file "sys/time.h" d:\!Photodinamic\TIM-OS\TIM-OS\TIM-OS\TIMOS.cpp 30 1 TIM-OS
4 IntelliSense: cannot open source file "sys/resource.h" d:\!Photodinamic\TIM-OS\TIM-OS\TIM-OS\TIMOS.cpp 31 1 TIM-OS
5 IntelliSense: identifier "nanosleep" is undefined d:\!Photodinamic\TIM-OS\TIM-OS\TIM-OS\TIMOS.cpp 989 5 TIM-OS
6 IntelliSense: identifier "nanosleep" is undefined d:\!Photodinamic\TIM-OS\TIM-OS\TIM-OS\TIMOS.cpp 1204 5 TIM-OS
7 IntelliSense: incomplete type is not allowed d:\!Photodinamic\TIM-OS\TIM-OS\TIM-OS\TIMOS.cpp 2355 18 TIM-OS
8 IntelliSense: identifier "gettimeofday" is undefined d:\!Photodinamic\TIM-OS\TIM-OS\TIM-OS\TIMOS.cpp 2356 3 TIM-OS
9 IntelliSense: incomplete type is not allowed d:\!Photodinamic\TIM-OS\TIM-OS\TIM-OS\TIMOS.cpp 2357 18 TIM-OS
10 IntelliSense: incomplete type is not allowed d:\!Photodinamic\TIM-OS\TIM-OS\TIM-OS\TIMOS.cpp 2357 45 TIM-OS
11 IntelliSense: expression must have a constant value d:\!Photodinamic\TIM-OS\TIM-OS\TIM-OS\TIMOS.cpp 2506 23 TIM-OS
12 IntelliSense: no suitable constructor exists to convert from "int" to "ptw32_handle_t" d:\!Photodinamic\TIM-OS\TIM-OS\TIM-OS\TIMOS.cpp 2513 24 TIM-OS
13 IntelliSense: no operator "!=" matches these operands
operand types are: pthread_t != int d:\!Photodinamic\TIM-OS\TIM-OS\TIM-OS\TIMOS.cpp 2519 14 TIM-OS
Linux - Ubuntu 12.04 : Eclipse dengan Intel C++ Compiler
Masukkan icpp ke path, edit .bashrc, tambahkan :
export PATH=$PATH:/opt/intel/bin
Ketika mencoba melakukan kompilasi, terjadi error :
$ icpc -static -mkl -O3 -o timos TIMOS.cpp
icpc: error #10001: could not find directory in which g++ resides
Instal paket g++ dengan menjalankan perintah :
sudo apt-get install g++
Ketika mencoba melakukan kompilasi, terjadi error :
$icpc -static -mkl -O3 -o timos TIMOS.cpp
TIMOS.cpp(1317): error: invalid type conversion: "void *" to "unsigned int"
unsigned int tid = (unsigned int) threadid;
Referensi
- pthreads-win32, ftp://sourceware.org/pub/pthreads-win32
- What is an alternative to including sys/times.h on windows?, http://stackoverflow.com/questions/24741553/what-is-an-alternative-to-including-sys-times-h-on-windows
Harrah's Lake Tahoe Casino & Hotel - Mapyro
ReplyDeleteHarrah's Lake 양주 출장마사지 Tahoe Casino & Hotel 성남 출장안마 is a perfect option for you to get to Lake Tahoe without having to 양주 출장샵 travel anywhere 부산광역 출장마사지 else. Find map 익산 출장샵 directions,
um689 muck boot wellies uk,xn--clarksespaa-beb,gabor wien,footjoy golfschoenen,timberland australia,groundies australia,timberland damske,vivobarefootargentina,scarpe supra wp646
ReplyDelete