Migrating code from snow leopard to mountain lion,

2019-08-09 05:43发布

问题:

I have a bunch of code that I frequently use which I bundle as a library (.a). Everything was working on my old macbookpro running snow leopard; but I've recently gotten a new laptop, and upgraded to mountain lion -- now I'm having lots of trouble building programs that worked before.

At the moment, I'm trying to re-build that library, when I run my makefile, I get the error

g++ -g -I/opt/local/include -L/opt/local/lib -M -MT './obj/TB_Numerical.o' TB_Numerical.cpp -MF obj/TB_Numerical.d
make: *** No rule to make target `/usr/include/c++/4.2.1/i686-apple-darwin10/x86_64/bits/c++config.h', needed by `obj/TB_RecordKeeper.o'.  Stop.

I'm not versed with makefiles, I just pieced something simple together from a few tutorials etc... If posting my Makefile would help, let me know.

If someone could help me with this particular error, that would be great. Also, if there's some... like, systematic 'new-thing' I need to be doing to get everything to work right... I'd also appreciate any pointers on that!

Thanks!

回答1:

I found the solution here: https://stackoverflow.com/a/5321472/230468

I needed to include system header files before application header files...

Why, in the name of anything holy, this error just came up after upgrading to mountain lion, an why that particular (seemingly useless) error message was given.... I do not know.