Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Existing Project including problem

Existing Project including problem

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestioncsharpc++visual-studio
18 Posts 7 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    ashishbhatt 0
    wrote on last edited by
    #1

    Hi,:) I am using Visual studio 2005. And I have made one project as the MFC Application and I want to add new existing project into that project.How can I do that? I have tried to add it into the solution then I compiple it and it does not give errors.But when I use the method of that new added project it gives error like this(function name) identifier not found. Is there any seeting which I have missed to do it? or something else.. So,plz help me if u have any idea. Thanks in advance. Ashish

    M L P N J 5 Replies Last reply
    0
    • A ashishbhatt 0

      Hi,:) I am using Visual studio 2005. And I have made one project as the MFC Application and I want to add new existing project into that project.How can I do that? I have tried to add it into the solution then I compiple it and it does not give errors.But when I use the method of that new added project it gives error like this(function name) identifier not found. Is there any seeting which I have missed to do it? or something else.. So,plz help me if u have any idea. Thanks in advance. Ashish

      M Offline
      M Offline
      Michael101
      wrote on last edited by
      #2

      ummmm.... The only thing that immediately comes to mind is perhaps you haven't included the .cpp or .h files (or whatever types of files you're using) in your project. Make sure you've included the files and then you shouldn't have any other problems otherwise give me the exact error message and I'll see what I can do. Good luck and cheers mate, Michael

      A 1 Reply Last reply
      0
      • A ashishbhatt 0

        Hi,:) I am using Visual studio 2005. And I have made one project as the MFC Application and I want to add new existing project into that project.How can I do that? I have tried to add it into the solution then I compiple it and it does not give errors.But when I use the method of that new added project it gives error like this(function name) identifier not found. Is there any seeting which I have missed to do it? or something else.. So,plz help me if u have any idea. Thanks in advance. Ashish

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        The second project will need to be a library. You'll need to reference the appropriate header file in the new project and link against its .lib file. google will help

        1 Reply Last reply
        0
        • A ashishbhatt 0

          Hi,:) I am using Visual studio 2005. And I have made one project as the MFC Application and I want to add new existing project into that project.How can I do that? I have tried to add it into the solution then I compiple it and it does not give errors.But when I use the method of that new added project it gives error like this(function name) identifier not found. Is there any seeting which I have missed to do it? or something else.. So,plz help me if u have any idea. Thanks in advance. Ashish

          P Offline
          P Offline
          Paresh Chitte
          wrote on last edited by
          #4

          Have you included the respective header file and or implementation file? Regards, Paresh.

          1 Reply Last reply
          0
          • A ashishbhatt 0

            Hi,:) I am using Visual studio 2005. And I have made one project as the MFC Application and I want to add new existing project into that project.How can I do that? I have tried to add it into the solution then I compiple it and it does not give errors.But when I use the method of that new added project it gives error like this(function name) identifier not found. Is there any seeting which I have missed to do it? or something else.. So,plz help me if u have any idea. Thanks in advance. Ashish

            N Offline
            N Offline
            Nibu babu thomas
            wrote on last edited by
            #5

            ashishbhatt wrote:

            I want to add new existing project into that project.

            You cannot add a project into another project. You can add a new project into an existing workspace.

            ashishbhatt wrote:

            But when I use the method of that new added project it gives error like this(function name) identifier not found.

            Make the second project a Dll or a static lib and then link to the dll/lib from the first project. Output for projects in a workspace are independent of each other. Order in which the projects are compiled is important, in your case the second should be compiled first, since it's a DLL output type project hence the first project will be using it. So set a dependency for the first project on the second project and of course link to the second project.


            Nibu thomas MVP For VC++ Code must be written to be read, not by the compiler, but by another human being. Programming Blog: http:\\nibuthomas.wordpress.com

            A 2 Replies Last reply
            0
            • M Michael101

              ummmm.... The only thing that immediately comes to mind is perhaps you haven't included the .cpp or .h files (or whatever types of files you're using) in your project. Make sure you've included the files and then you shouldn't have any other problems otherwise give me the exact error message and I'll see what I can do. Good luck and cheers mate, Michael

              A Offline
              A Offline
              ashishbhatt 0
              wrote on last edited by
              #6

              Hi,:-D Thanks For very Quick reply.As u told me to include .h or .cpp files that i have already done it. And still i am getting that error. And also when i see its (function's)definition than it points to that project also. I am using the function SetHook(....) in my existing project and this function is in the new added project. And error gives like below...... 1>d:\testing_and_download\testing\testrtmp_working\testrtmp\rtmpdesk.cpp(665) : error C3861: 'SetHook': identifier not found I am using this function in the RTMPDesk.cpp file in that i have included new project's .h file. And what is the issue of this .lib file??? As i have got reply Plz reply me. Thanking u. Ashish

              Z 1 Reply Last reply
              0
              • A ashishbhatt 0

                Hi,:-D Thanks For very Quick reply.As u told me to include .h or .cpp files that i have already done it. And still i am getting that error. And also when i see its (function's)definition than it points to that project also. I am using the function SetHook(....) in my existing project and this function is in the new added project. And error gives like below...... 1>d:\testing_and_download\testing\testrtmp_working\testrtmp\rtmpdesk.cpp(665) : error C3861: 'SetHook': identifier not found I am using this function in the RTMPDesk.cpp file in that i have included new project's .h file. And what is the issue of this .lib file??? As i have got reply Plz reply me. Thanking u. Ashish

                Z Offline
                Z Offline
                zakkas2483
                wrote on last edited by
                #7

                i am not sure but just give the full path of your .h file. SetHook( ) is member function or global function.????/ hiren

                A 1 Reply Last reply
                0
                • Z zakkas2483

                  i am not sure but just give the full path of your .h file. SetHook( ) is member function or global function.????/ hiren

                  A Offline
                  A Offline
                  ashishbhatt 0
                  wrote on last edited by
                  #8

                  Hi hiru, In my workspace i have project TestRTMP exist ok. And i have included another project in the solution VNCHooks. IN this new project I have .cpp file VNCHooks.cpp file in that SetHook() function is available (it is global there is no any class available in this file) . it is declared in the VNCHooks.h file. And in my Project dependancy window (and in tab of depends on..) i have only one projrct(my orignal) there is new added project available. Thanks. Ashish

                  1 Reply Last reply
                  0
                  • N Nibu babu thomas

                    ashishbhatt wrote:

                    I want to add new existing project into that project.

                    You cannot add a project into another project. You can add a new project into an existing workspace.

                    ashishbhatt wrote:

                    But when I use the method of that new added project it gives error like this(function name) identifier not found.

                    Make the second project a Dll or a static lib and then link to the dll/lib from the first project. Output for projects in a workspace are independent of each other. Order in which the projects are compiled is important, in your case the second should be compiled first, since it's a DLL output type project hence the first project will be using it. So set a dependency for the first project on the second project and of course link to the second project.


                    Nibu thomas MVP For VC++ Code must be written to be read, not by the compiler, but by another human being. Programming Blog: http:\\nibuthomas.wordpress.com

                    A Offline
                    A Offline
                    ashishbhatt 0
                    wrote on last edited by
                    #9

                    How can i link this dll file or lib file with my project???

                    L 1 Reply Last reply
                    0
                    • A ashishbhatt 0

                      How can i link this dll file or lib file with my project???

                      L Offline
                      L Offline
                      Lost User
                      wrote on last edited by
                      #10

                      FFS[^]

                      1 Reply Last reply
                      0
                      • N Nibu babu thomas

                        ashishbhatt wrote:

                        I want to add new existing project into that project.

                        You cannot add a project into another project. You can add a new project into an existing workspace.

                        ashishbhatt wrote:

                        But when I use the method of that new added project it gives error like this(function name) identifier not found.

                        Make the second project a Dll or a static lib and then link to the dll/lib from the first project. Output for projects in a workspace are independent of each other. Order in which the projects are compiled is important, in your case the second should be compiled first, since it's a DLL output type project hence the first project will be using it. So set a dependency for the first project on the second project and of course link to the second project.


                        Nibu thomas MVP For VC++ Code must be written to be read, not by the compiler, but by another human being. Programming Blog: http:\\nibuthomas.wordpress.com

                        A Offline
                        A Offline
                        ashishbhatt 0
                        wrote on last edited by
                        #11

                        Still I am getting problems. I have added its .lib file and also dll file but still i am getting error as i described above in the descussion. Plz reply me if u have solution.

                        N 1 Reply Last reply
                        0
                        • A ashishbhatt 0

                          Still I am getting problems. I have added its .lib file and also dll file but still i am getting error as i described above in the descussion. Plz reply me if u have solution.

                          N Offline
                          N Offline
                          Nibu babu thomas
                          wrote on last edited by
                          #12

                          ashishbhatt wrote:

                          still i am getting error as i described above in the descussion.

                          Now you need to include the header file. Specify relative path to the header file while including... For eg:

                          #include "./../MyProject/MyFile.h" // Go back one level and include file from MyProject

                          Another option is to specify include path in project properties, it's something like "Additional include directories" in the C++ tab. In this case you won't need to specity full path to include a file.


                          Nibu thomas MVP For VC++ Code must be written to be read, not by the compiler, but by another human being. Programming Blog: http:\\nibuthomas.wordpress.com

                          A 2 Replies Last reply
                          0
                          • N Nibu babu thomas

                            ashishbhatt wrote:

                            still i am getting error as i described above in the descussion.

                            Now you need to include the header file. Specify relative path to the header file while including... For eg:

                            #include "./../MyProject/MyFile.h" // Go back one level and include file from MyProject

                            Another option is to specify include path in project properties, it's something like "Additional include directories" in the C++ tab. In this case you won't need to specity full path to include a file.


                            Nibu thomas MVP For VC++ Code must be written to be read, not by the compiler, but by another human being. Programming Blog: http:\\nibuthomas.wordpress.com

                            A Offline
                            A Offline
                            ashishbhatt 0
                            wrote on last edited by
                            #13

                            As you told me to include header files i have already included it. And also i tried that "Additional include directories" and include that project directory path, but taht still not working. That gives me the same error. Thanks for taking interest. Ashish

                            1 Reply Last reply
                            0
                            • A ashishbhatt 0

                              Hi,:) I am using Visual studio 2005. And I have made one project as the MFC Application and I want to add new existing project into that project.How can I do that? I have tried to add it into the solution then I compiple it and it does not give errors.But when I use the method of that new added project it gives error like this(function name) identifier not found. Is there any seeting which I have missed to do it? or something else.. So,plz help me if u have any idea. Thanks in advance. Ashish

                              J Offline
                              J Offline
                              jhwurmbach
                              wrote on last edited by
                              #14

                              ashishbhatt wrote:

                              I have tried to add it into the solution then I compiple it and it does not give errors.But when I use the method of that new added project it gives error like this(function name) identifier not found.

                              Are the code fragments you included in a namespace?


                              Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal.
                              George Orwell, "Keep the Aspidistra Flying", Opening words

                              A 1 Reply Last reply
                              0
                              • J jhwurmbach

                                ashishbhatt wrote:

                                I have tried to add it into the solution then I compiple it and it does not give errors.But when I use the method of that new added project it gives error like this(function name) identifier not found.

                                Are the code fragments you included in a namespace?


                                Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal.
                                George Orwell, "Keep the Aspidistra Flying", Opening words

                                A Offline
                                A Offline
                                ashishbhatt 0
                                wrote on last edited by
                                #15

                                I have included one project which is DLL project.In that its .h file and .cpp file. In .h file function is declared which is defined in .cpp. And that function i am using in my MFC application.And also i have included added project's header file in my MFC app. Thanks. Plz reply if u have solution.

                                1 Reply Last reply
                                0
                                • N Nibu babu thomas

                                  ashishbhatt wrote:

                                  still i am getting error as i described above in the descussion.

                                  Now you need to include the header file. Specify relative path to the header file while including... For eg:

                                  #include "./../MyProject/MyFile.h" // Go back one level and include file from MyProject

                                  Another option is to specify include path in project properties, it's something like "Additional include directories" in the C++ tab. In this case you won't need to specity full path to include a file.


                                  Nibu thomas MVP For VC++ Code must be written to be read, not by the compiler, but by another human being. Programming Blog: http:\\nibuthomas.wordpress.com

                                  A Offline
                                  A Offline
                                  ashishbhatt 0
                                  wrote on last edited by
                                  #16

                                  Hi Nibu, Now I got little much solution when i declare this header file. But one new problem started.When I run my project then it shows the message box like ........... Application failed to start becoz VNCHooks.dll was not found.Reinstalling the application may fix this problem. Plz take interest in this topic if u have time. plz reply. Thanks Ashish

                                  N 1 Reply Last reply
                                  0
                                  • A ashishbhatt 0

                                    Hi Nibu, Now I got little much solution when i declare this header file. But one new problem started.When I run my project then it shows the message box like ........... Application failed to start becoz VNCHooks.dll was not found.Reinstalling the application may fix this problem. Plz take interest in this topic if u have time. plz reply. Thanks Ashish

                                    N Offline
                                    N Offline
                                    Nibu babu thomas
                                    wrote on last edited by
                                    #17

                                    ashishbhatt wrote:

                                    Application failed to start becoz VNCHooks.dll was not found.Reinstalling the application may fix this problem.

                                    I guess this is your own DLL, so in that case select project settings for your first project, which needs the dll Goto: Configuration->Debugging->WorkingDirectory Set the value to the directory where this dll is located. Well if this is not your dll then install this dll in the default search path for your application which is the "PATH" variable. In release this dll should in the same directory or somewhere as described above.


                                    Nibu thomas MVP For VC++ Code must be written to be read, not by the compiler, but by another human being. Programming Blog: http:\\nibuthomas.wordpress.com

                                    A 1 Reply Last reply
                                    0
                                    • N Nibu babu thomas

                                      ashishbhatt wrote:

                                      Application failed to start becoz VNCHooks.dll was not found.Reinstalling the application may fix this problem.

                                      I guess this is your own DLL, so in that case select project settings for your first project, which needs the dll Goto: Configuration->Debugging->WorkingDirectory Set the value to the directory where this dll is located. Well if this is not your dll then install this dll in the default search path for your application which is the "PATH" variable. In release this dll should in the same directory or somewhere as described above.


                                      Nibu thomas MVP For VC++ Code must be written to be read, not by the compiler, but by another human being. Programming Blog: http:\\nibuthomas.wordpress.com

                                      A Offline
                                      A Offline
                                      ashishbhatt 0
                                      wrote on last edited by
                                      #18

                                      Thanks Nibu,:-D I got solution. Now I can run my application without any error. Now I want some information from you. As you I have included new project as to set the hooks in my window.So, How can i do that?? Should i have to make new window for that and with that handle i have to set the Hooks?? Plz guide me i am new in Hooks. Thank you thank u very much. Ashish

                                      1 Reply Last reply
                                      0
                                      Reply
                                      • Reply as topic
                                      Log in to reply
                                      • Oldest to Newest
                                      • Newest to Oldest
                                      • Most Votes


                                      • Login

                                      • Don't have an account? Register

                                      • Login or register to search.
                                      • First post
                                        Last post
                                      0
                                      • Categories
                                      • Recent
                                      • Tags
                                      • Popular
                                      • World
                                      • Users
                                      • Groups