Code for Next Assignment Posted

Code for the next assignment can be downloaded here:

ddg_normals.zip

We’ll provide more details about the actual assignment later this week (including the due date), but for now just try to see if you can get the code to compile.

Instructions on getting started can be found in the user guide — this precise sequence of steps may not work for you, but it should at least get you started. If you’re having trouble (or finding wild success!), feel free to gripe about it in the comments (below).

Finally, if you’ve never seen C++ before, don’t freak out — the path is pretty clearly laid out for you in the assignment.

6 Responses to “Code for Next Assignment Posted”

  1. Keenan says:

    Remember that we’re meeting tomorrow evening at 8pm in the Annenberg computer lab. Bring your computer!

  2. Ilya Nepomnyashchiy says:

    A note to anyone using OS X Lion (and probably any other OS X version), in the SuiteSparse UFConfig.mk file, there is a line that reads ‘BLAS = -lblas -lgfortran’. Removing the ‘-lgfortran’ line made everything compile and work for me (at least for now, and if the comments in these files are to be believed, I’m probably just running everything super suboptimally).

    Dumb question about C++: I’ve been installing libraries on my computer all weekend and then linking cpp files seems to require a -lnameoflibrary flag to g++. Where does g++ keep information on what all these flags are asking it to do?

    • There actually isn’t any information to keep – but it probably looks like magic because your library directories are already set up properly. For example, when you specify -lbeenz, g++ looks for libbeenz.a in your library directories (directories specified via -L command-line options or environment variables or on $PATH) and links with it.

    • Ilya Nepomnyashchiy says:

      Also, to clarify, I meant “Removing the ‘-lgfortran’ flag” not “line” (so the line now reads ‘BLAS = -lblas’).

  3. Keenan says:

    By the way, the bunny should be black if everything is working properly! Achieving more interesting shading will be part of the next assignment.

  4. Keenan says:

    If you’ve been trying to get the code to build on Windows/Cygwin, try downloading the latest version (by clicking on the link above). I’ve also updated the documentation with some additional information on installing BLAS and SuiteSparse under Cygwin.