Adding classes to a VS2008 project



  • I have added cpp/h files to a Qt project that I built from within Visual Studio and it now fails to compile. It says that its failing to find the new files (cannot open source file, cannot open include file) Is there something that I must do other than just physically copying the files and adding them to the project?

    Thanks,
    Andy



  • It should be enough to copy files and add to project, what is the error when you try to open the files?

    As an alternative you can create the class from VS interface (or create .h and .cpp separatelly) and then copy-paste the code from original h/cpp.



  • Thanks for the quick reply. I seem to have resolved this issue (it can now find the files and I'm not sure what I did to fix it) but they are not being moc'ed so the link fails. I have seen the resolution to this problem when using a qmake file but I don't have one. How do I ensure that the new .cpp/.h files are moc'ed.

    Thanks,
    Andy


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.