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'


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


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