Error Identifier Is Undefined In Device Code
Contents |
von GoogleAnmeldenAusgeblendete FelderNach Gruppen oder Nachrichten suchen
von GoogleAnmeldenAusgeblendete FelderNach Gruppen oder Nachrichten suchen
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company http://stackoverflow.com/questions/15916423/nvcc-error-identifier-undefined-but-its-defined Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, https://developer.mbed.org/questions/5322/compile-errors/ just like you, helping each other. Join them; it only takes a minute: Sign up nvcc: error: identifier undefined, but it's defined up vote 0 down vote favorite I have a CUDA C code that when I is undefined try to compile it, nvcc complains with an undefined identifier error, but the variable it really exits! extern "C" void vRand3f_cuda (vec3f *d_v, int n) { curandState *d_states; CUDA_CALL (cudaMalloc ((void **)&d_states, n * sizeof (curandState))); dim3 gDim (1); dim3 bDim (n); set_seed<<
Neal, I import the library and enter the code in example in main.cpp but compiler show many errors: Error: Expected either a definition or a tag name in "main.cpp", Line: 7, Col: 7 Error: Expected a ")" in "main.cpp", Line: 10, Col: 5 Error: Expected a type specifier in "main.cpp", Line: 10, Col: 5 Error: Function returning function is not allowed in "main.cpp", Line: 10, Col: 10 Error: Expected a ";" in "main.cpp", Line: 10, Col: 51 Warning: Parsing restarts here after previous syntax error in "main.cpp", Line: 14, Col: 6 Error: Expected either a definition or a tag name in "main.cpp", Line: 18, Col: 7 Error: Expected a ")" in "main.cpp", Line: 21, Col: 5 Error: Expected a type specifier in "main.cpp", Line: 21, Col: 5 Error: Function returning function is not allowed in "main.cpp", Line: 21, Col: 10 Error: Expected a ";" in "main.cpp", Line: 21, Col: 36 Warning: Parsing restarts here after previous syntax error in "main.cpp", Line: 25, Col: 6 Error: Expected a ")" in "main.cpp", Line: 28, Col: 2 Error: Expected a type specifier in "main.cpp", Line: 28, Col: 2 Error: Explicit type is missing ("int" assumed) in "main.cpp", Line: 28, Col: 2 Error: "SPI_TypeDef" has already been declared in the current scope in "main.cpp", Line: 28, Col: 2 Error: Expected a "{" in "main.cpp", Line: 28, Col: 6 Warning: Parsing restarts here after previous syntax error in "main.cpp", Line: 35, Col: 12 Error: Identifier "gOled1" is undefined in "main.cpp", Line: 37, Col: 9 Error: Identifier "gOled2" is undefined in "main.cpp", Line: 38, Col: 9 May You help me Please, May be I make some global error... Question relating to: Last updated: 11 Nov 2014 17 2059 Neal Horman / Adafruit_GFX A derived version of the BSD licensed Adafrut GFX library for the SSD1306 controller for an OLED 128x32 or 128x64 display using SPI or I2C. display, I2C, OLED, SPI, SSD1306 I'm not seeing the problem in my environment. I opened the Compiler IDE; 1. Started a New program, used the Blinky Template. 2. Imported gfx library 3. Copied my example from the library page to the clipboard, selected all the Blinky code in the compiler and then pasted. It, compiled, with no errors. I also tried your way; 1. Started new empty program 2. Added new file main.cpp 3. Pasted example code 4. Imported gfx library 5. Imported mbed library 6. Compiled, with no errors I'm using an LPC1768, I don't have a Nucleo device to test on. The errors look like the base SPI and I2C classes don't