Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Type Resolution Fails For Included Header Files
icon4.gif  Type Resolution Fails For Included Header Files [message #945782] Mon, 15 October 2012 16:36
Glen Oakley is currently offline Glen OakleyFriend
Messages: 3
Registered: October 2012
Junior Member
I have the following code, which builds and runs perfectly fine:

#include <stdio.h>
#include <CL/cl.h>

int main()
	cl_platform_id platform_id;
	puts("HELLO, WORLD!\n");
	return 0;

Adding the following line to the beginning of MAIN raises an error, "Type cl_int could not be resolved":
	cl_int fault;

The contents of <CL/cl.h> includes the following lines (which have no errors):
#include <CL/cl_platform.h>
typedef cl_uint             cl_platform_info;
typedef cl_uint             cl_device_info;
typedef cl_uint             cl_program_build_info;
typedef cl_int              cl_build_status;

The actual type 'cl_int' is defined in <CL/cl_platform.h>:
typedef unsigned __int16        cl_ushort;
typedef signed   __int32        cl_int;
typedef unsigned __int32        cl_uint;

I do not understand why my code cannot resolve the type 'cl_int', when the header file it includes uses that type with no trouble at all.
  • Attachment: error.png
    (Size: 8.20KB, Downloaded 93 times)
Previous Topic:Include directories not accessible in Remote C++ project
Next Topic:unresolved #include <gtkmm.h>
Goto Forum:

Current Time: Sat Oct 10 07:23:52 GMT 2015

Powered by FUDForum. Page generated in 0.02247 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software