X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:from:date:message-id:subject:to :content-type; q=dns; s=default; b=w2FYalUfdYcg5TNPTtEukEEf4ByBE XVCscPCs+T+7FJ9aF4jRbYe/59UQwq58rl8/kKDQGhVzsHBhITrYgeyLPnzwPLaZ K84sXj15tOfMhU+46DspyTkxwydMy3UPRTLEEagUvjkeO0HbALLZ0K3xlqYT6jXR WlHAJWBSiWKf3g= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:from:date:message-id:subject:to :content-type; s=default; bh=EC/MwUsU495oz4Dc3UdJ+XlDHuQ=; b=ymA XSMXvjjvKeEkCwtlOSi9XvgV2jsErKYP56FjZO2nVjp1Fogl3JxSVwJsVMt78rmi sFLsJo/Gg2lmg25SsS8p1ldxXo1LyfaB+sNaIvHwSu8CnTxzLo78ETwLnl/kesGS n4T/yblZtrsLLMltrQUjYjXqIbQgyub+fj9TLJtE= 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 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-vc0-f173.google.com X-Received: by 10.52.107.35 with SMTP id gz3mr5301925vdb.8.1394800989830; Fri, 14 Mar 2014 05:43:09 -0700 (PDT) MIME-Version: 1.0 From: rexdf Rexdf Date: Fri, 14 Mar 2014 20:42:49 +0800 Message-ID: Subject: Some Problems about gcc 4.8.2 on cygwin To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=ISO-8859-1 1.the following code: #include #include int main() { initscr(); move(0, 0); addstr("hello, world\n"); refresh(); sleep(5); endwin(); return 0; } The following is my shell command: $ pkg-config --libs --cflags ncurses -I/usr/include/ncurses -lncurses $ gcc $(pkg-config --libs --cflags ncurses) curses_test.c -o curses_test /tmp/cc74H73T.o:curses_test.c:(.text+0xf): undefined reference to `initscr' /tmp/cc74H73T.o:curses_test.c:(.text+0x14): undefined reference to `ncwrap_stdscr' /tmp/cc74H73T.o:curses_test.c:(.text+0x2c): undefined reference to `wmove' /tmp/cc74H73T.o:curses_test.c:(.text+0x31): undefined reference to `ncwrap_stdscr' /tmp/cc74H73T.o:curses_test.c:(.text+0x49): undefined reference to `waddnstr' /tmp/cc74H73T.o:curses_test.c:(.text+0x4e): undefined reference to `ncwrap_stdscr' /tmp/cc74H73T.o:curses_test.c:(.text+0x56): undefined reference to `wrefresh' /tmp/cc74H73T.o:curses_test.c:(.text+0x67): undefined reference to `endwin' /usr/lib/gcc/i686-pc-cygwin/4.8.2/../../../../i686-pc-cygwin/bin/ld: /tmp/cc74H73T.o: bad reloc address 0x20 in section `.eh_frame' /usr/lib/gcc/i686-pc-cygwin/4.8.2/../../../../i686-pc-cygwin/bin/ld: final link failed: Invalid operation collect2: error: ld returned 1 exit status $ gcc curses_test.c $(pkg-config --libs --cflags ncurses) -o curses_test $ ./curses_test.exe Do I have to put the source file before `-I/usr/include/ncurses -lncurses`? And why? 2.It's about OpenMP openmp_1.cpp #include #include void test() { int a = 0; for (int i=0;i<100000000;i++) a++; } int main() { clock_t t1 = clock(); for (int i=0;i<8;i++) test(); clock_t t2 = clock(); std::cout<<"time: "< #include void test() { int a = 0; for (int i=0;i<100000000;i++) a++; } int main() { clock_t t1 = clock(); #pragma omp parallel for for (int i=0;i<8;i++) test(); clock_t t2 = clock(); std::cout<<"time: "< Language --> Open MP Support yes(/openmp) time 1849 time 321 -- 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