I am trying to build OpenCV on my computer, but I am getting a linker error when I go to make it. I am using OpenCV-2.4.2 on Mountain Lion. The error I'm getting is:

Linking CXX shared library ../../lib/libopencv_highgui.dylib
Undefined symbols for architecture x86_64:
"_dirac_encoder_close", referenced from:
_libdirac_encode_close in libavcodec.a(libdiracenc.o)
"_dirac_encoder_context_init", referenced from:
_libdirac_encode_init in libavcodec.a(libdiracenc.o)
"_dirac_encoder_end_sequence", referenced from:
_libdirac_encode_frame in libavcodec.a(libdiracenc.o)
"_dirac_encoder_init", referenced from:
_libdirac_encode_init in libavcodec.a(libdiracenc.o)
"_dirac_encoder_load", referenced from:
_libdirac_encode_frame in libavcodec.a(libdiracenc.o)
"_dirac_encoder_output", referenced from:
_libdirac_encode_frame in libavcodec.a(libdiracenc.o)
"_lame_close", referenced from:
_MP3lame_encode_init in libavcodec.a(libmp3lame.o)
_MP3lame_encode_close in libavcodec.a(libmp3lame.o)
"_lame_encode_buffer", referenced from:
_MP3lame_encode_frame in libavcodec.a(libmp3lame.o)
"_lame_encode_buffer_int", referenced from:
_MP3lame_encode_frame in libavcodec.a(libmp3lame.o)
"_lame_encode_buffer_interleaved", referenced from:
_MP3lame_encode_frame in libavcodec.a(libmp3lame.o)
"_lame_encode_flush", referenced from:
_MP3lame_encode_frame in libavcodec.a(libmp3lame.o)
"_lame_get_framesize", referenced from:
_MP3lame_encode_init in libavcodec.a(libmp3lame.o)
"_lame_init", referenced from:
_MP3lame_encode_init in libavcodec.a(libmp3lame.o)
"_lame_init_params", referenced from:
_MP3lame_encode_init in libavcodec.a(libmp3lame.o)
"_lame_set_VBR", referenced from:
_MP3lame_encode_init in libavcodec.a(libmp3lame.o)
"_lame_set_VBR_quality", referenced from:
_MP3lame_encode_init in libavcodec.a(libmp3lame.o)
"_lame_set_bWriteVbrTag", referenced from:
_MP3lame_encode_init in libavcodec.a(libmp3lame.o)
"_lame_set_brate", referenced from:
_MP3lame_encode_init in libavcodec.a(libmp3lame.o)
"_lame_set_disable_reservoir", referenced from:
_MP3lame_encode_init in libavcodec.a(libmp3lame.o)
"_lame_set_in_samplerate", referenced from:
_MP3lame_encode_init in libavcodec.a(libmp3lame.o)
"_lame_set_mode", referenced from:
_MP3lame_encode_init in libavcodec.a(libmp3lame.o)
"_lame_set_num_channels", referenced from:
_MP3lame_encode_init in libavcodec.a(libmp3lame.o)
"_lame_set_out_samplerate", referenced from:
_MP3lame_encode_init in libavcodec.a(libmp3lame.o)
"_lame_set_quality", referenced from:
_MP3lame_encode_init in libavcodec.a(libmp3lame.o)
"_opj_cio_close", referenced from:
_libopenjpeg_decode_frame in libavcodec.a(libopenjpeg.o)
"_opj_cio_open", referenced from:
_libopenjpeg_decode_frame in libavcodec.a(libopenjpeg.o)
"_opj_create_decompress", referenced from:
_libopenjpeg_decode_frame in libavcodec.a(libopenjpeg.o)
"_opj_decode_with_info", referenced from:
_libopenjpeg_decode_frame in libavcodec.a(libopenjpeg.o)
"_opj_destroy_decompress", referenced from:
_libopenjpeg_decode_frame in libavcodec.a(libopenjpeg.o)
"_opj_image_destroy", referenced from:
_libopenjpeg_decode_frame in libavcodec.a(libopenjpeg.o)
"_opj_set_default_decoder_parameters", referenced from:
_libopenjpeg_decode_init in libavcodec.a(libopenjpeg.o)
"_opj_set_event_mgr", referenced from:
_libopenjpeg_decode_frame in libavcodec.a(libopenjpeg.o)
"_opj_setup_decoder", referenced from:
_libopenjpeg_decode_frame in libavcodec.a(libopenjpeg.o)
"_schro_buffer_new_with_data", referenced from:
_libschroedinger_decode_frame in libavcodec.a(libschroedingerdec.o)
"_schro_buffer_unref", referenced from:
_libschroedinger_encode_frame in libavcodec.a(libschroedingerenc.o)
"_schro_debug_set_level", referenced from:
_libschroedinger_decode_init in libavcodec.a(libschroedingerdec.o)
_libschroedinger_encode_init in libavcodec.a(libschroedingerenc.o)
"_schro_decoder_add_output_picture", referenced from:
_libschroedinger_decode_frame in libavcodec.a(libschroedingerdec.o)
"_schro_decoder_free", referenced from:
_libschroedinger_decode_close in libavcodec.a(libschroedingerdec.o)
"_schro_decoder_get_video_format", referenced from:
_libschroedinger_handle_first_access_unit in libavcodec.a(libschroedingerdec.o)
"_schro_decoder_new", referenced from:
_libschroedinger_decode_init in libavcodec.a(libschroedingerdec.o)
"_schro_decoder_pull", referenced from:
_libschroedinger_decode_frame in libavcodec.a(libschroedingerdec.o)
"_schro_decoder_push", referenced from:
_libschroedinger_decode_frame in libavcodec.a(libschroedingerdec.o)
"_schro_decoder_push_end_of_stream", referenced from:
_libschroedinger_decode_frame in libavcodec.a(libschroedingerdec.o)
"_schro_decoder_reset", referenced from:
_libschroedinger_decode_frame in libavcodec.a(libschroedingerdec.o)
_libschroedinger_flush in libavcodec.a(libschroedingerdec.o)
"_schro_decoder_set_skip_ratio", referenced from:
_libschroedinger_decode_init in libavcodec.a(libschroedingerdec.o)
"_schro_decoder_wait", referenced from:
_libschroedinger_decode_frame in libavcodec.a(libschroedingerdec.o)
"_schro_encoder_end_of_stream", referenced from:
_libschroedinger_encode_frame in libavcodec.a(libschroedingerenc.o)
"_schro_encoder_free", referenced from:
_libschroedinger_encode_close in libavcodec.a(libschroedingerenc.o)
"_schro_encoder_get_video_format", referenced from:
_libschroedinger_encode_init in libavcodec.a(libschroedingerenc.o)
"_schro_encoder_new", referenced from:
_libschroedinger_encode_init in libavcodec.a(libschroedingerenc.o)
"_schro_encoder_pull", referenced from:
_libschroedinger_encode_frame in libavcodec.a(libschroedingerenc.o)
"_schro_encoder_push_frame", referenced from:
_libschroedinger_encode_frame in libavcodec.a(libschroedingerenc.o)
"_schro_encoder_set_video_format", referenced from:
_libschroedinger_encode_init in libavcodec.a(libschroedingerenc.o)
"_schro_encoder_setting_set_double", referenced from:
_libschroedinger_encode_init in libavcodec.a(libschroedingerenc.o)
"_schro_encoder_start", referenced from:
_libschroedinger_encode_init in libavcodec.a(libschroedingerenc.o)
"_schro_encoder_wait", referenced from:
_libschroedinger_encode_frame in libavcodec.a(libschroedingerenc.o)
"_schro_frame_new", referenced from:
_ff_create_schro_frame in libavcodec.a(libschroedinger.o)
"_schro_frame_set_free_callback", referenced from:
_ff_create_schro_frame in libavcodec.a(libschroedinger.o)
"_schro_frame_unref", referenced from:
_libschroedinger_decode_frame in libavcodec.a(libschroedingerdec.o)
_libschroedinger_decode_frame_free in libavcodec.a(libschroedingerdec.o)
"_schro_init", referenced from:
_libschroedinger_decode_init in libavcodec.a(libschroedingerdec.o)
_libschroedinger_encode_init in libavcodec.a(libschroedingerenc.o)
"_schro_video_format_set_std_signal_range", referenced from:
_libschroedinger_encode_init in libavcodec.a(libschroedingerenc.o)
"_schro_video_format_set_std_video_format", referenced from:
_libschroedinger_encode_init in libavcodec.a(libschroedingerenc.o)
"_speex_bits_destroy", referenced from:
_libspeex_decode_close in libavcodec.a(libspeexdec.o)
_libspeex_encode_close in libavcodec.a(libspeexenc.o)
"_speex_bits_init", referenced from:
_libspeex_decode_init in libavcodec.a(libspeexdec.o)
_libspeex_encode_init in libavcodec.a(libspeexenc.o)
"_speex_bits_insert_terminator", referenced from:
_libspeex_encode_frame in libavcodec.a(libspeexenc.o)
"_speex_bits_nbytes", referenced from:
_libspeex_encode_frame in libavcodec.a(libspeexenc.o)
"_speex_bits_read_from", referenced from:
_libspeex_decode_frame in libavcodec.a(libspeexdec.o)
"_speex_bits_remaining", referenced from:
_libspeex_decode_frame in libavcodec.a(libspeexdec.o)
"_speex_bits_reset", referenced from:
_libspeex_encode_frame in libavcodec.a(libspeexenc.o)
"_speex_bits_write", referenced from:
_libspeex_encode_frame in libavcodec.a(libspeexenc.o)
"_speex_decode_int", referenced from:
_libspeex_decode_frame in libavcodec.a(libspeexdec.o)
"_speex_decode_stereo_int", referenced from:
_libspeex_decode_frame in libavcodec.a(libspeexdec.o)
"_speex_decoder_ctl", referenced from:
_libspeex_decode_init in libavcodec.a(libspeexdec.o)
"_speex_decoder_destroy", referenced from:
_libspeex_decode_close in libavcodec.a(libspeexdec.o)
"_speex_decoder_init", referenced from:
_libspeex_decode_init in libavcodec.a(libspeexdec.o)
"_speex_encode", referenced from:
_libspeex_encode_frame in libavcodec.a(libspeexenc.o)
"_speex_encode_int", referenced from:
_libspeex_encode_frame in libavcodec.a(libspeexenc.o)
"_speex_encode_stereo", referenced from:
_libspeex_encode_frame in libavcodec.a(libspeexenc.o)
"_speex_encode_stereo_int", referenced from:
_libspeex_encode_frame in libavcodec.a(libspeexenc.o)
"_speex_encoder_ctl", referenced from:
_libspeex_encode_init in libavcodec.a(libspeexenc.o)
"_speex_encoder_destroy", referenced from:
_libspeex_encode_close in libavcodec.a(libspeexenc.o)
"_speex_encoder_init", referenced from:
_libspeex_encode_init in libavcodec.a(libspeexenc.o)
"_speex_header_free", referenced from:
_libspeex_decode_close in libavcodec.a(libspeexdec.o)
_libspeex_encode_close in libavcodec.a(libspeexenc.o)
"_speex_header_to_packet", referenced from:
_libspeex_encode_init in libavcodec.a(libspeexenc.o)
"_speex_init_header", referenced from:
_libspeex_encode_init in libavcodec.a(libspeexenc.o)
"_speex_lib_get_mode", referenced from:
_libspeex_decode_init in libavcodec.a(libspeexdec.o)
"_speex_nb_mode", referenced from:
_libspeex_decode_init in libavcodec.a(libspeexdec.o)
_libspeex_encode_init in libavcodec.a(libspeexenc.o)
"_speex_packet_to_header", referenced from:
_libspeex_decode_init in libavcodec.a(libspeexdec.o)
"_speex_std_stereo_request_handler", referenced from:
_libspeex_decode_init in libavcodec.a(libspeexdec.o)
"_speex_uwb_mode", referenced from:
_libspeex_decode_init in libavcodec.a(libspeexdec.o)
_libspeex_encode_init in libavcodec.a(libspeexenc.o)
"_speex_wb_mode", referenced from:
_libspeex_decode_init in libavcodec.a(libspeexdec.o)
_libspeex_encode_init in libavcodec.a(libspeexenc.o)
"_th_comment_clear", referenced from:
_encode_init in libavcodec.a(libtheoraenc.o)
"_th_comment_init", referenced from:
_encode_init in libavcodec.a(libtheoraenc.o)
"_th_encode_alloc", referenced from:
_encode_init in libavcodec.a(libtheoraenc.o)
"_th_encode_ctl", referenced from:
_encode_init in libavcodec.a(libtheoraenc.o)
_get_stats in libavcodec.a(libtheoraenc.o)
_submit_stats in libavcodec.a(libtheoraenc.o)
"_th_encode_flushheader", referenced from:
_encode_init in libavcodec.a(libtheoraenc.o)
"_th_encode_free", referenced from:
_encode_close in libavcodec.a(libtheoraenc.o)
"_th_encode_packetout", referenced from:
_encode_frame in libavcodec.a(libtheoraenc.o)
"_th_encode_ycbcr_in", referenced from:
_encode_frame in libavcodec.a(libtheoraenc.o)
"_th_info_clear", referenced from:
_encode_init in libavcodec.a(libtheoraenc.o)
"_th_info_init", referenced from:
_encode_init in libavcodec.a(libtheoraenc.o)
"_vorbis_analysis", referenced from:
_oggvorbis_encode_frame in libavcodec.a(libvorbis.o)
"_vorbis_analysis_blockout", referenced from:
_oggvorbis_encode_frame in libavcodec.a(libvorbis.o)
"_vorbis_analysis_buffer", referenced from:
_oggvorbis_encode_frame in libavcodec.a(libvorbis.o)
"_vorbis_analysis_headerout", referenced from:
_oggvorbis_encode_init in libavcodec.a(libvorbis.o)
"_vorbis_analysis_init", referenced from:
_oggvorbis_encode_init in libavcodec.a(libvorbis.o)
"_vorbis_analysis_wrote", referenced from:
_oggvorbis_encode_frame in libavcodec.a(libvorbis.o)
_oggvorbis_encode_close in libavcodec.a(libvorbis.o)
"_vorbis_bitrate_addblock", referenced from:
_oggvorbis_encode_frame in libavcodec.a(libvorbis.o)
"_vorbis_bitrate_flushpacket", referenced from:
_oggvorbis_encode_frame in libavcodec.a(libvorbis.o)
"_vorbis_block_clear", referenced from:
_oggvorbis_encode_close in libavcodec.a(libvorbis.o)
"_vorbis_block_init", referenced from:
_oggvorbis_encode_init in libavcodec.a(libvorbis.o)
"_vorbis_comment_add_tag", referenced from:
_oggvorbis_encode_init in libavcodec.a(libvorbis.o)
"_vorbis_comment_clear", referenced from:
_oggvorbis_encode_init in libavcodec.a(libvorbis.o)
"_vorbis_comment_init", referenced from:
_oggvorbis_encode_init in libavcodec.a(libvorbis.o)
"_vorbis_dsp_clear", referenced from:
_oggvorbis_encode_close in libavcodec.a(libvorbis.o)
"_vorbis_encode_ctl", referenced from:
_oggvorbis_encode_init in libavcodec.a(libvorbis.o)
"_vorbis_encode_setup_init", referenced from:
_oggvorbis_encode_init in libavcodec.a(libvorbis.o)
"_vorbis_encode_setup_managed", referenced from:
_oggvorbis_encode_init in libavcodec.a(libvorbis.o)
"_vorbis_encode_setup_vbr", referenced from:
_oggvorbis_encode_init in libavcodec.a(libvorbis.o)
"_vorbis_info_clear", referenced from:
_oggvorbis_encode_close in libavcodec.a(libvorbis.o)
"_vorbis_info_init", referenced from:
_oggvorbis_encode_init in libavcodec.a(libvorbis.o)
"_vpx_codec_build_config", referenced from:
_vp8_init in libavcodec.a(libvpxdec.o)
_vp8_init in libavcodec.a(libvpxenc.o)
"_vpx_codec_control_", referenced from:
_codecctl_int in libavcodec.a(libvpxenc.o)
"_vpx_codec_dec_init_ver", referenced from:
_vp8_init in libavcodec.a(libvpxdec.o)
"_vpx_codec_decode", referenced from:
_vp8_decode in libavcodec.a(libvpxdec.o)
"_vpx_codec_destroy", referenced from:
_vp8_free in libavcodec.a(libvpxdec.o)
_vp8_init in libavcodec.a(libvpxenc.o)
_vp8_free in libavcodec.a(libvpxenc.o)
"_vpx_codec_enc_config_default", referenced from:
_vp8_init in libavcodec.a(libvpxenc.o)
"_vpx_codec_enc_init_ver", referenced from:
_vp8_init in libavcodec.a(libvpxenc.o)
"_vpx_codec_encode", referenced from:
_vp8_encode in libavcodec.a(libvpxenc.o)
"_vpx_codec_err_to_string", referenced from:
_vp8_init in libavcodec.a(libvpxenc.o)
"_vpx_codec_error", referenced from:
_vp8_init in libavcodec.a(libvpxdec.o)
_vp8_decode in libavcodec.a(libvpxdec.o)
_vp8_init in libavcodec.a(libvpxenc.o)
_vp8_encode in libavcodec.a(libvpxenc.o)
_codecctl_int in libavcodec.a(libvpxenc.o)
"_vpx_codec_error_detail", referenced from:
_vp8_decode in libavcodec.a(libvpxdec.o)
_vp8_init in libavcodec.a(libvpxenc.o)
_vp8_encode in libavcodec.a(libvpxenc.o)
_codecctl_int in libavcodec.a(libvpxenc.o)
"_vpx_codec_get_cx_data", referenced from:
_vp8_encode in libavcodec.a(libvpxenc.o)
"_vpx_codec_get_frame", referenced from:
_vp8_decode in libavcodec.a(libvpxdec.o)
"_vpx_codec_version_str", referenced from:
_vp8_init in libavcodec.a(libvpxdec.o)
_vp8_init in libavcodec.a(libvpxenc.o)
"_vpx_codec_vp8_cx_algo", referenced from:
_vp8_init in libavcodec.a(libvpxenc.o)
"_vpx_codec_vp8_dx_algo", referenced from:
_vp8_init in libavcodec.a(libvpxdec.o)
"_vpx_img_wrap", referenced from:
_vp8_init in libavcodec.a(libvpxenc.o)
"_x264_encoder_close", referenced from:
_X264_close in libavcodec.a(libx264.o)
"_x264_encoder_delayed_frames", referenced from:
_X264_frame in libavcodec.a(libx264.o)
"_x264_encoder_encode", referenced from:
_X264_frame in libavcodec.a(libx264.o)
"_x264_encoder_headers", referenced from:
_X264_init in libavcodec.a(libx264.o)
"_x264_encoder_open_119", referenced from:
_X264_init in libavcodec.a(libx264.o)
"_x264_encoder_reconfig", referenced from:
_X264_frame in libavcodec.a(libx264.o)
"_x264_param_apply_fastfirstpass", referenced from:
_X264_init in libavcodec.a(libx264.o)
"_x264_param_apply_profile", referenced from:
_X264_init in libavcodec.a(libx264.o)
"_x264_param_default", referenced from:
_X264_init in libavcodec.a(libx264.o)
"_x264_param_default_preset", referenced from:
_X264_init in libavcodec.a(libx264.o)
"_x264_param_parse", referenced from:
_X264_init in libavcodec.a(libx264.o)
"_x264_picture_init", referenced from:
_X264_frame in libavcodec.a(libx264.o)
"_xvid_encore", referenced from:
_xvid_encode_init in libavcodec.a(libxvidff.o)
_xvid_encode_frame in libavcodec.a(libxvidff.o)
_xvid_encode_close in libavcodec.a(libxvidff.o)
"_xvid_global", referenced from:
_xvid_encode_init in libavcodec.a(libxvidff.o)
"_xvid_plugin_2pass2", referenced from:
_xvid_encode_init in libavcodec.a(libxvidff.o)
_ff_xvid_rate_control_init in libavcodec.a(libxvid_rc.o)
_ff_xvid_rate_estimate_qscale in libavcodec.a(libxvid_rc.o)
_ff_xvid_rate_control_uninit in libavcodec.a(libxvid_rc.o)
"_xvid_plugin_lumimasking", referenced from:
_xvid_encode_init in libavcodec.a(libxvidff.o)
"_xvid_plugin_single", referenced from:
_xvid_encode_init in libavcodec.a(libxvidff.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [lib/libopencv_highgui.2.4.2.dylib] Error 1
make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2
make: *** [all] Error 2

Has anyone else had this problem? Anyone know how to fix it?