From owner-freebsd-hackers@FreeBSD.ORG Sun Dec 29 17:11:26 2013 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 197BD327 for ; Sun, 29 Dec 2013 17:11:26 +0000 (UTC) Received: from mail-ob0-x235.google.com (mail-ob0-x235.google.com [IPv6:2607:f8b0:4003:c01::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D2B471303 for ; Sun, 29 Dec 2013 17:11:25 +0000 (UTC) Received: by mail-ob0-f181.google.com with SMTP id uy5so10955463obc.40 for ; Sun, 29 Dec 2013 09:11:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ojka0k+SzUdHqYXYt603f6+zGFgscmvlmKGsGZbl9wI=; b=R02kwf3CF4zecy+eZBjo3c0N3uV4M5ZLQQHEH40QJR0CK4TXsTSXZ8QRUtminx50GO SW2SdqBqoyKTjNEjZAdbPnyIOZFl+R0dK0N6u7hKcpRWuxhOTS4q0kGtYF/N6psiiN26 GevKP26g7PBSrRCO8vqz0H5sKPEZRfwYy2M6HkvKV0M+uEc+HV2xopY7gWSqT7jPvh++ vdDedVX8j4BBrdofF72J+AVYJAxWtv+r9uBR1yLE3HngKxat5rSVHlGwqvQX4Kyo893+ toxUi29+QEi2Oji2K0nVXy3Gfxh/KBOX/BBEVr2h74WReTknC7qiBWu8scvTGRxEDz3L BLYA== MIME-Version: 1.0 X-Received: by 10.182.246.7 with SMTP id xs7mr253752obc.81.1388337085053; Sun, 29 Dec 2013 09:11:25 -0800 (PST) Received: by 10.182.78.100 with HTTP; Sun, 29 Dec 2013 09:11:24 -0800 (PST) In-Reply-To: References: Date: Sun, 29 Dec 2013 12:11:24 -0500 Message-ID: Subject: Re: template example From: Joe Nosay To: Tim Kientzle Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.17 Cc: FreeBSD Hackers X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 17:11:26 -0000 On Sat, Dec 28, 2013 at 10:44 PM, Joe Nosay wrote: > > > > On Sat, Dec 28, 2013 at 3:52 AM, Tim Kientzle wrote: > >> >> On Dec 27, 2013, at 7:41 PM, Joe Nosay wrote: >> >> > The standard "Hello World!" doesn't seem to work. >> >> Which one? Share the program you=92re trying to compile and what error= s >> you=92re seeing. >> >> Tim >> >> >> > > Thanks @Alfred_Perlstein it worked with that example using clang > -fsyntax-only h.cpp > > a.out is the file. > > Trying a different approach with ::: #include #include int main(int Argc, char **Argv) { int rv; rv =3D system("echo 'ls /tmp' " && " echo blee bble blle "); std::cout << "return status from system call is: " << rv << std::endl; return (rv); } The output comes before the blee and the blee is not printed. What I need is for the output to be listed - or the act ion to be executed - along with the echo. This time, clang -E -fsyntax-only h.cpp was used with no a.out being created. What was the difference between Perlstein's script and mine?