Re: undefined reference to `__w32_sharedptr_unexpected'

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

 



Brian Dessent wrote:
Aaron Patton wrote:

I've tried exporting LD_LIBRARY_PATH to the mingw/lib. I've tried adding

LD_LIBRARY_PATH is not applicable to MinGW.

the -Wl, -brtl flag (I'm not sure it I did correctly -- It kept saying
that it did not recognize the -brtl option)
Anyways, I've run out of ideas. I'm a beginner. So go easy on me.

Since you are linking C++ (by way of ChanIO.o in libiolib.a) you should
be using the g++ binary to link, not gfortran.  This will add the
necessary options.  You should never have to specify -lstdc++ yourself,
the driver is responsible for that.  (The problem you are seeing is that
-lstdc++ itself requires -lsupc++ which you are not providing, but again
these are not things the user should be providing.)

Also note that "-Wl" by itself does nothing, it is meant to be used in
conjunction with another option as it tells the driver to pass that
option on to the linker.

Brian


Well that made the cpp stuff happy, but now the fortran stuff yields the following

$ 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 -lstdc++ CIRFETS.o:CIRFETS.F:(.text+0x19): undefined reference to `_gfortran_set_options' CIRFETS.o:CIRFETS.F:(.text+0xb0): undefined reference to `_gfortran_stop_numeric' CIRFETS.o:CIRFETS.F:(.text+0xde): undefined reference to `_gfortran_stop_numeric' CIRFETS.o:CIRFETS.F:(.text+0x1e8): undefined reference to `_gfortran_date_and_time' CIRFETS.o:CIRFETS.F:(.text+0x24f): undefined reference to `_gfortran_st_write' CIRFETS.o:CIRFETS.F:(.text+0x26f): undefined reference to `_gfortran_transfer_integer' CIRFETS.o:CIRFETS.F:(.text+0x28f): undefined reference to `_gfortran_transfer_integer' CIRFETS.o:CIRFETS.F:(.text+0x2ac): undefined reference to `_gfortran_transfer_integer' CIRFETS.o:CIRFETS.F:(.text+0x2cc): undefined reference to `_gfortran_transfer_integer' CIRFETS.o:CIRFETS.F:(.text+0x2ec): undefined reference to `_gfortran_transfer_integer' CIRFETS.o:CIRFETS.F:(.text+0x30c): more undefined references to `_gfortran_transfer_integer' follow


--- There's a lot more but I thought I'd spare you

A number of the .o files are from the gfortran compiler

Aaron

[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