This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: undefined reference to `__w32_sharedptr_unexpected'


Brian Dessent wrote:
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


Good news -- it finally compiled. I really appreciate your help. I had edited my MS path environmental variable manually (incorrectly -- I might add). When I removed the mingw stuff from the path, it compiled.

Again Thank you and God bless

Aaron


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]