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

Multi tool use
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.
c regex gcc
marked as duplicate by pmg
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.
|
show 2 more comments
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.
c regex gcc
marked as duplicate by pmg
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
|
show 2 more comments
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.
c regex gcc
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
c regex gcc
asked Jun 8 '15 at 22:10
Roger CostelloRoger Costello
1,27111225
1,27111225
marked as duplicate by pmg
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
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
|
show 2 more comments
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
|
show 2 more comments
1 Answer
1
active
oldest
votes
See what happens if you drop .h from regex.h
2
That might work for C++, but usually not for C
– Basile Starynkevitch
Jan 2 at 11:36
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
See what happens if you drop .h from regex.h
2
That might work for C++, but usually not for C
– Basile Starynkevitch
Jan 2 at 11:36
add a comment |
See what happens if you drop .h from regex.h
2
That might work for C++, but usually not for C
– Basile Starynkevitch
Jan 2 at 11:36
add a comment |
See what happens if you drop .h from regex.h
See what happens if you drop .h from regex.h
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
add a comment |
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
add a comment |
0QKg84gn x44 7nivmnvAi1W7FSbCZehu8,QldgI8,Yq7egTTKnb6E,25,0u,7cKgE 1 ArH d,HMBgVHzhVmRT9FXFYKScnPhR4HCzDw D3I VS
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