Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: cdemirkir on March 28, 2009, 10:44:23 pm
-
Hi Everyone,
I'd like to use Intel Compiler v11 as default compiler in C::B. I applied the similar settings defined in http://wiki.codeblocks.org/index.php?title=Installing_a_supported_compiler#Intel_C.2B.2B_Compiler as the following
For executables:
C:\Program Files\Microsoft Visual Studio 8\VC\bin
C:\Program Files\Microsoft Visual Studio 8\Common7\IDE
Z:\Libraries\Microsoft SDKs\Windows\v6.1\bin
For includes:
C:\Program Files\Intel\Compiler\11.0\066\cpp\include
C:\Program Files\Microsoft Visual Studio 8\VC\include
Z:\Libraries\Microsoft SDKs\Windows\v6.1\Include
For libraries :
C:\Program Files\Intel\Compiler\11.0\066\cpp\bin\ia32\lib
C:\Program Files\Microsoft Visual Studio 8\VC\lib
Z:\Libraries\Microsoft SDKs\Windows\v6.1\Lib
Then I tried the compile a source which uses OpenCV library include file, cxmisc.h, and gives an error in the following preprocessor check lines of the header file and exits, which means it goes the last #elif condition. When I check if the C::B can find the definition of WIN32, it can find the definition of this macro in Ole2.h of the SDK header but it can the definition of _MSC_VER and therefore I guess, it it goes till last #elif preprocessor condition which is equal to the error condition. I can not see the reason of this error. I'd be grateful to anyone who can help me resolve this issue ?
Regards
Cem
/****************************************************************************************\
* Common declarations *
\****************************************************************************************/
/* get alloca declaration */
#ifdef __GNUC__
#undef alloca
#define alloca __builtin_alloca
#elif defined(WIN32) || defined(WIN64)
#if defined(_MSC_VER) || defined(__BORLANDC__)
#include <malloc.h>
#endif
#elif defined HAVE_ALLOCA_H
#include <alloca.h>
#elif defined HAVE_ALLOCA
#include <stdlib.h>
#elif <------------GIVES ERROR AT THIS CONDITION
#error
#endif
I can not find the reason of that _MSCVER can not be recognized by the compiler ....
-
can intel compiler build OpenCV project sucessfully?
I have used MinGW and Visual C++ compiler, but I never heart it can be compiled by Intel compiler in the OpenCV forum.
-
can intel compiler build OpenCV project sucessfully?
I have used MinGW and Visual C++ compiler, but I never heart it can be compiled by Intel compiler in the OpenCV forum.
OpenCV can be compiled with Intel Compiler, see the INSTALL file in OpenCV root directory to read the details.
-
Eventhough it looks like #defines aren't set right for some unknown reason, you may be able to force it to work. If I were you, I'd comment out the whole #ifdef block and try replacing it one by one with one of those three #includes until it works (or not!!!). Try #include <malloc.h>, if it doesn't like that, try #include <stdlib.h>, and finally try #include <alloca.h>
Not a great answer I know, just something to try until someone who knows what they are doing can help!!!
Good luck. Lemme know how you like the Intel compiler. I really want to try it.
The reason for preferring Intel Compiler to GCC, GCC produces compiling problems with OpenMP directives.
-
The reason for preferring Intel Compiler to GCC, GCC produces compiling problems with OpenMP directives.
For testing, I just successfully built svn opencv libraries with TDM-Mingw 4.3.3 with OpenMP enabled :D.
No compiling problems happened if you follow the readme supplied my TDM package.
You can have a try.
Good luck.
-
The reason for preferring Intel Compiler to GCC, GCC produces compiling problems with OpenMP directives.
For testing, I just successfully built svn opencv libraries with TDM-Mingw 4.3.3 with OpenMP enabled :D.
No compiling problems happened if you follow the readme supplied my TDM package.
You can have a try.
Good luck.
Another reason for preferring Intel compiler, I need a compiler which can be run at two different operating systems,Windows and Linux, without OpenMP compilation problem. I like to develop and stay in Windows, but at the same time I need the application to run in Linux, Therefore I develop the code in Windows using Intel Compiler and building it with the same compiler in Linux.
Regards
Cem
-
I believe you have miss something.
TDM-Mingw is a windows version of GCC.
Which compiler problem did you have when trying to use OpenCV in linux?
-
I believe you have miss something.
TDM-Mingw is a windows version of GCC.
Which compiler problem did you have when trying to use OpenCV in linux?
I surely used GCC in the first try in Linux, but It gives compilation errors for OpenMP clauses separated with comma, therefore I moved to the Intel compiler ....
-
Strange problem.
I haven't work under linux, but I think you have use an old version of GCC. Even the TDM-mingw( windows portion of GCC) can compile and build opencv successfully. So, I suggest you should try a newer version.
I do believe the newer GCC can do this, by the way, a lot of developer of OpenCV were working under linux, if you have problem with GCC, you can write a bug report to sourceforge. They will give you a kind response.
I have search the document of openmp. see here
http://gcc.gnu.org/projects/gomp/
Status
June 6, 2008
The gomp-3_0-branch has been merged into SVN mainline, so GCC 4.4 and later will feature OpenMP v3.0 support
Good luck!
-
Strange problem.
I haven't work under linux, but I think you have use an old version of GCC. Even the TDM-mingw( windows portion of GCC) can compile and build opencv successfully. So, I suggest you should try a newer version.
I do believe the newer GCC can do this, by the way, a lot of developer of OpenCV were working under linux, if you have problem with GCC, you can write a bug report to sourceforge. They will give you a kind response.
I have search the document of openmp. see here
http://gcc.gnu.org/projects/gomp/
Status
June 6, 2008
The gomp-3_0-branch has been merged into SVN mainline, so GCC 4.4 and later will feature OpenMP v3.0 support
Good luck!
Thanks for your interest ... by the way ... Do you know how a static boost library, such as libboost_filesystem-mgw43-s.lib, can be linked ? Mingw ld.exe can not find, libboost_filesystem-mgw43-mt-s-1_38.lib, when I add it to the linker line at the C::B. It wants dynamic link library, boost_filesystem-mgw43-mt-1_38. How can I build my application with a static boost library ?
Regards
Cem
-
Thanks for your interest ... by the way ... Do you know how a static boost library, such as libboost_filesystem-mgw43-s.lib, can be linked ? Mingw ld.exe can not find, libboost_filesystem-mgw43-mt-s-1_38.lib, when I add it to the linker line at the C::B. It wants dynamic link library, boost_filesystem-mgw43-mt-1_38. How can I build my application with a static boost library ?
Hi Cem,
read this thread: http://forums.codeblocks.org/index.php/topic,10257.0.html (http://forums.codeblocks.org/index.php/topic,10257.0.html), it might give you the answer.
-
I can not find the reason of that _MSCVER can not be recognized by the compiler ....
If you are using the Intel compiler I wonder if this sets the _MSCVER flag at all. IMHO this is set by the Visual Studio C compiler. Intel might set another define... (I don't know/use the Intel compiler though...). Notice that MSC stands for Microsoft Compiler. Intel might not really want to claim to be a Microsoft compiler... right?! ;-)