I'm getting a problem I have gotten before but I never knew how to exactly solve it.
Code:
Error 1 error LNK2005: _id3v1_h already defined in check.obj main.obj
Error 2 fatal error LNK1169: one or more multiply defined symbols found C:\Users\Ben\Desktop\Music Organizer\Debug\Music Organizer.exe
Not sure why I get this. From the message it seems like a multi-declaration. Heres the format of my files.
main.c
Code:
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include "id3.h"
check.c
Code:
#include <windows.h>
#include <stdio.h>
#include "id3.h"
id3.h
Code:
#ifndef ID3_H
#define ID3_H
#pragma pack(push, 1)
typedef struct id3v1
{
char tag[3];
char title[30];
char artist[30];
char album[30];
char year[4];
char comment[29];
char track;
char genre;
} id3v1;
#pragma pack(pop)
id3v1 id3v1_h = {{0}, {0}, {0}, {0}, {0}, {0}, 0, 0};
int has_id3v1(char filename[]);
#endif
Can you not initialize in header files or something?