Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7956 Discussions

icc: command line error: invalid argument for option '-std'

solunskiy_mitya
Beginner
1,464 Views
What can i do with this error?

configure:5649: checking whether icc supports -Wmissing-format-attribute
configure:5686: icc -o conftest -std=iso9899:1990 -W -Wall -Wchar-subscripts -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -O2 -Wmissing-format-attribute conftest.c >&5
icc: command line error: invalid argument for option '-std'
configure:5693: $? = 1
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "kdelibs"
| #define VERSION "3.5.10"
| /* end confdefs.h. */
|
| int
| main ()
| {
| return 0;
| ;
| return 0;
| }
configure:5728: result: no
0 Kudos
3 Replies
solunskiy_mitya
Beginner
1,464 Views
In 'man icc' i saw that iso9899:1990 is a -std=89 for icc.
I try './configure CC=icc CXX=icpc CFLAGS="-std=89"' , but in this case i got the same error:

configure:5686: icc -o conftest -std=iso9899:1990 -W -Wall -Wchar-subscripts -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -O2 -std=c89 -Wmissing-format-attribute conftest.c >&5
icc: command line error: invalid argument for option '-std'
0 Kudos
TimP
Honored Contributor III
1,464 Views
The equivalent of -std=c89 is the default. Try omitting that option.
0 Kudos
JenniferJ
Moderator
1,464 Views
Quoting - solunskiy.mitya
In 'man icc' i saw that iso9899:1990 is a -std=89 for icc.
I try './configure CC=icc CXX=icpc CFLAGS="-std=89"' , but in this case i got the same error:

configure:5686: icc -o conftest -std=iso9899:1990 -W -Wall -Wchar-subscripts -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -O2 -std=c89 -Wmissing-format-attribute conftest.c >&5
icc: command line error: invalid argument for option '-std'

The valid optionsfor "-std" are following:
-std=
enable language support for , as described below
c99 enable C99 support for C programs
c++0x enable preliminary support for some C++0x features

You have "-std=iso9899:1990" and "-std=c89". Try without passing "-std", use the default like Tim suggested.

Jennifer
0 Kudos
Reply