Segmentation fault with winmm library

Brian Dessent brian@dessent.net
Tue Jun 19 18:29:00 GMT 2007


Guy.Eschemann@Sennheiser.com wrote:

> compiled with the following command:
> 
> g++ main.cc /usr/lib/w32api/libwinmm.a -Wall -g -O0
> 
> I get a segmentation fault under gdb:

You should use "-lwinmm" and not "/usr/lib/w32api/libwinmm.a".  There's
no need to specify an absolute path to the import library, and doing so
makes your build infrastructure extremely unfriendly (e.g. for someone
trying to crosscompile your software.)  The compiler and linker both
know where to search for the w32api headers and libs.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list