locked
Can not include header/dll in the sub classes of the project? RRS feed

  • Question

  • Hi Guys,

    I am new to Visual C++ 2010, and therefore am running into some layman problems. I have a problem while including a header in my class. I have the main cpp file (myproj.cpp) which includes the main function. Then i have a header, dll and lib file to communicate with a hardware device (Bus32.h, Bus32.dll and bus32.lib). I put the the files in the include and lib folders and referenced these folders in my project. If I include the Bus32.h in my myproj.cpp and compil, everything goes fine. However if include the Bus32.h file in  some other class of the project, say comm.h, compilation would fail. looks like that the the dll is not being recognized at his point.

    Can anybody please guide me at his [oint. I have spent almost 5 hours now, and still stuck. I would appraciate any help.

     

    Thanks in advance.

    regards

    Vijay

    Sunday, November 14, 2010 11:49 PM

Answers

  • Hi dotrana,

    Please make sure the class which calls the functions from "Bus32.dll" includes "comm.h".

    Cheers,

    Yi

     


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked as answer by Yi Feng Li Monday, November 22, 2010 3:05 AM
    Wednesday, November 17, 2010 6:38 AM

All replies

  • "compilation would fail"?  You would need to show some code and the error message to get a specific diagnosis. 

    But it has nothing to do with the dll file.  They are not used or relevant during compilation.

     

    Monday, November 15, 2010 12:47 AM
  • Hi dotrana,

    Please make sure the class which calls the functions from "Bus32.dll" includes "comm.h".

    Cheers,

    Yi

     


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked as answer by Yi Feng Li Monday, November 22, 2010 3:05 AM
    Wednesday, November 17, 2010 6:38 AM