Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8692963
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T00:26:01+00:00 2026-06-13T00:26:01+00:00

I am attempting to build a very simple command line application, in Xcode, that

  • 0

I am attempting to build a very simple command line application, in Xcode, that will print out basic information about MXF video files. In order to do this I need to use the libmxf, libbmx, and libbmx libraries available for download here:

http://sourceforge.net/p/bmxlib/home/Home/

My C++ code is incredibly simple at this point:

#include <iostream>
#include <cstdio>
#include <cstring>
#include <cerrno>
#include <vector>

#include <bmx/mxf_reader/MXFFileReader.h>
#include <bmx/mxf_reader/MXFGroupReader.h>
#include <bmx/mxf_reader/MXFSequenceReader.h>
#include <bmx/mxf_reader/MXFFrameMetadata.h>
#include <bmx/MXFUtils.h>
#include <bmx/Utils.h>

using namespace std;
using namespace bmx;

#define MXF_OPEN_READ(fn, pf)   mxf_disk_file_open_read(fn, pf)

int main(int argc, const char * argv[])
{
    std::vector<const char *> filenames;
    std::cout << "mxfheader: execution beginning...\n";
    for (int cmdln_index = 0; cmdln_index < argc; cmdln_index++) {
        if (!check_file_exists(argv[cmdln_index])) {
            if (argv[cmdln_index][0] == '-') {
                fprintf(stderr, "Unknown argument '%s'\n", argv[cmdln_index]);
            } else {
                fprintf(stderr, "Failed to open input filename '%s'\n", argv[cmdln_index]);
            }
            return 1;
        }
        filenames.push_back(argv[cmdln_index]);
    }

    std::cout << filenames[0] << "\n";
    return 0;
}

When I compiled the BMX library, I was sure to run configure with 64-bit support, like so:

./configure --build=x86_64-apple-darwin11.4.2 --host=x86_64-apple-darwin11.4.2 CFLAGS="-arch x86_64" CXXFLAGS="-arch x86_64" LDFLAGS="-arch x86_64" CC=clang CXX=clang++

In the XCode Project under Build Settings, I have added /usr/local/lib to my Search Paths. Under Build Phases, I have added “libbmx-0.1.3.dylib”, “libMXF-1.0.4.dylib”, and “libMXF++-1.0.4.dylib” to the “Link Binary With Libraries” section.

I have verified that these libraries are, indeed, 64-bit ( file libbmx-0.1.3.dylib returns libbmx-0.1.3.dylib: Mach-O 64-bit dynamically linked shared library x86_64 ).

Every time I try and build the application, I get the following linker error:

Ld /Users/ned/Library/Developer/Xcode/DerivedData/mxfheader-bkwawmplsoqpdadfxartceqkbolo/Build/Products/Debug/mxfheader normal x86_64
    cd /Users/ned/Documents/src/mxfheader
    setenv MACOSX_DEPLOYMENT_TARGET 10.7
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -L/Users/ned/Library/Developer/Xcode/DerivedData/mxfheader-bkwawmplsoqpdadfxartceqkbolo/Build/Products/Debug -L/usr/local/lib -F/Users/ned/Library/Developer/Xcode/DerivedData/mxfheader-bkwawmplsoqpdadfxartceqkbolo/Build/Products/Debug -filelist /Users/ned/Library/Developer/Xcode/DerivedData/mxfheader-bkwawmplsoqpdadfxartceqkbolo/Build/Intermediates/mxfheader.build/Debug/mxfheader.build/Objects-normal/x86_64/mxfheader.LinkFileList -mmacosx-version-min=10.7 -stdlib=libc++ -lbmx-0.1.3 -lMXF-1.0.4 -lMXF++-1.0.4 -o /Users/ned/Library/Developer/Xcode/DerivedData/mxfheader-bkwawmplsoqpdadfxartceqkbolo/Build/Products/Debug/mxfheader

Undefined symbols for architecture x86_64:
  "bmx::check_file_exists(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)", referenced from:
      _main in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Any help would be appreciated. Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T00:26:02+00:00Added an answer on June 13, 2026 at 12:26 am

    Your problem is the option: -stdlib=libc++ in the command line. It’s causing a link to the wrong libc++, you need to make it -stdlib=libstdc++, as this is the stdlib that the libbmx library is compiled against.

    under the Apple LLVM compiler options for the C++ standard library, select: libstdc++, or pick compiler default (which should choose libstdc++ also)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm attempting to build a very simple wxPython GUI that monitors and displays external
I am attempting to build a script that will log data that changes every
I'm attempting to build a page that displays the same set of information of
I am attempting to build a Restful service that will allow me to do
We are attempting to build something akin to a very basic version of a
I am attempting to build a simple method that creates an XML file from
I'm attempting to build a method call from strings that have been passed into
I'm attempting to build a JSF/Hibernate application using Java 7 and Tomcat 7. I
I am attempting to build a backup script that moves a tar file from
I'm attempting to build some C++ code that requires the Windows 7.0 SDK header

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.