octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: link error of liboctave (MinGW build)


From: Tatsuro MATSUOKA
Subject: Re: link error of liboctave (MinGW build)
Date: Thu, 7 Jan 2010 18:37:35 +0900 (JST)

Hello

I strongly appreciate for your help 

--- "John W. Eaton"  wrote:

> On  7-Jan-2010, Tatsuro MATSUOKA wrote:
> 
> | I have at last reached to link stage of liboctave.  However, unfortunately, 
> error occurred
> 
> | DLLs..libs/liboctave_la-glob-match.o:glob-match.cc:(.text+0x6e3): undefined 
> reference to
> | `rpl_glob(char const*, int, int (*)(char const*, int), glob_t*)'
> | .libs/liboctave_la-glob-match.o:glob-match.cc:(.text+0x893): undefined 
> reference
> | to`rpl_globfree(glob_t*)'
> | ../libgnu/.libs/libgnu.a(getlogin_r.o):getlogin_r.c:(.text+0x11): undefined 
> reference to
> `getlogin'
> | collect2: ld returned 1 exit status
> | 
> | For errors related glob, I have looked into glob.in.h
> 
> To see what is actually compiled, you should be looking at the
> generated glob.h file in the libgnu directory of your build tree.
> 
> | The followings are found
> | #define glob rpl_glob
> | #define globfree rpl_globfree
> | #define glob_pattern_p rpl_glob_pattern_p
> | However there are no rpl_???? functions in glob.c.
> 
> I think this may be another case of missing extern "C" somewhere.
> What is the output of
What you pointed out is completely right.

I add a 'extern "C" {} block' in glob.h in libgnu generated in build tree and 
confirmed that  
errors which came from glob were disappeared as,

c:/programs/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../libmingwex.a(mbrtowc.o):mbrtowc.c:(.text+0x1d0):
multiple definition of `mbsrtowcs'
c:/programs/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../libmsvcp60.a(dczhs00003.o):(.text+0x0):
 first
defined here
c:/programs/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../../mingw32/bin/ld.exe: 
warning: auto-importing
has been activated without --enable-auto-import specified on the command line.
This should work unless it involves constant data structures referencing 
symbols from auto-imported
DLLs.
../libgnu/.libs/libgnu.a(getlogin_r.o):getlogin_r.c:(.text+0x11): undefined 
reference to `getlogin'

> Clearly the getlogin_r.c function from gnulib expects the getlogin
> function to exist.  I'm not sure what the correct fix is here.    I'll
> ask the gnulib maintainers.

I have confirmed your post to the gnulib ML. I will wait for maintainers reply.

Regards

Tatsuro

--------------------------------------
Get the new Internet Explorer 8 optimized for Yahoo! JAPAN
http://pr.mail.yahoo.co.jp/ie8/


reply via email to

[Prev in Thread] Current Thread [Next in Thread]