I have set up a simple program which reproduces the error:
// main.cpp
#include "header.h"
int main()
{
return 0;
}
Now the header file for the function:
// header.h
#ifndef __HEADER_INCLUDED
#define __HEADER_INCLUDED
float const funct();
#endif
And the cpp file for the function:
// header.cpp
#include "header.h"
float const funct()
{
return 1.0f;
}
Compiling this, I get this error:
Release\header.obj : warning LNK4042: object specified more than once; extras ignored
Am I missing something obvious or is this just another VS bug/peculiarity?