dgleich / matlab-bgl

A graph library for Matlab based on the boost graph library
http://dgleich.github.com/matlab-bgl
110 stars 70 forks source link

libmbgl/structure.cc not compile in gentoo 64bit ,boost 1.47 and gcc 4.5.3 #11

Closed luoq closed 11 years ago

luoq commented 12 years ago

See http://pastebin.com/f2GwRSb0 for the error log.

dgleich commented 12 years ago

Can you try Boost 1.48.0?

David

On Sat, Jul 7, 2012 at 12:05 PM, Qiang Luo reply@reply.github.com wrote:

See http://pastebin.com/f2GwRSb0 for the error log.


Reply to this email directly or view it on GitHub: https://github.com/dgleich/matlab-bgl/issues/11

luoq commented 12 years ago

I currently don't have boost 1.48 available. I tried boost 1.49,it gave roughly the same error.See http://pastebin.com/UfSBVQj7.

dgleich commented 12 years ago

Can you check and make sure some of the boost isomorphism examples compile?

Thanks, David

On Sat, Jul 7, 2012 at 10:44 PM, Qiang Luo reply@reply.github.com wrote:

I currently don't have boost 1.48 available. I tried boost 1.49,it gave roughly the same error.See http://pastebin.com/UfSBVQj7.


Reply to this email directly or view it on GitHub: https://github.com/dgleich/matlab-bgl/issues/11#issuecomment-6828431

luoq commented 12 years ago

I just installed boost-1.48,the error is exactly the same as boost-1.47.

I tried libs/graph/example/isomorphism.cpp which is the same under 1.47 to 1.49.It compiles correctly in all three versions.

dgleich commented 12 years ago

okay, it still works with g++ 4.4.5.

I'm about to head away on a trip; I won't really have a chance to look at it again until I get back. Is this an urgent issue?

David

On Sat, Jul 7, 2012 at 11:16 PM, Qiang Luo reply@reply.github.com wrote:

I just installed boost-1.48,the error is exactly the same as boost-1.47.

I tried libs/graph/example/isomorphism.cpp which is the same under 1.47 to 1.49.It compiles correctly in all three versions.


Reply to this email directly or view it on GitHub: https://github.com/dgleich/matlab-bgl/issues/11#issuecomment-6828571

luoq commented 12 years ago

No.Take your time. I can just remove structure.cc from compile targets.

luoq commented 11 years ago

This issue occurs because my Makefile is wrong. I do not define BOOST_DIR beacause it's in system include dir. So the command issued by g++ is

g++ -O2 -I./ -I -DMATLAB_BGL_LARGE_ARRAYS -fPIC -c -o structure.o structure.cc

It looks like '-DMATLAB_BGL_LARGE_ARRAYS' is parsed as a include dir for '-I' rather than macro definition. So MATLAB_BGL_LARGE_ARRAYS is not defined and mbglIndex is defined to int which cause the std::max used in isomorphism.hpp try to compare a unsigned int with unsighed long.

Defining BOOST_DIR to a dir solves this issue.