Calling functions between two different projects

This is a discussion on Calling functions between two different projects within the Windows Programming forums, part of the Platform Specific Boards category; Hi, I made a solution using MSVS .NET 2003 that contain two projects. I was wondering if there was a ...

  1. #1
    Registered User
    Join Date
    Dec 2004
    Posts
    205

    Calling functions between two different projects

    Hi,
    I made a solution using MSVS .NET 2003 that contain two projects. I was wondering if there was a way to call functions or use classes contained in 1 of the project from the other project. Thanks
    Amish

  2. #2
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,265
    Include the files which contain the functions/classes in the other project. Then in the file which you want to call/create these functions/classes, just include the appropriate header file.

  3. #3
    Registered User
    Join Date
    Dec 2004
    Posts
    205
    Quote Originally Posted by bithub
    Include the files which contain the functions/classes in the other project. Then in the file which you want to call/create these functions/classes, just include the appropriate header file.
    That makes sense. I tried that but I get some problem.
    Let me exlain:
    Project A is an MFC project that I did not code.
    Project B is also MFC dialog based and is a sort of abstract that makes a parent window and then should spawn multiple project A as child windows and control these windows.

    Now project B should be general enough to allow spawning and control of other projects as well. I therefore need a way to use the constructor and create project A without having to import all the files from project A into project B.

    I tried just including the main files as quoted above, that is use #include on the header files and add these files to project B but I get linker errors all over the place.

    Any thoughts on the matter would be really appreciated. Thanks
    Amish

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 12
    Last Post: 04-12-2009, 06:49 PM
  2. Replies: 9
    Last Post: 01-26-2008, 03:12 AM
  3. calling functions: exit and return
    By 911help in forum C Programming
    Replies: 3
    Last Post: 12-28-2007, 01:24 PM
  4. I Need Help Defining and Calling Functions
    By jonbuckets in forum C++ Programming
    Replies: 6
    Last Post: 10-25-2007, 10:46 AM
  5. Calling functions help
    By ForlornOdium in forum C++ Programming
    Replies: 14
    Last Post: 09-29-2003, 09:40 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21