error C4430: missing type specifier - int assumed. Note: C++ does not support default-int - Prev solutions not working

sk2013 picture sk2013 · May 21, 2016 · Viewed 7.1k times · Source

I am compiling VC++ code in Visual Studio 2010. This line in the code is giving two errors:

assert.h
//ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_Export void __ace_assert(const char *file, int line, const ACE_TCHAR *expression);
//ACE_END_VERSIONED_NAMESPACE_DECL

I have these files included in this file:

#include /**/ "ace/pre.h"
#include /**/ "ace/ACE_export.h"
#include /**/ "ace/config-all.h"
#include "ace/Versioned_Namespace.h"

Errors:

  1. error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

  2. error C2143: syntax error : missing ',' before '*'

What is wrong with this line that could be causing these errors ?

I found other posts reporting similar error but none of the solutions have worked for me so far. Tried : Error C4430, C2146 - missing type specifier - int assumed. Note: C++ does not support default-int

VC++ missing type specifier - int assumed. Note: C++ does not support default-int

Error 2 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

Compiler error C4430: missing type specifier - int assumed

Thank you.

Answer

Rick4Real picture Rick4Real · May 21, 2016

If assert.h is in your program exactly as shown, that would be the problem. Try including assert.

#include "assert.h"

Also, make sure that ACE_Export and ACE_TCHAR are defined.

Line numbers and the exact compiler message would be helpful.