Error Identifier Printf Is Undefined
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and identifier printf is undefined c++ policies of this site About Us Learn more about Stack Overflow the company cuda printf warning expression has no effect Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users cuda printf doesn t work Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a cuda kernel printf example minute: Sign up Trouble compiling helloworld.cu up vote 4 down vote favorite While compiling this hello world sample in Ubuntu 10.10 This is from CUDA by Example, chapter 3 (No compile instructions provided >:@) #include
Error Identifier String Is Undefined
is undefined 1 error detected in the compilation of "/tmp/tmpxft_00007812_00000000-4_hello.cpp1.ii". Why? How should this code be compiled? cuda share|improve this question edited Sep 4 '11 at 19:14 Mat 135k21234273 asked Sep 4 '11 at 18:59 andandandand 7,28140127221 @awoodland: Hmmmm, the second answer says it does, and indeed section B14 has "printf(“Hello thread %d, f=%f\n”, threadIdx.x, f);" –Kheldar Sep 4 '11 at 19:06 how is this supposed to be compiled then? –andandandand Sep 4 '11 at 19:09 the code stuff from that book are mere snippets if I recall correctly, and not always full examples. Not to mention they use alto of bad practise in those example.... –NekoNova Sep 4 '11 at 19:19 add a comment| 1 Answer 1 active oldest votes up vote 8 down vote accepted You need to include stdio.h not iostream (which is for std::cout stuff) for printf (see man 3 printf). I found the source code for the book here. chapter03/hello_world.cu is actually: /* * Copyright 1993-2010 NVIDIA Corporation. All rights reserved. * * NVIDIA Corporation and its licensors retain all intellectual pr
Sign in Pricing Blog Support Search GitHub This repository Watch 0 Star 0 Fork 0 https://github.com/jcohenpersonal/opencurrent/issues/18 jcohenpersonal/opencurrent Code Issues 16 Pull requests 0 Projects 0 Pulse https://software.intel.com/en-us/forums/intel-c-compiler/topic/303826 Graphs New issue "error: identifier "printf" is undefined" during make #18 Open GoogleCodeExporter opened this Issue May 26, 2015 · 1 comment Projects None yet Labels auto-migrated Priority-Medium Type-Defect Milestone No milestone Assignees No one assigned 1 participant is undefined GoogleCodeExporter commented May 26, 2015 What steps will reproduce the problem? 1. Followed instructions in System.cmake.src to cmake. Had to add the following lines: SET(NetCDF_INCLUDE_DIR "/usr/include/") SET(NetCDF_LIBRARY "/usr/lib/libnetcdf.so") 2. Ran make. Got to 8% and were then interrupted by:
LearningModern CodeNetworkingOpen SourceStorageToolsDeveloper TypeEmbedded SystemsGame DevMediaTechnical, Enterprise, HPCWebOSAll ToolsAndroid*HTML5Linux*OS X*Windows*ResourcesCode SamplesContact SupportDocumentationFree SoftwareIntel Registration CenterProduct ForumsSDKsResourcesPartner with IntelAcademic ProgramPartner SpotlightBlack Belt DeveloperDeveloper MeshInnovator ProgramSuccess StoriesLearnBlogBusiness TipsEventsVideosSupportContact SupportDeveloper EvangelistsFAQsForums Search form Search You are hereHome › Forums › Intel® Software Development Products › Intel® C++ Compiler FacebookLinkedInTwitterDiggDeliciousGoogle Plus Getting error: identifier "__int128_t" is undefined Getting error: identifier "__int128_t" is undefined john_kazinski Mon, 12/17/2007 - 22:02 The test program below works in gcc? Is there a header file that I am missing to make this work in icc? Thanks for the help ... John icc -g -o tst_int128 tst_int128.c tst_int128.c(5): error: identifier "__int128_t" is undefined__int128_t x = -1025;^ compilation aborted for tst_int128.c (code 2)[root@localhost C]# cat tst_int128.c#include int main(){__int128_t x = -1025; printf("Done "); return 0;}[root@localhost C]# RSS Top 20 posts / 0 new Last post For more complete information about compiler optimizations, see our Optimization Notice. Log in to post comments Tim P. Tue, 12/18/2007 - 06:08 It looks as if this is a special internal definition in 64-bit gcc only, not visible in headers accessible to icc. It isn't fully supported even in the relevant subset of gcc: http://gcc.gnu.org/ml/gcc/2002-02/msg00818.html I agree that extensions of look more appealing than the Windows m128 types, but the opinions of an old Fortran programmer don't sway the world. Top Log in to post comments stone_ Sun, 02/01/2009 - 07:28 Quoting - tim18 It looks as if this is a special internal definition in 64-bit gcc only, not visible in headers accessible to icc. It isn't fully supported even in the relevant subset of gcc: http://gcc.gnu.org/ml/gcc/2002-02/msg00818.html I agree that extensions of look more appealing than the Windows m128 types, but the opinions of an old Fortran programmer don't sway the world. Hi, i had encount the same problem, and is there a workround avalbile to this issus? Top Log in to post comments stdweird Wed, 07/08/2009 - 14:17 hi all, I'm going to add one more request to have a closer look at this problem, hoping it gets fixed or how I (and lots of others) can work around this to build libffi with icc. this actually breaks the python builds somewhat (no ctypes module :(, which is a bit of a shame for a nice product like