- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello everybody,
I have a project which includes a lot of subroutines. Now I built a new project and I need to call the subroutines that I have in my previous project but I don't know how to do so...Could you please help me with this problem..
Regards,
Faezeh
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Assuming both project are in the same solution:
If (when) both projects generate an executable, then create a third project in the same solution that generates a library (static or dynamic). Then place the common subroutines to both executable projects into this library project. Make both executable projects dependent upon the library.
While you could add the .obj files of the other project directly, this would not permit a auto-rebuild should one be necessary.
If both current executable projects are in separate solutions, then you can either make a new solution containing the two executable projects as above. Or create the library project (or a library in both projects) an then add the previously built library to the link phase (note, this will not cause the external library to get rebuilt if necessary).
Jim Dempsey
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page