delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-5.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE |
X-Spam-Check-By: | sourceware.org |
MIME-Version: | 1.0 |
In-Reply-To: | <50C8FC24.6000308@alice.it> |
References: | <50C8FC24 DOT 6000308 AT alice DOT it> |
Date: | Thu, 13 Dec 2012 14:08:37 +0100 |
Message-ID: | <CAKw7uVjLbM3S9Oi6Cb85boq+nppa2re8Ri8RRYA-0Bb_T1e+GA@mail.gmail.com> |
Subject: | Re: A linking problem with current GCC (4.5.3) |
From: | =?UTF-8?Q?V=C3=A1clav_Zeman?= <vhaisman AT gmail DOT com> |
To: | cygwin AT cygwin DOT com |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
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 |
On 12 December 2012 22:50, Angelo Graziosi wrote: > When Cygwin had GCC-4.3.4 as GCC default compiler, I could compile an > application with these steps > > > g++ -c winbgim.cpp -o winbgim-g95.o > > g95 -O3 -Wall -mwindows basic_mods.f90 f03bgi.f90 f03eyes.f90 \ > winbgim-g95bis.o -L /lib/gcc/i686-pc-cygwin/4.5.3 -lstdc++ \ > -s -o f03eyes-g95 > > > Now, with GCC 4.5.3, I see linker errors: > > > g++ -c winbgim.cpp -o winbgim-g95.o > > g95 -O3 -Wall -mwindows basic_mods.f90 f03bgi.f90 f03eyes.f90 \ > winbgim-g95.o -L /lib/gcc/i686-pc-cygwin/4.5.3 -lstdc++ \ > -s -o f03eyes-g95 > /lib///libcygwin.a(_cygwin_crt0_common.o):_cygwin_crt0_common.cc:(.data+0x4): > undefined reference to `__real__Znaj' > /lib///libcygwin.a(_cygwin_crt0_common.o):_cygwin_crt0_common.cc:(.data+0xc): > undefined reference to `__real__ZdaPv' > > > (Notice that I have used the right PATH /lib/gcc/i686-pc-cygwin/4.5.3...) > > But if I compile winbgim.cpp with g++-3, > > g++-3 -c winbgim.cpp -o winbgim-g95.o > > g95 -O3 -Wall -mwindows basic_mods.f90 f03bgi.f90 f03eyes.f90 \ > winbgim-g95.o -L /lib/gcc/i686-pc-cygwin/4.5.3 -lstdc++ \ > -s -o f03eyes-g95 > > it works! It also works if I use an old winbgim-g95.o compiled with > gcc-4.3.4... > > > It seems I need to add some other library to command line... If you are targeting native Windows (no Cygwin) then you can use i686-w64-mingw32-gfortran and i686-w64-mingw32-g++ as replacements for g++ and g95 commands. You will have to install the appropriate MinGW related packages, though. -- VZ -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |