Author Topic: Code::Blocks and Intel OneAPI?  (Read 2193 times)

Offline porkroast

  • Single posting newcomer
  • *
  • Posts: 1
Code::Blocks and Intel OneAPI?
« on: November 11, 2025, 06:23:28 pm »
Hello all:

I am having some trouble setting up the Intel OneAPI C++ compiler to work with Code::Blocks-- I am using MSVC 2022 Community Edition, and I have the Intel Command Line interface working.  Windows 11-- I keep getting linking errors, so I believe that my compiler and directory settings are off.  Has anyone here made this work yet?  Thank you--

Offline ThierryD

  • Multiple posting newcomer
  • *
  • Posts: 89
Re: Code::Blocks and Intel OneAPI?
« Reply #1 on: November 14, 2025, 03:44:58 pm »
Hi,

Howto is joined.

Regards.

Offline ThierryD

  • Multiple posting newcomer
  • *
  • Posts: 89
Re: Code::Blocks and Intel OneAPI?
« Reply #2 on: Today at 05:34:43 pm »
Hi,

My first experience with OneAPI Intel Compiler was with version 2024.2 [and VS2022] because tle lastest version of this compiler is now based on LLVM architecture.
First consequence, this compiler need to lean with "full" environment devlopment like MinGW or Visual Studio.
Root binary directory of OneAPI is : C:\Program Files (x86)\Intel\oneAPI\compiler\latest\bin ("latest" is a link on real directory "2024.2"), it's very useful to simplify configuration.
Note that exist also a directory " C:\Program Files (x86)\Intel\oneAPI\compiler\latest\bin32" to store libraries and DLL of this compiler "compatible" with 32 bit architecture, but
binary directory of OneAPI compiler is always ...\bin. To choose 32 or 64 bit generation, you must use option "-m32|-m64" during compilation and "/MACHINE:X86|X64" during linkage if needed.

NB : Version 2024.2 is last version to support 32 bit generation. Intel has abandoned this feature with newer version like 2025.nn .
NB2 : To developer of CB, reference of One API Intel Compiler is "very" obsolete ... executable of C compiler is now "icx" and this of C++ compiler is "icpx".
       Note that in configuration into CB, it's mandatory to distinguish C compiler to C++ compiler by name.of OneAPI

Yesterday, I changed configuration of Visual Studio to update to VS 2026 "Community" last available for free use ... and I tested into CB with no difficulty ...
Just to precise, I use environment variable into configuration in CB to translate version number of VS version and VS number in name of directories used.
Good precaution, because I just change value of env variable "VS_version" from "2022" to "18" (and yes, not "2026" !!...) and "VS_num" from "14.44.35207" to "14.50.35717" .
Nothing else to change, VS 2026 wrk perfectly with CB.

And, because I'm curious about newer version of "interesting" compilers, I try to change to newer version of One API Intel Compiler : 2025.3.
It's just impossible "at date" because installer tool of OneAPI control presence of VS 2019 or VS2022 ... but not also VS 2026.

Then, I tested if my "precedent" version of OneAPI Intel Compiler with version 2024.2 configured successfully with VS 2022 continue to work with VS 2026.
And the response is "Yes". Only installation tool of OneAPI claim prerequisite VS 2019 or VS2022, use One API Intel Compiler version 2024.2 leaned with VS 2026 work perfectly in CB (or outside IDE). Good new !

Good luck to experiment OneAPI compiler into CB.

Thierry.