We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, I compiled following C++ code in linux machine using g++ -c code.cpp -o code.o
g++ -c code.cpp -o code.o
#include <iostream> using namespace std; int main() { cout << "ABC" << endl; return 0; }
Then I converted code.o to code_mac.o using ./objconv -fmacho64 -nu code.o code_mac.o on mac.
code.o
code_mac.o
./objconv -fmacho64 -nu code.o code_mac.o
Then I tried to build executable in mac using g++ code_mac.o -o code_mac
g++ code_mac.o -o code_mac
and I'm getting following error :
"std::ostream::operator<<(std::ostream& (*)(std::ostream&))", referenced from: _main in mohit_1.o "std::ios_base::Init::Init()", referenced from: _main in mohit_1.o "std::ios_base::Init::~Init()", referenced from: _main in mohit_1.o "std::cout", referenced from: _main in mohit_1.o "std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&)", referenced from: _main in mohit_1.o "std::basic_ostream<char, std::char_traits<char> >& std::operator<<<std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)", referenced from: _main in mohit_1.o "___mh_execute_header", referenced from: _main in mohit_1.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
What am i missing ? Doesn't objconv change the standard library (libstdc++) when I converted a linux binary to mac binary ?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi, I compiled following C++ code in linux machine using
g++ -c code.cpp -o code.o
Then I converted
code.o
tocode_mac.o
using./objconv -fmacho64 -nu code.o code_mac.o
on mac.Then I tried to build executable in mac using
g++ code_mac.o -o code_mac
and I'm getting following error :
What am i missing ?
Doesn't objconv change the standard library (libstdc++) when I converted a linux binary to mac binary ?
The text was updated successfully, but these errors were encountered: