--- In [email protected], "Geert Vancompernolle"
<[EMAIL PROTECTED]> wrote:
>
> Hi,
> 
> When compiling an applicaiton, I only have part of the file name path
> when an error occurs.  See below for an example:
> 
> plink [EMAIL PROTECTED] ./domo.sh
> Process started >>>
> Making all in ../i2clib for cris-axis-linux-gnu
> Making all in i2chal for cris-axis-linux-gnu
> Making all in 8574io for cris-axis-linux-gnu
> Making all in 8583rtc for cris-axis-linux-gnu
>  ==> Creating library "lib/libi2clib.a"...
> ar-cris cr lib/libi2clib.a 8574io/obj/8574io.o 8583rtc/obj/8583rtc.o
> i2chal/obj/i2chal.o
> g++-cris  -isystem
>
/home/foxboard/phrozen2/devboard-R2_01/target/cris-axis-linux-gnu/include
> -mlinux -mno-mul-bug-workaround -Wall -Wshadow -O0 -g
> -fno-omit-frame-pointer  -DGVCDEBUG -c src/i2cdevlibtest.cpp -o
> src/i2cdevlibtest.o
> src/i2cdevlibtest.cpp: In member function `int
> CI2cDevLibTest::RunExample()':
> src/i2cdevlibtest.cpp:912: `pr' undeclared (first use this function)
> src/i2cdevlibtest.cpp:912: (Each undeclared identifier is reported
> only once 
>    for each function it appears in.)
> src/i2cdevlibtest.cpp:912: parse error before `(' token
> make: *** [src/i2cdevlibtest.o] Error 1
> <<< Process finished.
> ================ READY ================
> 
> Here, the problem is located in "i2cdevlibtest.cpp", but I don't have
> the full path name.
> 
> Is there an option in GNU to show the complete path iso only the
> partial one?
> 
> Best rgds,
> 
> --Geert
>
 Found the answer myself...

In the makefile, I had the following "construction" (abstract):

include $(AXIS_TOP_DIR)/tools/build/Rules.axis

FOXY      = main
PROGRAM   = exe/$(FOXY)

OBJS     += src/main.o
OBJS     += src/i2cdevlibtest.o

# "-L." means: look into current dir to find the lib mentioned
hereafter...
# If library is in other location, specify
"-L/mylilbocation/local/lib/i2c -li2chal"
LDLIBS += -L../i2clib/lib -li2clib -L../threadlib/lib -lthreadlib
-lpthread

I just added "$(shell pwd)" in front of the objects and it solved my
problem.  Now it looks like this:

include $(AXIS_TOP_DIR)/tools/build/Rules.axis

FOXY      = main
PROGRAM   = exe/$(FOXY)

OBJS     += $(shell pwd)/src/main.o
OBJS     += $(shell pwd)/src/i2cdevlibtest.o

# "-L." means: look into current dir to find the lib mentioned
hereafter...
# If library is in other location, specify
"-L/mylilbocation/local/lib/i2c -li2chal"
LDLIBS += -L../i2clib/lib -li2clib -L../threadlib/lib -lthreadlib
-lpthread

Maybe of use to somebody else also...

To me: case closed!

Best rgds,

--Geert

Reply via email to