X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 	tests=AWL,BAYES_00
X-Spam-Check-By: sourceware.org
Message-ID: <4BA9AFC3.6030503@aol.com>
Date: Tue, 23 Mar 2010 23:22:59 -0700
From: Tim Prince <n8tm@aol.com>
Reply-To: tprince@computer.org
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.7) Gecko/20100111 Thunderbird/3.0.1
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: Cygwin problem make Linux c++ app in windows
References: <28010814.post@talk.nabble.com>
In-Reply-To: <28010814.post@talk.nabble.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
x-aol-global-disposition: G
X-AOL-SCOLL-SCORE: 0:2:426122880:93952408
X-AOL-SCOLL-URL_COUNT: 0
x-aol-sid: 3039ac1d33c14ba9afc56a66
X-AOL-IP: 99.13.231.72
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On 3/23/2010 10:27 PM, crmpteltd wrote:
>
> from the first few error log, it seems there is a problem recognizing
> pthread.h
> the Linux lib used are:
> #include<sys/socket.h>
> #include<arpa/inet.h>
> #include<netdb.h>
> #include<pthread.h>
> #include<sys/stat.h>
>
> The make command was
> g++ -c -Wall main.cpp http_client.cpp string.cpp
> g++ -lpthread main.o http_client.o string.o -o main
>
>
>    
You do need to specify your options in order, same as you would require 
for static libraries on linux.  It's the same gnu ld, which doesn't go 
back and repeat library searches after you add new references, unless 
you give the keywords which make that happen.  You had no unsatisfied 
references at the point where you issued -lpthread, and there is no 
dynamic libpthread.
If you were able to satisfy all those headers, you already got lucky; 
don't push your luck.

-- 
Tim Prince


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

