Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 From: "Dr Jekyll" To: "'Cygwin List'" Subject: g++3.3.3 compilation problem under Cygwin Date: Mon, 20 Dec 2004 02:20:53 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit In-Reply-To: <6.2.0.14.0.20041219144604.04a7cd78@pop.prospeed.net> Message-Id: <200412191921625.SM01664@xuanson> X-IsSubscribed: yes Hi, I am reading the book "Inter-process Communications in Linux", section 1.10 Process Memory Addresses and I have tried to compile the following code under Cygwin without success (with the command): Bash-shell>g++ -o run p1.3.cxx Where the content of "p1.3.cxx" is given here: /* Displaying process segment addresses */ #include extern int etext, edata, end; using namespace std; int main( ){ cout << "Adr etext: " << hex << int(&etext) << "\t "; cout << "Adr edata: " << hex << int(&edata) << "\t "; cout << "Adr end: " << hex << int(&end ) << "\n"; return 0; } Here is the error message $ g++ -o p1.3 p1.3.cpp /cygdrive/c/DOCUME~1/JK/LOCALS~1/Temp/ccnKmHpn.o(.text+0x46):p1.3.cpp: undefined reference to `_etext' /cygdrive/c/DOCUME~1/JK/LOCALS~1/Temp/ccnKmHpn.o(.text+0x8a):p1.3.cpp: undefined reference to `_edata' collect2: ld returned 1 exit status Can someone help me? Best regards JK -- 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/