This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: undefined reference to `__w32_sharedptr_unexpected'
- From: Brian Dessent <brian at dessent dot net>
- To: Aaron Patton <aaron dot patton at welkinsciences dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Mon, 02 Jun 2008 11:04:02 -0700
- Subject: Re: undefined reference to `__w32_sharedptr_unexpected'
- References: <484431CA.80009@welkinsciences.com>
- Reply-to: gcc-help at gcc dot gnu dot org
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