Author Topic: port an existing project  (Read 5150 times)

Offline sajis997

  • Single posting newcomer
  • *
  • Posts: 3
port an existing project
« 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

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: port an existing project
« Reply #1 on: March 09, 2012, 02:23:52 am »
My suggestion would be to first create a global variable 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

Offline sajis997

  • Single posting newcomer
  • *
  • Posts: 3
Re: port an existing project
« Reply #2 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

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7607
    • My Best Post
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: port an existing project
« Reply #4 on: March 10, 2012, 01:49:32 am »

Offline sajis997

  • Single posting newcomer
  • *
  • Posts: 3
Re: port an existing project
« Reply #5 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