Windows 11, Visual Studio 2019, C++
I started getting this error:
1>ripemd_160_test_data.obj : error LNK2005: "char (* ripemd_input)[90]" (?ripemd_input@@3PAY0FK@DA) already defined in ripemd_160_13.obj
1>E:\WX\ripemd_160_13\Debug\ripemd_160_13.exe : fatal error LNK1169: one or more multiply defined symbols found
I have removed almost all the code with only one instance of that item and still get the error. Here is the main project file:
include <iostream>
include "ripemd_160_test_data.h"
int main()
{
std::cout << "Hello World!\n";
}
Yeah, that it. Here is the utility include file.
#pragma once
#ifndef RIPEMD_160_TEST_DATA_H
#define RIPEMD_160_TEST_DATA_H
#include <stdint.h>
#include <string>
const size_t rm_count = 8;
const size_t max_in = 90;
char ripemd_input[rm_count ][ max_in ] =
{
{ "a" }
// deleted stuff
};
#endif
Please note the #pragma and the #define.
And here is the cpp file.
// test data for RIPEMD-160 test data
// A RIPEMD-160 output is always the same length.
#include "ripemd_160_test_data.h"
Yeah, it down to just that.
I have done a clean and build and continue to get that same error. There is nothing left to remove.
What am I doing wrong.
Edit: I did use the "101010" tool to mark the code as such and it did not work.
Edit: And I started a new console project and added just those two files to the project, nothing else. The error is still there.