Menu

How to use Host App effectively

Help
ritesh
2002-12-23
2002-12-25
  • ritesh

    ritesh - 2002-12-23

    Hi
    Till now i have seen my out put on command line for CppUnit. Now i want to use HostApps. I have tried this by including my files in the example folder. I want to do it out side the cppunit folder. it is asking for the main. But in the Example\msvc6\hostapp there is no main, so, how is it calling the ExampleTestCase there? how can i resolve this problem?
    Please resolve my query.
    Thanks & Regards

    - Ritesh

     
    • Stephen Peterson

      Someone else can likely answer this better than me, but I'll try anyway - I've recently struggled with how to make HostApp work with my own MVC project.  This is what I recall doing a few weeks ago:
      1) build and run HostApp from within the location it originally is found within the cppunit distribution
      2) copy the HostApp folder from the cppunit distribution to a new location within the folder of your project
      3) update the project settings uncer C++ for includes, and Link for libraries/object modules to find the same files as it did before within the cppunit folder hierarchy
      4) rebuild and run, it should still work
      5) Create a new vc6 project using the 'create static library' help article.  Insert all your existing source and header files into this project, and build  the project in order to create a lib file of object files containing all of your code you want to test
      6) add these libraries also to your hostapp project settings in the link tab.  Write your own testcase within hostapp, instantiating one of your own classes, calling methods on it, and doing an assert on the result. 

      I'm still trying to understand how to do step 6 - for me,  c++ seems alot more complicated than java when doing this stuff, esp if you don't know c++ too well.

      is that helpful at all?

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.