This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to add Linker script in visual studio C++ ??

#pragma DATA_SECTION (".myvarloc");
uint8 measurements[30];

I have created a array of size 30 in my program as above.

MEMORY
{
MYMEMORY(rw) : ORIGIN = 0x00007800, LENGTH = 5K
}

.myvars (NOLOAD) :
{
*(. myvarloc)

} > MYMEMORY

But how to add the above code in the linker file in my IDE. I am using visual studio C++ ??