HongxingGao / protobuf-matlab

Automatically exported from code.google.com/p/protobuf-matlab
Other
0 stars 0 forks source link

Undefined symbols for architecture x86_64 #10

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
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 cxw.appl...@gmail.com on 19 Oct 2013 at 4:11

GoogleCodeExporter commented 9 years ago
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 andru.pu...@gmail.com on 28 Mar 2014 at 2:36

Attachments: