Skip to main content
added link to libraries short
Source Link
DinoCoderSaurus
  • 28.6k
  • 2
  • 12
  • 31

I am sorry this pset has been such a struggle for you. I think you are really close to the finish line. Take a deep breath and let's go through this step by step. The most important thing is that you do not lose the code you have worked so hard on.

The plan:

  1. Backup your work. There is no such thing as too much backup.
  2. Restore Makefile, find.c and helpers.h from the distro code
  3. make the "find" executable
  4. Whistle a happy tune

The execution:

  1. In a new terminal window:

    cd  pset3
    cp -r find SAVEfind  
    

    This will create a copy of your find directory in a new directory called SAVEfind.

  2. Follow the instructions in the Problem Set 3 document to download the distro code, but DO NOT UNZIP. We are going to restore only the 3 files mentioned above. unzip allows you to select the files you wish to retrieve. From your workspace directory:

    unzip pset3.zip pset3/find/Makefile
    unzip pset3.zip pset3/find/find.c
    unzip pset3.zip pset3/find/helpers.h
    

Now you have fresh copies of those three files.

  1. Navigate to pset3/find directory and execute make clean. This will ensure that make starts with a clean slate. Now execute make.

I hope I hear whistling! :)

For the record, here is my thinking from reading through your posts. You originally wrote your routines in helpers.c; you added a "main" loop and variables, so it would be a stand-alone program that you could test. That made it difficult to integrate it back into the find application and it was downhill from there. By now you are very frustrated and it makes it difficult to find your way back to where you were when your routines were working.

I thought I rememberedThere's a goodgreat discussion of libraries in the course materials somewhere, but I can't find it. I would hate to add confusion at this point, so I will keep looking and post a comment when I find what I'm looking forWeek 1 Shorts.

:wq

I am sorry this pset has been such a struggle for you. I think you are really close to the finish line. Take a deep breath and let's go through this step by step. The most important thing is that you do not lose the code you have worked so hard on.

The plan:

  1. Backup your work. There is no such thing as too much backup.
  2. Restore Makefile, find.c and helpers.h from the distro code
  3. make the "find" executable
  4. Whistle a happy tune

The execution:

  1. In a new terminal window:

    cd  pset3
    cp -r find SAVEfind  
    

    This will create a copy of your find directory in a new directory called SAVEfind.

  2. Follow the instructions in the Problem Set 3 document to download the distro code, but DO NOT UNZIP. We are going to restore only the 3 files mentioned above. unzip allows you to select the files you wish to retrieve. From your workspace directory:

    unzip pset3.zip pset3/find/Makefile
    unzip pset3.zip pset3/find/find.c
    unzip pset3.zip pset3/find/helpers.h
    

Now you have fresh copies of those three files.

  1. Navigate to pset3/find directory and execute make clean. This will ensure that make starts with a clean slate. Now execute make.

I hope I hear whistling! :)

For the record, here is my thinking from reading through your posts. You originally wrote your routines in helpers.c; you added a "main" loop and variables, so it would be a stand-alone program that you could test. That made it difficult to integrate it back into the find application and it was downhill from there. By now you are very frustrated and it makes it difficult to find your way back to where you were when your routines were working.

I thought I remembered a good discussion of libraries in the course materials somewhere, but I can't find it. I would hate to add confusion at this point, so I will keep looking and post a comment when I find what I'm looking for.

:wq

I am sorry this pset has been such a struggle for you. I think you are really close to the finish line. Take a deep breath and let's go through this step by step. The most important thing is that you do not lose the code you have worked so hard on.

The plan:

  1. Backup your work. There is no such thing as too much backup.
  2. Restore Makefile, find.c and helpers.h from the distro code
  3. make the "find" executable
  4. Whistle a happy tune

The execution:

  1. In a new terminal window:

    cd  pset3
    cp -r find SAVEfind  
    

    This will create a copy of your find directory in a new directory called SAVEfind.

  2. Follow the instructions in the Problem Set 3 document to download the distro code, but DO NOT UNZIP. We are going to restore only the 3 files mentioned above. unzip allows you to select the files you wish to retrieve. From your workspace directory:

    unzip pset3.zip pset3/find/Makefile
    unzip pset3.zip pset3/find/find.c
    unzip pset3.zip pset3/find/helpers.h
    

Now you have fresh copies of those three files.

  1. Navigate to pset3/find directory and execute make clean. This will ensure that make starts with a clean slate. Now execute make.

I hope I hear whistling! :)

For the record, here is my thinking from reading through your posts. You originally wrote your routines in helpers.c; you added a "main" loop and variables, so it would be a stand-alone program that you could test. That made it difficult to integrate it back into the find application and it was downhill from there. By now you are very frustrated and it makes it difficult to find your way back to where you were when your routines were working.

There's a great discussion of libraries in Week 1 Shorts.

:wq

Source Link
DinoCoderSaurus
  • 28.6k
  • 2
  • 12
  • 31

I am sorry this pset has been such a struggle for you. I think you are really close to the finish line. Take a deep breath and let's go through this step by step. The most important thing is that you do not lose the code you have worked so hard on.

The plan:

  1. Backup your work. There is no such thing as too much backup.
  2. Restore Makefile, find.c and helpers.h from the distro code
  3. make the "find" executable
  4. Whistle a happy tune

The execution:

  1. In a new terminal window:

    cd  pset3
    cp -r find SAVEfind  
    

    This will create a copy of your find directory in a new directory called SAVEfind.

  2. Follow the instructions in the Problem Set 3 document to download the distro code, but DO NOT UNZIP. We are going to restore only the 3 files mentioned above. unzip allows you to select the files you wish to retrieve. From your workspace directory:

    unzip pset3.zip pset3/find/Makefile
    unzip pset3.zip pset3/find/find.c
    unzip pset3.zip pset3/find/helpers.h
    

Now you have fresh copies of those three files.

  1. Navigate to pset3/find directory and execute make clean. This will ensure that make starts with a clean slate. Now execute make.

I hope I hear whistling! :)

For the record, here is my thinking from reading through your posts. You originally wrote your routines in helpers.c; you added a "main" loop and variables, so it would be a stand-alone program that you could test. That made it difficult to integrate it back into the find application and it was downhill from there. By now you are very frustrated and it makes it difficult to find your way back to where you were when your routines were working.

I thought I remembered a good discussion of libraries in the course materials somewhere, but I can't find it. I would hate to add confusion at this point, so I will keep looking and post a comment when I find what I'm looking for.

:wq