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:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=lh6B1arcXB8fxVNt wiytUszQzHeqG9mTQbJswUi85BppxvOn9jAtlASChswLEs/n6hlbp85HyflrmxX1 t6jWKqA4oTgK5QQfDz2qUoUDAVLNiL7IFnzjI6crjKp83nwGauXeQfizK5V20qbc GxJiriE8Ic5dAasOpcsiQe/AnEk= 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:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=HjVhxMA3ZRFFjQNoEtqB8n DTbfg=; b=bHE5cfWWjBgK+f70Orih4K3eJLk0SuXg6aL3f0eEg1ui8Kr1JEtIb2 sGsizaqpDT2WG4e6evsDqdwEFOCC+bmvH2uu1dDyPaeOtwV8dE4y05bxS3XE/qo5 J2PMidSW91OiLZucwnxTEPwbDGqzBXn2IKTa86nq0b6KMsrz325ko= 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=-1.8 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy= X-HELO: mail-wr0-f179.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=Ji/uL39LNKyFyUkSKSXwuGWLQ9vpdajuHYX69QGvrPc=; b=azwZm91zmXYXx8EB7t5w3NyulhTZxdgqQ5m5pI7N1PbBdjCI18/ZXZHw3fwcgmYCl0 y7aZdSEy3UGSt9F7Pj1Qs1Lq7TlbjQZyof1kaHjF255ahM6z4BvIphVhrnLNLz0lXWS+ LpTJVlADCgNIQpw5uoATVHP3f3kEwMWcMqUfsYMSuf8V2ZEDvKR4nkmVA1WZUmEZdL+f NIuOYHHup3DBANVXpJWu84aGVh2L9lcZ7O9a+fQP8ODL+eytKciugNPuBCO1iIHdaKvr niXJgL5jijGiK1gjqqfDUVcDT4iDjfbRumvSR19j/u6ntnMwv5PYH7u24cIDQ/A8Pz+R Dhrg== X-Gm-Message-State: AODbwcBKzR9K/vEaybxyrgX+6RSw672nnMATzcr6wfvShmqLKkDmuyEg FRrlIMypGJYT87k1Ax0= X-Received: by 10.223.170.67 with SMTP id q3mr7458105wrd.19.1494690413429; Sat, 13 May 2017 08:46:53 -0700 (PDT) Subject: Re: BUG: winmain GetCommandLine only returning program name and path with no arguments To: cygwin AT cygwin DOT com References: From: Richard H Lee Message-ID: <71f9d623-e0b0-69eb-092a-68a2b119064a@gmail.com> Date: Sat, 13 May 2017 16:46:45 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes It works when using the mingw cross compiler. On 13/05/2017 15:30, Mike Barry wrote: > Below is a sample program that demonstrates that the GetCommandLine > function is not returning the command line arguments. I attached > cygcheck.out. > > #include > #include > > int WINAPI > WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR szCmdLine, int sw) { > char* text = GetCommandLine(); > printf("getcmdline: %s\n", text); > return 0; > } > > gcc test_wmain.c -o test > > $ ./test hello world > getcmdline: "C:\cygwin64\home\mbarry\game-repos\greenbeam\src\test.exe" > > > > > -- > 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 > -- 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