This is the mail archive of the gcc-bugs@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]

[Bug target/39939] MinGW 4.3.0 fails to link sample programme.



------- Comment #10 from dannysmith at users dot sourceforge dot net  2009-04-30 21:07 -------
(In reply to comment #9)
> (In reply to comment #6)
> > (In reply to comment #4)
> > > Your libpthreads is doing something wrong.
> > > Re. comment 5
> > The command was actually
> > gcc -fopemnp test.c -lgomp -o test.exe
> > 
> 
> That command works for me with gcc 4.3.4, 4.4.0 and trunk
> In 4.4.0 and trunk, test.exe links against LIBGOMP-1.DLL which in turn resolves
> the pthread imports from PTHREADGCE2.DLL, which is distributed by the
> pthreads-win32 project
> http://sources.redhat.com/pthreads-win32/
> 
> My version of 4.3.4 has local mods.  I'm not sure if the shared libgomp build
> was standard then.


No it wasn't. And so the problem is that libgomp.spec says:
# This spec file is read by gcc when linking.  It is used to specify the
# standard libraries we need in order to link with -fopenmp.
*link_gomp: -lgomp %{static: -lpthread }

You have not specified '-static', so you must provide the '-lpthread' (again
note spelling) yourself.

Danny


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39939


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