Foro de elhacker.net

Programación => Programación C/C++ => Mensaje iniciado por: kraiked en 25 Enero 2016, 20:41 pm



Título: Netbeans me esta volviendo loco...
Publicado por: kraiked en 25 Enero 2016, 20:41 pm
Hola, bueno, tengo un problema, el otro dia formatee el ordenador e instale windows 10, ahora quiero instalarme netbeans, para ello me bajo la herramienta Java JDK, y luego me bajo netbeans y cygwin... Vamos como siempre.

Pero cuando me meto a netbeans y empiezo a programar y pongo una libreria como esta: "#include <stdio.h>" me apaerece un error, y pone esto "cannot find include file stdio.h" (este mensaje me aparece en la bombilla roja, al compliar sale un mensaje bastante más grande)
y no tengo ni idea de como arreglarlo, he reinstalado tanto el netbeans como el JDk y nada...

Un saludo


Título: Re: Netbeans me esta volviendo loco...
Publicado por: MAFUS en 25 Enero 2016, 20:56 pm
Buscando por internet me he encontrado con esto:
Citar
So your gcc should be finding /usr/include/stdio.h if you have it. Is it there? As far as I can tell from the package file lists, it's supposed to be part of the cygwin base system (i.e. even if you haven't installed the compiler it should be there).

Are you missing any other header files? <stdlib.h> and <string.h> are good test candidates.

Here are some commands to investigate the cygwin package and whether it contains the file:

cygcheck -f /usr/include/stdio.h
cygcheck -c cygwin
cygcheck -l cygwin | grep stdio
UPDATE: so it seems I'm behind the times and there's a cygwin-devel package now. The header files aren't in the base cygwin package any more. To check the correct package on the latest cygwin, you'd use

cygcheck -c cygwin-devel
as has already been done in the comments. And since it's listed as "incomplete" the solution is probably to reinstall it using cygwin's setup program.

Viene de esta página:
http://stackoverflow.com/questions/27824139/cygwin-gcc-cannot-find-stdio-h

Supongo que es lo mismo que te ocurre.


Título: Re: Netbeans me esta volviendo loco...
Publicado por: kraiked en 27 Enero 2016, 16:48 pm
Bueno, al final desistí, no tenía ni idea de que ocurría, creo que era culpa de cygwin... Al final he borrado windows 10 y dejare solo ubuntu.... Que me da muchisimos menos problemas...