Re: undefined reference to `__w32_sharedptr_unexpected'

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

 



Aaron Patton wrote:

> There is a library called libgfortranbegin located at
> C:\msys\1.0\mingw\lib\gcc\i586-pc-mingw32\4.4.0. Is that where I should 
> be pointing? If so, how do I get ld to look there instead?

You shouldn't have to point to it, the compiler is supposed to be able
to find its own libraries without you telling it anything beyond
-lgfortranbegin.

> aaronrpatton@AARONRPATTON-PC /c/ers/dev_code/fortran/CIRFETS
> $ echo $PATH
> C:\msys\1.0\mingw\bin

This normally should contain a lot more, such as the Windows system32
directory.  But in any case, PATH not affect where libraries are
searched by the linker.

> aaronrpatton@AARONRPATTON-PC /c/ers/dev_code/fortran/CIRFETS
> $ echo $LD_LIBRARY_PATH
> C:/msys/1.0/mingw/lib

As I said before this variable is not used on MinGW.

> aaronrpatton@AARONRPATTON-PC /c/ers/dev_code/fortran/CIRFETS
> $ echo $LIBRARY_PATH
> C:\msys\1.0\mingw\lib

You should not need to set this at all.  I don't know if it's causing
the problem having it set, but try running the command below again
without it set.

> aaronrpatton@AARONRPATTON-PC /c/ers/dev_code/fortran/CIRFETS
> $ make -f Makefile
> C:/msys/1.0/mingw/bin/g++ -o cirfets CIRFTYPES.o CIRFETS.o CIRFCHANS.o
> CIRFERRS.o CIRFIO.o CIRFPOST.o CIRFSUBS.o libiolib.a -lgfortranbegin
> -lgfortran
> C:\msys\1.0\mingw\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe:
> cannot find -lgfortranbegin
> collect2: ld returned 1 exit status
> C:\msys\1.0\mingw\bin\make.exe: *** [cirfets] Error 1

You could also go back to using gfortran to link with -lstdc++ -lsupc++.

Brian

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux