Author Topic: Stunningly simple questions on projects  (Read 1468 times)


  • Junior Community Member
  • Posts: 2
  • Hero Points: 1
Stunningly simple questions on projects
« on: January 30, 2012, 01:41:25 am »
Bare with me.  I have always used slickedit primarily for the editor and I am making my first real use of projects.  In fact my first real use of IDEs of any kind.

So I have a new workspace. 

(1) I add 1 project, a little c++ module which compiles to a static lib.

(2) I add a 2nd project, a c++ main executable.  I make the executable dependent on the library on the dependency tab.  Does this not force SE to automatically link the library from step 1?  It appears not. 

    a) So "dependency" just means SE will recompile the library, if need be, when building the main module but will not assume I actually need the library?
    b) On the dependency tab it allows me to check a box for the lib and/or the two sub-items for the Debug and Release versions of the lib.  What is this choice really asking me?  What if I choose both?

3) I got the main module to compile in two ways.  (a) I added the lib.a file to project files tab; (2) I added it to the libaries/objects line in the compile/link tab.
    (a) what is the preferred method - project file or library line?
    (b) In either case, I had to specify EITHER Debug/lib.a OR Release/lib.a.  Is there a way to just add "lib.a" and have SE figure out which to use depending on which configuration I am using?

Thanks so much.


  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2326
  • Hero Points: 307
Re: Stunningly simple questions on projects
« Reply #1 on: January 30, 2012, 03:07:08 pm »
You are correct that dependencies just specify a build dependency, it does not cause the library to be linked.  You have to keep in mind that this is a generic, customizable project system, not a project system for an IDE built for a single compiler (as most are).

Your best bet it to just check the box for the lib.  That will specify that the current configuration of the main project (for example, Debug) depends on the same configuration in the library (Debug).  If you check both, it means that the Debug configuration for your executable depends on both the Debug and Release configurations of your library, which is not normally what you would want.  The Dependency configuration GUI gives you the flexibility for a build to cross over from one configuration to another, but that is usually only needed in special circumstances, for example if you have a special configuration for a library that builds it with different flags in order to enable or disable features.

The preferred method is to put the library in the libraries/object line under the compile/link tab.

You can use a %bn in the path to the library to specify the name of the current configuration, for example, mylib/%bn/mylib.a


  • Junior Community Member
  • Posts: 2
  • Hero Points: 1
Re: Stunningly simple questions on projects
« Reply #2 on: January 31, 2012, 02:36:36 am »
Thank you Dennis.  That was very helpful.