Migrating code from snow leopard to mountain lion, make and linking errors with 'x86_64'

纵然是瞬间 提交于 2019-12-24 09:19:00

问题


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.



来源:https://stackoverflow.com/questions/12031786/migrating-code-from-snow-leopard-to-mountain-lion-make-and-linking-errors-with

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!