2014-02-12 38 views
3

我在xcode5中构建了我的makefile项目,这在大部分情况下工作得非常好。这是一个包含许多子目录的autoconf项目 - 没什么大不了的。xcode外部构建系统 - Shell脚本调用错误

但是,我确实遇到了问题导航器的问题。当我的项目中的某个文件存在一个错误时,xcode会正确检测问题并在问题导航器中发现错误 - 但是看起来xcode无法将错误链接到项目导航器中的文件。

在下面的例子中,我在其中一个方法“hello”中插入了一个垃圾字符串,这显然是编译器不满意的。不幸的是,.cpp文件无法找到,即使它的项目

Screenshot from Issue Navigator

我怀疑Xcode是做它通过解析生成文件/铛的输出++,并试图确定问题出在哪里最好内 - 但明显失败。

下面是从日志中的日志导航

/Applications/Xcode.app/Contents/Developer/usr/bin/make all-recursive 
Making all in src 
make[2]: Nothing to be done for `all'. 
Making all in src/pops 
make[2]: Nothing to be done for `all'. 
Making all in src/jops 
make[2]: Nothing to be done for `all'. 
Making all in src/jops/tops 
/bin/sh ../../../libtool --tag=CXX --mode=compile clang++ -std=c++11 -DHAVE_CONFIG_H -I. -I../../.. -I /usr/include/openssl -I../../../src/ -g -O2 -MT test.lo -MD -MP -MF .deps/test.Tpo -c -o test.lo test.cpp 
libtool: compile: clang++ -std=c++11 -DHAVE_CONFIG_H -I. -I../../.. -I /usr/include/openssl -I../../../src/ -g -O2 -MT test.lo -MD -MP -MF .deps/test.Tpo -c test.cpp -fno-common -DPIC -o .libs/test.o 
test.cpp:8:9: error: use of undeclared identifier 'hello' 
     hello 
     ^
1 error generated. 
make[2]: *** [test.lo] Error 1 
make[1]: *** [all-recursive] Error 1 
make: *** [all] Error 2 

谁能帮我帮xcode的定位问题导航器的文件?这将帮助我使用我非常喜欢的xcode IDE来调试此项目。

+1

我找到了一个hacky解决方案。在Makefile.am中,我在每个.cpp文件之前指定$ {PWD} /。 – stackmate

回答