Reputation: 3637
While changing the language of the resource elements in my visual studio project from english to azerbaijan I am getting this error:
error RC2144 : PRIMARY LANGUAGE ID not a number
and that line is :
LANGUAGE LANG_AZERI_CYRILLIC, SUBLANG_AZERI_CYRILLIC
What's happening here?
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#include <windows.h>
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#ifndef APSTUDIO_INVOKED
#include "targetver.h"
#endif
#include "winres.h"
Upvotes: 2
Views: 3446
Reputation: 3189
Simply add #include <windows.h>
to your resources.rc file. Sometimes the line is not generated.
It's lame, I know.
Upvotes: 2
Reputation: 19
With Visual Studio 2015 These lines always been overwritten when editing resources. To add this includes with Visual Studio 2015:
Add to the write protected symbols:
#include "winres.h"
Upvotes: 1
Reputation: 2815
The error is because the resource designer using constant (language ID) defined in winres.h, but the winres.h is not included in the resource file.
Add this line to resource.rc (view code as text, not from dialog editor), this will fix the problem:
#define APSTUDIO_READONLY_SYMBOLS
#include <winres.h>
#undef APSTUDIO_READONLY_SYMBOLS
P.S: you need also to define APSTUDIO_READONLY_SYMBOLS to keep include winres.h because Visual Studio will always keep removing #include
Upvotes: 7
Reputation: 3637
The solution was to change the line LANGUAGE LANG_AZERI_CYRILLIC, SUBLANG_AZERI_CYRILLIC
from the resource file to LANGUAGE LANG_AZERI, SUBLANG_AZERI_CYRILLIC
as defined here.
It seems like visual studio generated that code erroneously.
Upvotes: 0