GCC -std=gnu99 error
I'm trying to compile a C code with this command gcc -Wall -m32 -std=gnu99 -o <filename> <filename>
Instead of getting an output file, I get this.
/usr/bin/ld: cannot find Scrt1.o: No such file or directory
/usr/bin/ld: cannot find crti.o: No such file or directory
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/7/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/7/libgcc_s.so.1 when searching for libgcc_s.so.1
/usr/bin/ld: cannot find libgcc_s.so.1
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/7/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
collect2: error: ld returned 1 exit status
Compiling with -std=c11
works perfectly fine, but not with -std=gnu99
.
gcc c
add a comment |
I'm trying to compile a C code with this command gcc -Wall -m32 -std=gnu99 -o <filename> <filename>
Instead of getting an output file, I get this.
/usr/bin/ld: cannot find Scrt1.o: No such file or directory
/usr/bin/ld: cannot find crti.o: No such file or directory
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/7/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/7/libgcc_s.so.1 when searching for libgcc_s.so.1
/usr/bin/ld: cannot find libgcc_s.so.1
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/7/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
collect2: error: ld returned 1 exit status
Compiling with -std=c11
works perfectly fine, but not with -std=gnu99
.
gcc c
1
Have you installedgcc-multilib
?
– fkraiem
Nov 12 '17 at 5:16
add a comment |
I'm trying to compile a C code with this command gcc -Wall -m32 -std=gnu99 -o <filename> <filename>
Instead of getting an output file, I get this.
/usr/bin/ld: cannot find Scrt1.o: No such file or directory
/usr/bin/ld: cannot find crti.o: No such file or directory
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/7/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/7/libgcc_s.so.1 when searching for libgcc_s.so.1
/usr/bin/ld: cannot find libgcc_s.so.1
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/7/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
collect2: error: ld returned 1 exit status
Compiling with -std=c11
works perfectly fine, but not with -std=gnu99
.
gcc c
I'm trying to compile a C code with this command gcc -Wall -m32 -std=gnu99 -o <filename> <filename>
Instead of getting an output file, I get this.
/usr/bin/ld: cannot find Scrt1.o: No such file or directory
/usr/bin/ld: cannot find crti.o: No such file or directory
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/7/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/7/libgcc_s.so.1 when searching for libgcc_s.so.1
/usr/bin/ld: cannot find libgcc_s.so.1
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/7/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
collect2: error: ld returned 1 exit status
Compiling with -std=c11
works perfectly fine, but not with -std=gnu99
.
gcc c
gcc c
asked Nov 12 '17 at 4:06
SchmerzmittelSchmerzmittel
163
163
1
Have you installedgcc-multilib
?
– fkraiem
Nov 12 '17 at 5:16
add a comment |
1
Have you installedgcc-multilib
?
– fkraiem
Nov 12 '17 at 5:16
1
1
Have you installed
gcc-multilib
?– fkraiem
Nov 12 '17 at 5:16
Have you installed
gcc-multilib
?– fkraiem
Nov 12 '17 at 5:16
add a comment |
2 Answers
2
active
oldest
votes
Bascially this means that you don't have 32 bits support on your system, just 64 bits.
With main.c
/* extern void start(); */
int main()
{
/* start(); */
}
and
gcc -m32 main.c -o main
I got on an ubuntu 18.04 with just gcc installed:
> ~/PROJECT2/ciforthcvs$ gcc -m32 main.c -o main /usr/bin/ld: cannot
> find Scrt1.o: No such file or directory /usr/bin/ld: cannot find
> crti.o: No such file or directory /usr/bin/ld: skipping incompatible
> /usr/lib/gcc/x86_64-linux-gnu/7/libgcc.a when searching for -lgcc
> /usr/bin/ld: cannot find -lgcc /usr/bin/ld: skipping incompatible
> /usr/lib/gcc/x86_64-linux-gnu/7/libgcc.a when searching for -lgcc
> /usr/bin/ld: cannot find -lgcc collect2: error: ld returned 1 exit
> status
after
su
# apt install multi-lib
Everything went nice, and I could run my do nothing program.
add a comment |
try:
find / -iname='*Scrit1.o*' 2>/dev/null
find / -iname='*criti.o*' 2>/dev/null
modify your gcc command to read
gcc -Wall -m32 -std=gnu99 -o <filename> <filename> /some-path/Scrit1.o /some-other-path/criti.o
really mister Ward, if the base files for the loader were present, do you think ld would need help in findng them?
– Albert van der Horst
yesterday
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f975609%2fgcc-std-gnu99-error%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Bascially this means that you don't have 32 bits support on your system, just 64 bits.
With main.c
/* extern void start(); */
int main()
{
/* start(); */
}
and
gcc -m32 main.c -o main
I got on an ubuntu 18.04 with just gcc installed:
> ~/PROJECT2/ciforthcvs$ gcc -m32 main.c -o main /usr/bin/ld: cannot
> find Scrt1.o: No such file or directory /usr/bin/ld: cannot find
> crti.o: No such file or directory /usr/bin/ld: skipping incompatible
> /usr/lib/gcc/x86_64-linux-gnu/7/libgcc.a when searching for -lgcc
> /usr/bin/ld: cannot find -lgcc /usr/bin/ld: skipping incompatible
> /usr/lib/gcc/x86_64-linux-gnu/7/libgcc.a when searching for -lgcc
> /usr/bin/ld: cannot find -lgcc collect2: error: ld returned 1 exit
> status
after
su
# apt install multi-lib
Everything went nice, and I could run my do nothing program.
add a comment |
Bascially this means that you don't have 32 bits support on your system, just 64 bits.
With main.c
/* extern void start(); */
int main()
{
/* start(); */
}
and
gcc -m32 main.c -o main
I got on an ubuntu 18.04 with just gcc installed:
> ~/PROJECT2/ciforthcvs$ gcc -m32 main.c -o main /usr/bin/ld: cannot
> find Scrt1.o: No such file or directory /usr/bin/ld: cannot find
> crti.o: No such file or directory /usr/bin/ld: skipping incompatible
> /usr/lib/gcc/x86_64-linux-gnu/7/libgcc.a when searching for -lgcc
> /usr/bin/ld: cannot find -lgcc /usr/bin/ld: skipping incompatible
> /usr/lib/gcc/x86_64-linux-gnu/7/libgcc.a when searching for -lgcc
> /usr/bin/ld: cannot find -lgcc collect2: error: ld returned 1 exit
> status
after
su
# apt install multi-lib
Everything went nice, and I could run my do nothing program.
add a comment |
Bascially this means that you don't have 32 bits support on your system, just 64 bits.
With main.c
/* extern void start(); */
int main()
{
/* start(); */
}
and
gcc -m32 main.c -o main
I got on an ubuntu 18.04 with just gcc installed:
> ~/PROJECT2/ciforthcvs$ gcc -m32 main.c -o main /usr/bin/ld: cannot
> find Scrt1.o: No such file or directory /usr/bin/ld: cannot find
> crti.o: No such file or directory /usr/bin/ld: skipping incompatible
> /usr/lib/gcc/x86_64-linux-gnu/7/libgcc.a when searching for -lgcc
> /usr/bin/ld: cannot find -lgcc /usr/bin/ld: skipping incompatible
> /usr/lib/gcc/x86_64-linux-gnu/7/libgcc.a when searching for -lgcc
> /usr/bin/ld: cannot find -lgcc collect2: error: ld returned 1 exit
> status
after
su
# apt install multi-lib
Everything went nice, and I could run my do nothing program.
Bascially this means that you don't have 32 bits support on your system, just 64 bits.
With main.c
/* extern void start(); */
int main()
{
/* start(); */
}
and
gcc -m32 main.c -o main
I got on an ubuntu 18.04 with just gcc installed:
> ~/PROJECT2/ciforthcvs$ gcc -m32 main.c -o main /usr/bin/ld: cannot
> find Scrt1.o: No such file or directory /usr/bin/ld: cannot find
> crti.o: No such file or directory /usr/bin/ld: skipping incompatible
> /usr/lib/gcc/x86_64-linux-gnu/7/libgcc.a when searching for -lgcc
> /usr/bin/ld: cannot find -lgcc /usr/bin/ld: skipping incompatible
> /usr/lib/gcc/x86_64-linux-gnu/7/libgcc.a when searching for -lgcc
> /usr/bin/ld: cannot find -lgcc collect2: error: ld returned 1 exit
> status
after
su
# apt install multi-lib
Everything went nice, and I could run my do nothing program.
edited yesterday
Sergiy Kolodyazhnyy
71.9k9148314
71.9k9148314
answered yesterday
Albert van der HorstAlbert van der Horst
1515
1515
add a comment |
add a comment |
try:
find / -iname='*Scrit1.o*' 2>/dev/null
find / -iname='*criti.o*' 2>/dev/null
modify your gcc command to read
gcc -Wall -m32 -std=gnu99 -o <filename> <filename> /some-path/Scrit1.o /some-other-path/criti.o
really mister Ward, if the base files for the loader were present, do you think ld would need help in findng them?
– Albert van der Horst
yesterday
add a comment |
try:
find / -iname='*Scrit1.o*' 2>/dev/null
find / -iname='*criti.o*' 2>/dev/null
modify your gcc command to read
gcc -Wall -m32 -std=gnu99 -o <filename> <filename> /some-path/Scrit1.o /some-other-path/criti.o
really mister Ward, if the base files for the loader were present, do you think ld would need help in findng them?
– Albert van der Horst
yesterday
add a comment |
try:
find / -iname='*Scrit1.o*' 2>/dev/null
find / -iname='*criti.o*' 2>/dev/null
modify your gcc command to read
gcc -Wall -m32 -std=gnu99 -o <filename> <filename> /some-path/Scrit1.o /some-other-path/criti.o
try:
find / -iname='*Scrit1.o*' 2>/dev/null
find / -iname='*criti.o*' 2>/dev/null
modify your gcc command to read
gcc -Wall -m32 -std=gnu99 -o <filename> <filename> /some-path/Scrit1.o /some-other-path/criti.o
edited Nov 12 '17 at 4:40
Thomas Ward♦
44.3k23123176
44.3k23123176
answered Nov 12 '17 at 4:35
rhubarbdogrhubarbdog
20717
20717
really mister Ward, if the base files for the loader were present, do you think ld would need help in findng them?
– Albert van der Horst
yesterday
add a comment |
really mister Ward, if the base files for the loader were present, do you think ld would need help in findng them?
– Albert van der Horst
yesterday
really mister Ward, if the base files for the loader were present, do you think ld would need help in findng them?
– Albert van der Horst
yesterday
really mister Ward, if the base files for the loader were present, do you think ld would need help in findng them?
– Albert van der Horst
yesterday
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f975609%2fgcc-std-gnu99-error%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Have you installed
gcc-multilib
?– fkraiem
Nov 12 '17 at 5:16