X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-0.0 required=5.0 tests=BAYES_40,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_YE,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Message-ID: <50C8FC24.6000308@alice.it> Date: Wed, 12 Dec 2012 22:50:28 +0100 From: Angelo Graziosi User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Cygwin Subject: A linking problem with current GCC (4.5.3) Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 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... Ciao, Angelo. -- 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