[cfe-users] [libclang] module.map errors

Lucas Soltic lucas.soltic at orange.fr
Wed Jan 29 10:34:35 PST 2014


Nobody ever had this error?
/usr/include/module.map:36:14: error: header 'float.h' not found
/usr/include/module.map:81:14: error: header 'stdarg.h' not found
/usr/include/module.map:113:14: error: header 'tgmath.h' not found

Début du message réexpédié :

> De: Lucas Soltic <lucas.soltic at orange.fr>
> Objet: [libclang] module.map errors
> Date: 28 janvier 2014 12:09:11 UTC+1
> À: cfe-users at cs.uiuc.edu
> 
> Hello,
> 
> I'm using libclang to parse source files, but as soon as the parsed source files include system headers, I get errors with module.map:
> /usr/include/module.map:36:14: error: header 'float.h' not found
> /usr/include/module.map:81:14: error: header 'stdarg.h' not found
> /usr/include/module.map:113:14: error: header 'tgmath.h' not found
> cl.c:2:10: fatal error: 'clang-c/Index.h' file not found
> 
> I linked against libclang 3.4 and I don't know what to do about this module.map error. I couldn't find any website dealing with this issue.
> I'm running Mac OS X 10.9.
> 
> The sample program used to generate the error is as follow: (this is also the file parsed by this program)
> #include <stdio.h>
> #include <clang-c/Index.h>
> 
> int main(int argc, const char **argv)
> {
> 	if (argc < 2) {
> 		printf("Usage: %s file\n", argv[0]);
> 		return 1;
> 	}
> 	
> 	CXIndex index = clang_createIndex(1, 1);
> 	
> 	if (index) {
> 		CXTranslationUnit tu = clang_createTranslationUnitFromSourceFile(index, argv[1], 0, NULL, 0, 0);
> 
> 		if (!tu)
> 			perror("clang_createTranslationUnitFromSourceFile() failure");
> 		
> 		clang_disposeIndex(index);
> 	} else {
> 		perror("clang_createIndex() failure");
> 	}
> 	
> 	return 0;
> }
> 
> Any pointer would be greatly appreciated :)
> Lucas

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-users/attachments/20140129/49469340/attachment.html>


More information about the cfe-users mailing list