All Questions
Tagged with c99 visual-studio
25 questions
4
votes
3
answers
373
views
Is it valid to check if a function is defined in C?
void f();
int main(int argc, char** argv)
{
if (f)
{
// other code
}
}
With VS2017, the linker complaint about unsolved external symbol, while it works with GCC. According to C99 ...
0
votes
0
answers
150
views
Visual Studio Open Folder GCC (Cygwin) Intellisense Errors
I'm trying to configure Visual Studio Community 2019 for use as the IDE for work on an open source C project targeting the Nintendo 64.
The makefile seems to define a gcc-derivative (mips64-elf-gcc) ...
3
votes
0
answers
193
views
Adding array indices in parameter declarations with 'static' leads to error
I want to compile 2 C functions using VS2019 (MSVC 19.24.28314.0):
void func1(int array[1]) { }
void func2(int array[static 1]) { }
The function 1 was compiled normally, however function 2 could not ...
3
votes
2
answers
125
views
Variadic macro expansion's going wrong
Consider the following code
#define COMB(F, ...) F(__VA_ARGS__)
#define ADD(X, Y) (X + Y)
int foo() {
return COMB(ADD, 1, 2);
}
I have done some experiments on Godbolt. Microsoft VS v19.22 (...
19
votes
2
answers
24k
views
Is there any option to switch between C99 and C11 C standards in Visual Studio?
I am new to Visual Studio Environment and I am using VS2017 Pro.
I wanted to write simple program in C and compiled with both c99 and c11 standards. In Visual Studio, I could only find compiler ...
13
votes
2
answers
14k
views
Does Visual Studio 2017 fully support C99?
Recent versions of Visual Studio have seen improving support for C99. Does the latest version, VS2017, now support all of C99?
If not, what features of C99 are still missing?
0
votes
1
answer
2k
views
Static structure initialization with a pointer to array of pointers member
I'm trying to initialize a structure member that needs to point to an array of pointers. The idea is to declare the array of structures statically to avoid initialization overhead since all the data ...
1
vote
1
answer
1k
views
fmax and fmin alternative in c89
When trying to compile GLFW using visual studio 2010 I got error that
"error LNK2019: unresolved external symbol _fmax referenced in
Error 3 error LNK2019: unresolved external symbol _fmax ...
-5
votes
1
answer
1k
views
Visual Studio 2015 in C++ does not support C99
When I try to compile by C++ compiler some code with designated initializers (C99).
And obviously I have errors due to it.
Does somebody know how to enable support of C99 for C++ code ?
0
votes
1
answer
214
views
Resharper C++ enforce C99
I am writing an embedded application in plain C99 in Visual Studio with VisualGDB and Resharper c++.
The Resharper website states that it fully supports C99.
But if I have a typedef struct like this
...
2
votes
1
answer
73
views
Can I make MSVS 2013 flag declarations after statements?
I have code which is compiled on some platforms in MSVS 2013 and on others in MSVS 2010 (not to mention UNIX and VMS). Since MSVS 2010 does not support declarations after statements (as reported in ...
0
votes
1
answer
2k
views
Compiling C99 in cl compiler
I am using the microsoft cl compiler (the one that comes with Visual Studio 2013) and I am looking for a command to use when compiling to tell the compiler to support C99.. Can anyone help me do this?
21
votes
1
answer
6k
views
What is the official status of C99 support in VS2013?
I see that VS2013 added support for a large number of major core language features of C99. Now it supports compound literals, designated initializers, variadic macros, interleaved declarations and ...
1
vote
2
answers
738
views
Visual Studio C function syntax error
I'm trying to implement a C function like this in Visual Studio, I've followed Creating a C Project in Visual Studio
void changeParameters(int &a, int n) {
for (int i=0; i<n; ++i) {
...
0
votes
1
answer
870
views
VS2013 compilation issues with regard to usage of _Bool
I am compiling the following peice of code in VS2013,
#if (__STDC_VERSION__ >= 199901L)
/* Inactive pre-processor block */
#else
/* Active pre-processor block */
#ifndef ...
37
votes
2
answers
18k
views
Which C99 features are available in the MS Visual Studio compiler?
It's well known that Microsoft's Visual Studio compiler does not support C99, and it looks like they have no plans to support it.
However, the compiler does include some cherry picked features such as ...
2
votes
3
answers
1k
views
Why doesn't the Visual Studio C compiler like this?
The following code compiles fine on Linux using gcc -std=c99 but gets the following errors on the Visual Studio 2010 C compiler:
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 ...
13
votes
3
answers
21k
views
Does Microsoft visual studio 2010 support c99?
I would like to know if Microsoft Visual Studio 2010 supports C99. If not, how can I use the standard types like intptr_t and uintptr_t?
1
vote
3
answers
5k
views
Pointer mismatch for actual parameter?
I have a function which creates an array of pointers. The function which allocates the memory returns the new memory pointer through a parameter passed to the function. The simplest code which can ...
2
votes
1
answer
884
views
C99 fenv.h for MS compilers
Anyone know of a decent C99 fenv.h implementation for MS compilers?
I imagine this wouldn't be difficult to do; I'm just looking to save some time.
3
votes
1
answer
850
views
Visual Studio 2008 Restrict to ANSI C
I want to restrict microsoft visual studio so that it can only run "C99" (ANSI C) code. Can any one give me some guideline?
2
votes
1
answer
255
views
Dots in Variables? VC9 gives parsing errors when building beecrypt
I want to compile the beecrypt library under VS2008. But several of the below structures produce a syntax error (C2059 syntax error: '.'):
const hashFunction md5 = {
.name = "MD5",
.paramsize = ...
6
votes
2
answers
10k
views
C99 complex support with visual studio
I would like to use complex numbers as defined in C99, but I need to support compilers which do not support it (MS compilers come to mind).
I don't need many functions, and implementing the needed ...
103
votes
12
answers
66k
views
Visual Studio support for new C / C++ standards?
I keep reading about C99 and C++11 and all these totally sweet things that are getting added to the language standard that might be nice to use someday. However, we currently languish in the land of ...
120
votes
7
answers
148k
views
C99 stdint.h header and MS Visual Studio
To my amazement I just discovered that the C99 stdint.h is missing from MS Visual Studio 2003 upwards. I'm sure they have their reasons, but does anyone know where I can download a copy? Without ...