Skip to content
New issue

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

Undefined symbols for architecture x86_64 #10

Open
GoogleCodeExporter opened this issue Jul 27, 2015 · 1 comment
Open

Undefined symbols for architecture x86_64 #10

GoogleCodeExporter opened this issue Jul 27, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1.Download the protobuf src from google code.
2.Download the protobuf-matlab src 
3.Do the src copy as stated in README.txt of protobuf-matlab
4. ./configure
5. make

We will get:

Making check in src
/bin/sh ../libtool --tag=CXX   --mode=link g++ -D_THREAD_SAFE  -Wall 
-Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -O2 -g -DNDEBUG 
-D_THREAD_SAFE   -o protoc main.o  libprotobuf.la libprotoc.la -lz 
libtool: link: g++ -D_THREAD_SAFE -Wall -Wwrite-strings -Woverloaded-virtual 
-Wno-sign-compare -O2 -g -DNDEBUG -D_THREAD_SAFE -o .libs/protoc main.o 
-Wl,-bind_at_load  ./.libs/libprotobuf.dylib ./.libs/libprotoc.dylib 
/Users/mezcal/protobuf/protobuf-2.5.0/src/.libs/libprotobuf.dylib -lz
Undefined symbols for architecture x86_64:
  "farsounder::protobuf::compiler::matlab::MatlabGenerator::MatlabGenerator()", referenced from:
      _main in main.o
  "farsounder::protobuf::compiler::matlab::MatlabGenerator::~MatlabGenerator()", referenced from:
      _main in main.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status


What is the expected output? What do you see instead?
Successfully compiled and make.

What version of the product are you using? On what operating system?
My OS is mac os 10.7 64bit.

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 19 Oct 2013 at 4:11

@GoogleCodeExporter
Copy link
Author

I solved this problem by changing the Makefile.in file in the src folder. 
Basically all the matlab files are not included in the compilation. Typically, 
the Makefile.in can be automatically reproduced using automake and the (new) 
Makefile.am. However, I didn't manage to do it, so I manually updated the 
Makefile.in. It was quite tedious. Basically, I just wrote the same thing for 
matlab that python has.

The Makefile.in is attached. So far it is compiled, however not yet tested.

Original comment by [email protected] on 28 Mar 2014 at 2:36

Attachments:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant