Author Topic: Point permanently to Allegro libs/headers  (Read 4949 times)

Offline rszlom

  • Single posting newcomer
  • *
  • Posts: 4
Point permanently to Allegro libs/headers
« on: December 19, 2012, 02:04:56 pm »
Hi guys, I'm using the Allegro game library with CodeBlocks and whenever I create a new project I have to link manually to the allegro libraries and headers via Project -> Build Options. Is there a way of setting the path to those libs/headers permanently for all future projects, so I won't have to link to them every time I create a new project ??

thx in advance
Rafael

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7786
    • My Best Post
Re: Point permanently to Allegro libs/headers
« Reply #1 on: December 19, 2012, 02:34:27 pm »
The preferred way is using "global variables" Edit1: "in the project settings. (creating a custom template is likely a useful idea.)"
http://wiki.codeblocks.org/index.php?title=Global_compiler_variables

Common used GV are
http://wiki.codeblocks.org/index.php?title=Recommended_global_variables


The way that IS NOT RECOMMENDED is global compiler settings (global environment).
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#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
Reason: Because sometime in the future you are likely to complain that CB always uses these setting for project you did not what to use them.

Tim S.
« Last Edit: December 19, 2012, 02:36:22 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: Point permanently to Allegro libs/headers
« Reply #2 on: December 19, 2012, 02:35:15 pm »
Either do it globally in "Setup -> Compiler" (not recommended).

Better is to create a stub-project with the settings you need and save it as template ("File -> Save project as template") and use it the next time with "File -> New -> From template".

Offline rszlom

  • Single posting newcomer
  • *
  • Posts: 4
Re: Point permanently to Allegro libs/headers
« Reply #3 on: December 19, 2012, 09:46:36 pm »
thx guys