Linking Problems and undefined references to standart functions

Csaba Raduly rcsaba@gmail.com
Tue Apr 30 13:20:00 GMT 2013


Hi Sonya,

On Tue, Apr 30, 2013 at 9:18 AM, Sonya Blade wrote:
> Dear All,
>
> I tried to use the Petsc library, compiled without any error during cygwin terminalcompilation,
> with gfortran (which works in Code Block editor) and tried to run some of the examples which
> flawlessly works in C but not in gfortran.
>
> Although I used and set the same library in linking, headers and search as is in C when it
> comes to gfortran it raises the following errors. I don't think that its related to the Petsc
> instead due to some wrong configuration I get such and error.
>
> Does any body can help?
>
>
> cygdrive/c/Users/...../Downloads/petsc-3.3-p6/src/sys/ftn-custom/zstart.c:262: undefined reference to `__getreent'
> /cygdrive/c/Users/...../Downloads/petsc-3.3-p6/src/sys/ftn-custom/zstart.c:263: undefined reference to `__getreent'
> C:/Users/...../Downloads/petsc-3.3-p6/arch-mswin-c-debug/lib/libpetsc.a(mal.c.o): In function `PetscMallocAlign':
> /cygdrive/c/Users/...../Downloads/petsc-3.3-p6/src/sys/memory/mal.c:30: undefined reference to `memalign'
> C:/Users/...../Downloads/petsc-3.3-p6/arch-mswin-c-debug/lib/libpetsc.a(pinit.c.o): In function `PetscInitialize':
> /cygdrive/c/Users/...../Downloads/petsc-3.3-p6/src/sys/objects/pinit.c:650: undefined reference to `__getreent'
> /cygdrive/c/Users/...../Downloads/petsc-3.3-p6/src/sys/objects/pinit.c:651: undefined reference to `__getreent'
> C:/Users/...../Downloads/petsc-3.3-p6/arch-mswin-c-debug/lib/libpetsc.a(pinit.c.o): In function `PetscFinalize':
> /cygdrive/c/Users/...../Downloads/petsc-3.3-p6/src/sys/objects/pinit.c:1002: undefined reference to `__getreent'
> /cygdrive/c/Users/...../Downloads/petsc-3.3-p6/src/sys/objects/pinit.c:1130: undefined reference to `__getreent'
> /cygdrive/c/Users/...../Downloads/petsc-3.3-p6/src/sys/objects/pinit.c:1151: undefined reference to `__getreent'
> C:/Users/...../Downloads/petsc-3.3-p6/arch-mswin-c-debug/lib/libpetsc.a(mprint.c.o): In function `PetscSynchronizedFGets':
> /cygdrive/c/Users/...../Downloads/petsc-3.3-p6/src/sys/fileio/mprint.c:661: undefined reference to `__errno'
> C:/Users/...../Downloads/petsc-3.3-p6/arch-mswin-c-debug/lib/libpetsc.a(options.c.o): In function `PetscOptionsValidKey':
> /cygdrive/c/Users/...../Downloads/petsc-3.3-p6/src/sys/objects/options.c:256: undefined reference to `_imp____ctype_ptr__'
> /cygdrive/c/Users/...../Downloads/petsc-3.3-p6/src/sys/objects/options.c:257: undefined reference to `_imp____ctype_ptr__'
> C:/Users/...../Downloads/petsc-3.3-p6/arch-mswin-c-debug/lib/libpetsc.a(options.c.o): In function `PetscOptionsInsert':
> /cygdrive/c/Users/...../Downloads/petsc-3.3-p6/src/sys/objects/options.c:599: undefined reference to `__getreent'

What was the linker command that generated these errors?

Csaba
-- 
GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++
The Tao of math: The numbers you can count are not the real numbers.
Life is complex, with real and imaginary parts.
"Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds
"People disagree with me. I just ignore them." -- Linus Torvalds

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list