gcc: fatal error: regex.h: No such file or directory [duplicate]

Multi tool use
Multi tool use












2
















This question already has an answer here:




  • Regex.h for windows

    1 answer




For my C programs, I am using gcc.



Ultimately, I want to write a program that does stuff with regular expressions. Right now, however, my program simply outputs Hello World:



#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <regex.h>

int main(void) {

printf("Hello Worldn", regex);

return 0;
}


Here's how I compiled that program:



gcc -std=c99 -o helloWorld helloWorld.c


That produces this error:



fatal error: regex.h: No such file or directory


I'm a C newbie. Any help would be much appreciated.










share|improve this question













marked as duplicate by pmg c
Users with the  c badge can single-handedly close c questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Jan 2 at 12:01


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.














  • 1





    What OS are you using? Do you have the standard library headers installed?

    – Dan Getz
    Jun 8 '15 at 22:16






  • 2





    C99 doesn't have regex.h.

    – BLUEPIXY
    Jun 8 '15 at 22:17






  • 5





    There is no "regex.h" in the standard C library. I think POSIX has one.

    – Lee Daniel Crocker
    Jun 8 '15 at 22:18








  • 1





    IIRC Microsoft dropped POSIX-support with Windows XP. However, if you compiler is VC, that is not even C99 compliant.

    – too honest for this site
    Jun 8 '15 at 23:10








  • 2





    stackoverflow.com/questions/3781211/c-regex-library-with-mingw , stackoverflow.com/questions/8230905/regex-h-for-windows

    – BLUEPIXY
    Jun 9 '15 at 0:32
















2
















This question already has an answer here:




  • Regex.h for windows

    1 answer




For my C programs, I am using gcc.



Ultimately, I want to write a program that does stuff with regular expressions. Right now, however, my program simply outputs Hello World:



#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <regex.h>

int main(void) {

printf("Hello Worldn", regex);

return 0;
}


Here's how I compiled that program:



gcc -std=c99 -o helloWorld helloWorld.c


That produces this error:



fatal error: regex.h: No such file or directory


I'm a C newbie. Any help would be much appreciated.










share|improve this question













marked as duplicate by pmg c
Users with the  c badge can single-handedly close c questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Jan 2 at 12:01


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.














  • 1





    What OS are you using? Do you have the standard library headers installed?

    – Dan Getz
    Jun 8 '15 at 22:16






  • 2





    C99 doesn't have regex.h.

    – BLUEPIXY
    Jun 8 '15 at 22:17






  • 5





    There is no "regex.h" in the standard C library. I think POSIX has one.

    – Lee Daniel Crocker
    Jun 8 '15 at 22:18








  • 1





    IIRC Microsoft dropped POSIX-support with Windows XP. However, if you compiler is VC, that is not even C99 compliant.

    – too honest for this site
    Jun 8 '15 at 23:10








  • 2





    stackoverflow.com/questions/3781211/c-regex-library-with-mingw , stackoverflow.com/questions/8230905/regex-h-for-windows

    – BLUEPIXY
    Jun 9 '15 at 0:32














2












2








2


1







This question already has an answer here:




  • Regex.h for windows

    1 answer




For my C programs, I am using gcc.



Ultimately, I want to write a program that does stuff with regular expressions. Right now, however, my program simply outputs Hello World:



#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <regex.h>

int main(void) {

printf("Hello Worldn", regex);

return 0;
}


Here's how I compiled that program:



gcc -std=c99 -o helloWorld helloWorld.c


That produces this error:



fatal error: regex.h: No such file or directory


I'm a C newbie. Any help would be much appreciated.










share|improve this question















This question already has an answer here:




  • Regex.h for windows

    1 answer




For my C programs, I am using gcc.



Ultimately, I want to write a program that does stuff with regular expressions. Right now, however, my program simply outputs Hello World:



#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <regex.h>

int main(void) {

printf("Hello Worldn", regex);

return 0;
}


Here's how I compiled that program:



gcc -std=c99 -o helloWorld helloWorld.c


That produces this error:



fatal error: regex.h: No such file or directory


I'm a C newbie. Any help would be much appreciated.





This question already has an answer here:




  • Regex.h for windows

    1 answer








c regex gcc






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jun 8 '15 at 22:10









Roger CostelloRoger Costello

1,27111225




1,27111225




marked as duplicate by pmg c
Users with the  c badge can single-handedly close c questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Jan 2 at 12:01


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









marked as duplicate by pmg c
Users with the  c badge can single-handedly close c questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Jan 2 at 12:01


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.










  • 1





    What OS are you using? Do you have the standard library headers installed?

    – Dan Getz
    Jun 8 '15 at 22:16






  • 2





    C99 doesn't have regex.h.

    – BLUEPIXY
    Jun 8 '15 at 22:17






  • 5





    There is no "regex.h" in the standard C library. I think POSIX has one.

    – Lee Daniel Crocker
    Jun 8 '15 at 22:18








  • 1





    IIRC Microsoft dropped POSIX-support with Windows XP. However, if you compiler is VC, that is not even C99 compliant.

    – too honest for this site
    Jun 8 '15 at 23:10








  • 2





    stackoverflow.com/questions/3781211/c-regex-library-with-mingw , stackoverflow.com/questions/8230905/regex-h-for-windows

    – BLUEPIXY
    Jun 9 '15 at 0:32














  • 1





    What OS are you using? Do you have the standard library headers installed?

    – Dan Getz
    Jun 8 '15 at 22:16






  • 2





    C99 doesn't have regex.h.

    – BLUEPIXY
    Jun 8 '15 at 22:17






  • 5





    There is no "regex.h" in the standard C library. I think POSIX has one.

    – Lee Daniel Crocker
    Jun 8 '15 at 22:18








  • 1





    IIRC Microsoft dropped POSIX-support with Windows XP. However, if you compiler is VC, that is not even C99 compliant.

    – too honest for this site
    Jun 8 '15 at 23:10








  • 2





    stackoverflow.com/questions/3781211/c-regex-library-with-mingw , stackoverflow.com/questions/8230905/regex-h-for-windows

    – BLUEPIXY
    Jun 9 '15 at 0:32








1




1





What OS are you using? Do you have the standard library headers installed?

– Dan Getz
Jun 8 '15 at 22:16





What OS are you using? Do you have the standard library headers installed?

– Dan Getz
Jun 8 '15 at 22:16




2




2





C99 doesn't have regex.h.

– BLUEPIXY
Jun 8 '15 at 22:17





C99 doesn't have regex.h.

– BLUEPIXY
Jun 8 '15 at 22:17




5




5





There is no "regex.h" in the standard C library. I think POSIX has one.

– Lee Daniel Crocker
Jun 8 '15 at 22:18







There is no "regex.h" in the standard C library. I think POSIX has one.

– Lee Daniel Crocker
Jun 8 '15 at 22:18






1




1





IIRC Microsoft dropped POSIX-support with Windows XP. However, if you compiler is VC, that is not even C99 compliant.

– too honest for this site
Jun 8 '15 at 23:10







IIRC Microsoft dropped POSIX-support with Windows XP. However, if you compiler is VC, that is not even C99 compliant.

– too honest for this site
Jun 8 '15 at 23:10






2




2





stackoverflow.com/questions/3781211/c-regex-library-with-mingw , stackoverflow.com/questions/8230905/regex-h-for-windows

– BLUEPIXY
Jun 9 '15 at 0:32





stackoverflow.com/questions/3781211/c-regex-library-with-mingw , stackoverflow.com/questions/8230905/regex-h-for-windows

– BLUEPIXY
Jun 9 '15 at 0:32












1 Answer
1






active

oldest

votes


















-4














See what happens if you drop .h from regex.h






share|improve this answer



















  • 2





    That might work for C++, but usually not for C

    – Basile Starynkevitch
    Jan 2 at 11:36


















1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









-4














See what happens if you drop .h from regex.h






share|improve this answer



















  • 2





    That might work for C++, but usually not for C

    – Basile Starynkevitch
    Jan 2 at 11:36
















-4














See what happens if you drop .h from regex.h






share|improve this answer



















  • 2





    That might work for C++, but usually not for C

    – Basile Starynkevitch
    Jan 2 at 11:36














-4












-4








-4







See what happens if you drop .h from regex.h






share|improve this answer













See what happens if you drop .h from regex.h







share|improve this answer












share|improve this answer



share|improve this answer










answered Jan 2 at 11:34









Gilles SchreuderGilles Schreuder

584




584








  • 2





    That might work for C++, but usually not for C

    – Basile Starynkevitch
    Jan 2 at 11:36














  • 2





    That might work for C++, but usually not for C

    – Basile Starynkevitch
    Jan 2 at 11:36








2




2





That might work for C++, but usually not for C

– Basile Starynkevitch
Jan 2 at 11:36





That might work for C++, but usually not for C

– Basile Starynkevitch
Jan 2 at 11:36





0QKg84gn x44 7nivmnvAi1W7FSbCZehu8,QldgI8,Yq7egTTKnb6E,25,0u,7cKgE 1 ArH d,HMBgVHzhVmRT9FXFYKScnPhR4HCzDw D3I VS
r0B,F,Xv4gVD5UKv,axEFKawW,qW68 Fj,a2AUKn HZ8f,how9S,m9y6BvCc3,6fovzN18tFjpd6wge

Popular posts from this blog

Monofisismo

Angular Downloading a file using contenturl with Basic Authentication

Olmecas