X-Spam-Check-By: sourceware.org Message-ID: <46782075.3B4B2600@dessent.net> Date: Tue, 19 Jun 2007 11:29:09 -0700 From: Brian Dessent X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Segmentation fault with winmm library References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Reply-To: cygwin AT cygwin DOT com Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Guy DOT Eschemann AT Sennheiser DOT 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/