How to add my own .cc and .hh file

Member Site Forums Rosetta 3 Rosetta 3 – Build/Install How to add my own .cc and .hh file

Viewing 1 reply thread
  • Author
    Posts
    • #3377
      Anonymous

        Hello,i use scons to complie.

        Recently,I write some class in .cc and .hh files , when i #include<~path/name.hh>,i find that it did not compile .cc files. I have read sconstruct file but do not know how to add my own file to compile with.

        Please give me some help

      • #15219
        Anonymous

          Header files need only be added to the accompanying source file.

          Source (cc) files should be added to the scons settings files – the ones like “protocols.2.src.settings”, etc, etc.  Probably you should try adding it to whichever scons setting file its neighbors in the directory already are in, or the highest numbered one available.  Notice that stuff in “higher” files cannot be linked against stuff in lower files.

          • #15220
            Anonymous

              Thank you smlewis.

              I create a folder in /main/source/src and i write a myfoldername.src.setting ,but it seems do not work cause i get a error 

              can not find lmyfoldername 

              It means i need to make a library for my folder?

            • #15221
              Anonymous

                You CAN make a library for your folder.

                You almost certainly SHOULD just add it to an existing library – it will take 1/100th of the time.

                Let me suggest that the easiest thing to do will be to put it in main/source/src/protocols/myfoldername and then add it to protocols.8.src.settings.  That’s what we teach new students to do for quick and dirty prototyping at the Rosetta Bootcamp.  IT’s not a good permanent home for shared code but for something you are writing for yourself it’s the fastest, easiest place to put it.

              • #15222
                Anonymous

                  Thank you !

                  I put it in basic and it work(i do not know protocol map to which protocols.*.src.setting 1 h ago)

            Viewing 1 reply thread
            • You must be logged in to reply to this topic.