delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/11/10/04:41:18

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
To: cygwin AT cygwin DOT com
From: Marco Alanen <marco DOT alanen AT sbg DOT se>
Subject: Unresolved symbols in libstdc++
Date: Wed, 10 Nov 2004 10:34:27 +0100
Lines: 63
Message-ID: <cmsnb3$jml$2@sea.gmane.org>
Mime-Version: 1.0
X-Complaints-To: usenet AT sea DOT gmane DOT org
X-Gmane-NNTP-Posting-Host: 213.115.150.209
User-Agent: Mozilla Thunderbird 0.8 (X11/20040913)
X-IsSubscribed: yes

Greetings

(I posted this in cygwin.talk, but then I realized that this was a much 
more suited place)
I'm trying to get a fairly large C++ project to compile using the mingw 
tools in cygwin. I've sorted out most of the errors so far, but now I'm 
stuck on the executable linking .

Compilation flags: (probably a TON of useless compilation and linker 
flags, but I've been trying virtually everything here):
   gcc -pipe -g -O -Wall -fno-rtti -fno-exceptions -I/usr/include -I
   /usr/include/mingw -I /usr/include/w32api -mno-cygwin -mwindows
   -mwin32 -D__MINGW32__ -DWIN32 -march=pentium-mmx -mmmx
   -malign-double -mpreferred-stack-boundary=8 -traditional

Linker flags:
   <lots of object files> -lsbg_fltk -lflvw -lmsvcrt -lpng -ljpeg -lz
   -lstdc++ -lgcc -lcrtdll -lmingw32 -lmingwex -lopengl32 -lglu32 -lgdi32
   -lwsock32 -lm

These are the linker errors I get. The strange thing is that those 
functions are implemented in libgcc.a.
/usr/lib/mingw/libstdc++.a(stl-inst.o)(.text$_ZNSt24__default_alloc_templateILb1ELi0EE5_LockC2Ev+0x2b):stl-inst.cc: 
undefined reference to `___gthr_win32_mutex_lock'
/usr/lib/mingw/libstdc++.a(stl-inst.o)(.text$_ZNSt24__default_alloc_templateILb1ELi0EE5_LockC1Ev+0x2b):stl-inst.cc: 
undefined reference to `___gthr_win32_mutex_lock'
/usr/lib/mingw/libstdc++.a(stl-inst.o)(.text$_ZNSt24__default_alloc_templateILb1ELi0EE5_LockD2Ev+0x2b):stl-inst.cc: 
undefined reference to `___gthr_win32_mutex_unlock'

/usr/lib/mingw/libstdc++.a(stl-inst.o)(.text$_ZNSt24__default_alloc_templateILb1ELi0EE5_LockD1Ev+0x2b):stl-inst.cc: 
undefined reference to `___gthr_win32_mutex_unlock'

/usr/lib/mingw/libstdc++.a(stl-inst.o)(.text$_ZNSt24__default_alloc_templateILb1ELi0EE8allocateEj+0xfb):stl-inst.cc: 
undefined reference to `___gthr_win32_mutex_unlock
'
/usr/lib/mingw/libstdc++.a(stl-inst.o)(.text$_ZNSt24__default_alloc_templateILb1ELi0EE8allocateEj+0x151):stl-inst.cc: 
undefined reference to `___gthr_win32_mutex_lock'

/usr/lib/mingw/libstdc++.a(stl-inst.o)(.text$_ZNSt24__default_alloc_templateILb1ELi0EE8allocateEj+0x1d6):stl-inst.cc: 
undefined reference to `___gthr_win32_mutex_unloc
k'
/usr/lib/mingw/libstdc++.a(stl-inst.o)(.text$_ZNSt15_STL_mutex_lock13_M_initializeEv+0x8f):stl-inst.cc: 
undefined reference to `___gthr_win32_once'
/usr/lib/mingw/libstdc++.a(stl-inst.o)(.text$_ZNSt15_STL_mutex_lock13_M_initializeEv+0xa1):stl-inst.cc: 
undefined reference to `___gthr_win32_mutex_lock'
/usr/lib/mingw/libstdc++.a(stl-inst.o)(.text$_ZNSt15_STL_mutex_lock13_M_initializeEv+0xc1):stl-inst.cc: 
undefined reference to `___gthr_win32_once'
/usr/lib/mingw/libstdc++.a(stl-inst.o)(.text$_ZNSt15_STL_mutex_lock13_M_initializeEv+0x7e):stl-inst.cc: 
undefined reference to `___gthr_win32_mutex_unlock'
/usr/lib/mingw/libmingw32.a(main.o)(.text+0x106):main.c: undefined 
reference to `_WinMain AT 16'

I found a guy who had the same problem as me, and he was adviced to 
reinstall gcc since his versions differed. That isn't the case for me, 
but I can try it out if it helps.
http://www.cygwin.com/ml/cygwin/2003-12/msg00270.html

Any ideas what I should do or what I should add to this post in order to 
solve my problem? I'm currently reinstalling cygwin from scratch to 
eliminate any screwups from my side. I'll use nothing but stable packages.

  Thank you /Marco
U


--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019