title: Compilation / linking error: Undefined symbols for architecture x86_64
body: <p>My Rust compiler version is: </p>
  
  <pre><code>$ rustc --version
  rustc 1.0.0-nightly (3e4be02b8 2015-03-13) (built 2015-03-13)
  </code></pre>
  
  <p>My Cargo version is:</p>
  
  <pre><code>$ cargo --version
  cargo 0.0.1-pre-nightly (66849de 2015-03-10) (built 2015-03-11)
  </code></pre>
  
  <p>I was happily coding my rust project when I got this compilation error:</p>
  
  <pre><code>    $ cargo build --verbose
         Fresh log v0.2.5
         Fresh rustc-serialize v0.3.6
         Fresh libc v0.1.3
         Fresh rand v0.1.4
         Fresh uuid v0.1.11
     Compiling rexchange v0.0.1 (file:///Users/sam/dev/rexchange)
       Running `rustc src/main.rs --crate-name rexchange --crate-type bin -g --out-dir /Users/sam/dev/rexchange/target/debug --emit=dep-info,link -L dependency=/Users/sam/dev/rexchange/target/debug -L dependency=/Users/sam/dev/rexchange/target/debug/deps --extern uuid=/Users/sam/dev/rexchange/target/debug/deps/libuuid-f80da2be6e37bdc9.rlib --extern rexchange=/Users/sam/dev/rexchange/target/debug/librexchange-436e10ddf2e26a6f.rlib`
  error: linking with `cc` failed: exit code: 1
  note: "cc" "-m64" "-L" "/usr/local/lib/rustlib/x86_64-apple-darwin/lib" "-o" "/Users/sam/dev/rexchange/target/debug/rexchange" "/Users/sam/dev/rexchange/target/debug/rexchange.o" "-Wl,-force_load,/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libmorestack.a" "-Wl,-dead_strip" "-nodefaultlibs" "/Users/sam/dev/rexchange/target/debug/librexchange-436e10ddf2e26a6f.rlib" "/Users/sam/dev/rexchange/target/debug/deps/libuuid-f80da2be6e37bdc9.rlib" "/Users/sam/dev/rexchange/target/debug/deps/librustc-serialize-6bb45c0d7c639d54.rlib" "/Users/sam/dev/rexchange/target/debug/deps/librand-6dfe5258ada5ebf2.rlib" "/Users/sam/dev/rexchange/target/debug/deps/liblibc-2a692f33a70517c8.rlib" "/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libstd-4e7c5e5c.rlib" "/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libcollections-4e7c5e5c.rlib" "/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libunicode-4e7c5e5c.rlib" "/usr/local/lib/rustlib/x86_64-apple-darwin/lib/librand-4e7c5e5c.rlib" "/usr/local/lib/rustlib/x86_64-apple-darwin/lib/liballoc-4e7c5e5c.rlib" "/usr/local/lib/rustlib/x86_64-apple-darwin/lib/liblibc-4e7c5e5c.rlib" "/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libcore-4e7c5e5c.rlib" "-L" "/Users/sam/dev/rexchange/target/debug" "-L" "/Users/sam/dev/rexchange/target/debug/deps" "-L" "/usr/local/lib/rustlib/x86_64-apple-darwin/lib" "-L" "/Users/sam/dev/rexchange/.rust/lib/x86_64-apple-darwin" "-L" "/Users/sam/dev/rexchange/lib/x86_64-apple-darwin" "-lc" "-lm" "-lSystem" "-lpthread" "-lc" "-lm" "-lcompiler-rt"
  note: ld: warning: directory not found for option '-L/Users/sam/dev/rexchange/.rust/lib/x86_64-apple-darwin'
  ld: warning: directory not found for option '-L/Users/sam/dev/rexchange/lib/x86_64-apple-darwin'
  Undefined symbols for architecture x86_64:
    "orders::BidOrder::get_account_id::hbe8193f627eb0daf4ba", referenced from:
        main::h6e33cd0005718795haa in rexchange.o
    "orders::BidOrder::get_currency_price::hac0a15cbc8d29001Gba", referenced from:
        main::h6e33cd0005718795haa in rexchange.o
    "orders::BidOrder::get_commodity_amount::hce97000d2a1749beSba", referenced from:
        main::h6e33cd0005718795haa in rexchange.o
  ld: symbol(s) not found for architecture x86_64
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  
  error: aborting due to previous error
  Could not compile `rexchange`.
  
  Caused by:
    Process didn't exit successfully: `rustc src/main.rs --crate-name rexchange --crate-type bin -g --out-dir /Users/sam/dev/rexchange/target/debug --emit=dep-info,link -L dependency=/Users/sam/dev/rexchange/target/debug -L dependency=/Users/sam/dev/rexchange/target/debug/deps --extern uuid=/Users/sam/dev/rexchange/target/debug/deps/libuuid-f80da2be6e37bdc9.rlib --extern rexchange=/Users/sam/dev/rexchange/target/debug/librexchange-4
  </code></pre>
  
  <p>I've no idea why this failure occurred and I couldn't find anything that looked similar. Can anyone explain to me what is going on and how to fix?</p>
  
  <p>The code is: <a href="https://github.com/samphippen/rexchange" rel="nofollow">https://github.com/samphippen/rexchange</a></p>