CREATE LIBRARY AND APPLICATION IN ONE PROJECT
Applies to: uVision IDE
Answer
Information in this article applies to:
QUESTION
I would like to generate a library and an executable application
within one uVision project. I know that it is easy to generate a
library out of a project, but I want to generate some files of my
project as library without splitting the project. Is this
possible?
ANSWER
Yes it is possible. Just follow these steps:
-
Add a target and a group for the library to the project. For
example, add the target Library and file group
Library.
-
Move the source files that you want in the library to the new
Library file group. Then, right-click on this file group and
open the Options - Properties dialog and disable the option
Include in Target Build.
-
Select the Library target and use the Options —
Properties dialog to disable Include in Target Build for
all other file groups. Now you have two targets where all the file
groups are excluded from each other's target.
-
In the Library target, open Options for Target
— Output, enter the library name under Name of
Executable, and select Create Library. Then, build the
Library target to generate the library file.
-
Select the other target and add the library file that you have
just created to any file group other than Library. Now you
can generate the executable application from this target.
Now you can generate a library and an executable application
within the same project.
MORE INFORMATION
-
Getting Started User's Guide, Chapter 4: Creating
Applications
SEE ALSO
Article last edited on: 2006-03-20 09:37:20
Rate this article
Disagree? Move your mouse over the bar and click