Boost.Test and Visual Studio .Net 2003
I am trying to learn how to use boost.test. I have a solution with two projects in it: MyApp - this is the application I am building Test - this is the project for the test framework. Everything builds ok. Simple tests run fine, errors can be clicked on, all is well. My question has to do with how the Test project can refer to the code within MyApp. If I want to refer a class or function defined in MyApp, do I have to manually add the appropriate .h and .obj files to Test? Is there any way to have Test be able to automatically refer to the files of other projects within this workspace? Thanks in advance for any help......
"Robert Cober"
I am trying to learn how to use boost.test.
I have a solution with two projects in it: MyApp - this is the application I am building Test - this is the project for the test framework.
Everything builds ok. Simple tests run fine, errors can be clicked on, all is well.
My question has to do with how the Test project can refer to the code within MyApp. If I want to refer a class or function defined in MyApp, do I have to manually add the appropriate .h and .obj files to Test? Is there any way to have Test be able to automatically refer to the files of other projects within this workspace?
[a bit off-topic, perhaps] As a general advice, implement all your domain-specific classes in a separate library (lib or dll) and use that library from the test and application projects. The only thing you then need to do in VS.NET 2003 is to add a dependency on the library from the other projects - the library is then automatically used when linking. HTH // Johan
My question has to do with how the Test project can refer to the code within MyApp. If I want to refer a class or function defined in MyApp, do I have to manually add the appropriate .h and .obj files to Test? Is there any way to have Test be able to automatically refer to the files of other projects within this workspace?
Thanks in advance for any help......
Try building libraries and link them with test and you main program. Gennadiy
participants (3)
-
Gennadiy Rozental
-
Johan Nilsson
-
Robert Cober