Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: sajis997 on March 09, 2012, 01:51:33 am

Title: port an existing project
Post by: sajis997 on March 09, 2012, 01:51:33 am
Hello forum,

I have an project with the customized Makefile. I want to port it to code block to use its visual debugger. The Make file has the following

compiler flag -fopenmp

Include path INCLUDE = -I/usr/include/OpenEXR

and LDFLAGS = -LOpenEXR -lHalf -lImath -lIex -lIlmImf -lIlmThread -lz


How to set these options in the code blocks?



Thanks
Sajjjad
Title: Re: port an existing project
Post by: Alpha on March 09, 2012, 02:23:52 am
My suggestion would be to first create a global variable (http://wiki.codeblocks.org/index.php?title=Global_compiler_variables) for OpenEXR.  Next add -fopenmp to Project->Build options...->Compiler settings (tab)->Other options (tab).  Then (still within build options) go to Search directories (tab)->Compiler and add your include path using the global variable (for example: $(#OpenEXR.include)).  Do likewise under the linker search directories (for example: $(#OpenEXR.lib)).  Under Linker settings (tab)->Link libraries: use the Add button for each of your libraries:
OpenEXR
Half
Imath
Iex
IlmImf
IlmThread
z
Title: Re: port an existing project
Post by: sajis997 on March 09, 2012, 11:37:43 pm
Hi

I tried as suggested and i am getting the error as follows.

Code
/home/sajjad/Documents/LundGraphicsGroup/raytracer/CodeBlockAdaptation/raytracer/image.cpp|13|fatal error: ImfRgba.h: No such file or directory|

What am i missing now?


Regards
Sajjad
Title: Re: port an existing project
Post by: stahta01 on March 10, 2012, 01:43:17 am
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F
Title: Re: port an existing project
Post by: Alpha on March 10, 2012, 01:49:32 am
$(#OpenEXR.include) must point to the folder ImfRgba.h is in (I assume it is the following folder).
Include path INCLUDE = -I/usr/include/OpenEXR

Also see: http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_(general)#Q:_I_would_like_to_compile_a_project_using_some_non-standard_libraries._How_can_I_indicate_to_CodeBlocks_that_these_libraries_and_include_files_exist.3F (http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_(general)#Q:_I_would_like_to_compile_a_project_using_some_non-standard_libraries._How_can_I_indicate_to_CodeBlocks_that_these_libraries_and_include_files_exist.3F)
Title: Re: port an existing project
Post by: sajis997 on March 10, 2012, 04:47:49 am
Hi forum

Thanks for the hint. Now i have the linking error :

Code

ld||cannot find -lOpenEXR|
||=== Build finished: 2 errors, 144 warnings ===|



I provided with all the linking options and path as suggested.


Any more hint?


Regards
Sajjad