Existing Project including problem
-
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
How can i link this dll file or lib file with my project???
-
How can i link this dll file or lib file with my project???
-
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
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.
-
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.
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
-
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
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
-
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
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 -
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 wordsI 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.
-
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
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
-
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
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
-
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
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