From owner-freebsd-questions@freebsd.org Tue Jul 3 18:38:34 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 19755103C203 for ; Tue, 3 Jul 2018 18:38:34 +0000 (UTC) (envelope-from olivares14031@gmail.com) Received: from mail-vk0-x231.google.com (mail-vk0-x231.google.com [IPv6:2607:f8b0:400c:c05::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A090B912C9 for ; Tue, 3 Jul 2018 18:38:33 +0000 (UTC) (envelope-from olivares14031@gmail.com) Received: by mail-vk0-x231.google.com with SMTP id h22-v6so1698508vke.4 for ; Tue, 03 Jul 2018 11:38:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=pYVYSV7rOy/MPicHFUZL5/qnngry/vBiKGEJr6i5B+c=; b=UxhsUITNx8pysfcnWS6JBBjJN56I8sv+BnEAoxLCjNyc0VP0h/xTgSRUO1p0ZOGk0A U5MlGQPQDXj2JCjbRgzwd+CEqcQuYgZMUzOjHRzOWPT5hdOrhEMZ+WASJ33oqr1iNVU7 JV3v+Oi+dJbrk4zTxcCj1CV3XVRAaYmKGbTTC66zhC1LhFDfvNcjt3J4ItBaTKvHdECq Ap46TmBzmtlL+qsAbiyjF/CGGq4SsKDgqbkKsip6/gWkyrVjMKiy0bG0ILNmZQ5PKGsO oyZBKReGGpY5mbJ7GwerhUHZJX6++jWnImN6vqwBQbLLX93xJwTzhBt6xFfpVInJrute hi5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=pYVYSV7rOy/MPicHFUZL5/qnngry/vBiKGEJr6i5B+c=; b=Oi2v/mwMQZDzkdKqe0MBN7DNnDqFONia3DvWUBKEh7mSzorOUwJYoVo89NGTRHhYdk 1DF9Ys1yqvou+rEbv2+n37+v7l/3sl4hnttJzMQPPtR7yBuz/i6qLK0IuIej1CVoeXsc 7u7R4k8MPGv6Xh5/WXabJ8UVP+ICzxQokDcmwxlOzFQw14eNnNuW3rwsKhe6zCcxYx3X O9XqVbsnJyCRVKhdgW3OYA5t3vqk3SjvD9Wjx13TdGx05qUMt5p9i/HirLkINQEFYmCf PrFAT0XqMb6wqjhpsXLsd/uep3hXxlKnb32orAlG9K5riVs40CnVowMqz30unRoOu4oE a8qA== X-Gm-Message-State: APt69E2T3g+evgk8jA282/w3rOnD9bYhx3DsdJjaD+snbUz6lifJVFPR 7x0UYmroNAp02lJqsojfihzv3nrj7LiTU2N0Xxc= X-Google-Smtp-Source: AAOMgpefmRe5/b2vkCUnTSB7JiHaXZIluWpvs2MQP1+in2zN6lvBXua1IHmJ9ufMQoRyZ4wNeCevU5jxi9fXDulBI+c= X-Received: by 2002:a1f:9807:: with SMTP id a7-v6mr4929756vke.65.1530643112677; Tue, 03 Jul 2018 11:38:32 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ab0:51c7:0:0:0:0:0 with HTTP; Tue, 3 Jul 2018 11:38:31 -0700 (PDT) From: Antonio Olivares Date: Tue, 3 Jul 2018 13:38:31 -0500 Message-ID: Subject: Clang++ stdlib/cstdlib.h workaround To: FreeBSD Questions Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2018 18:38:34 -0000 Dear kind folks, I have a cpp file that used stdlib.h and it compiled and ran successfully. I am trying it out with clang and it returns errors that it cannot find stdlib.h, I remove the stdlib.h include statement and it still complains. I made a copy of the c++ file and it compiles and runs correctly, but I removed some stuff " --- " and only output the numbers. How do I deal with stdlib.h requirements? The program finds numbers that are triangular and square. It fails for numbers that are bigger than 2147483647. Thanks for ideas/suggestions/advice provided. Best Regards, Antonio