Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / General / November 2006

Tip: Looking for answers? Try searching our database.

Multiple executables in the same solution space

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dave Rudolf - 15 Nov 2006 03:38 GMT
Hey all,

Suppose I want to have a solution that contains more than one program
(i.e., multiple main() methods, each in different files, and possibly in
different projects within the solution). For instance, I often have at
least one main application, and several small test programs that I use
to debug the code base. At present, I have a separate solution and
project for each one, and that project contains all the same library
files, but only one .cpp file with a main method. Of course, the problem
with this setup is that if I add files to the library, I have to
manually add these files to each project. I guess what I am looking for
is a way to add the library files once (i.e. to one project).

Thanks.

Dave
Andrew McDonald - 16 Nov 2006 21:14 GMT
"Dave Rudolf" <dave.rudolf@usask.ca> wrote...

> Suppose I want to have a solution that contains more than one program
> (i.e., multiple main() methods, each in different files, and possibly in
[quoted text clipped - 6 lines]
> files to each project. I guess what I am looking for is a way to add the
> library files once (i.e. to one project).

You can't have more than one main() in a project - a project by definition
builds one executable or library. You could easily have all your projects in
one solution though - why have a separate solution for each one? When you
hit Run or Debug, the startup project is the one executed, which you define
through the Solution Explorer context menu.

As for the library, you should make a static or dynamic library project and
simply add a dependency on that library to each of your executable projects.

--
Andy

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.