I have been looking everywhere for solution and been stuck for a week now. The error im getting is: Error LNK2001 unresolved external symbol "bool __cdecl read_data(unsigned char *,unsigned __int64)"
I have a file.h, with all the declarations from file.cpp:
#pragma once
#include <iostream>
#define READ_DATA(buf, N) if (!read_data(buf, N)){return EXIT_FAILURE;}
bool read_file(const char* file_path);
bool read_data(uint8_t* buffer, size_t N);
uint64_t uint8_t__to__uint64_t(uint8_t* buffer, std::streamsize N);
bool check_magic(uint8_t* buffer);
bool write_header(std::fstream& file_stream);
bool make_file(const char* file_path);
file.cpp, with the definitions:
#pragma once
#include <iostream>
#include <fstream>
#include "global.h"
#include "file.h"
bool read_file(const char* file_path)
{
// ofc with code inside
}
bool read_data(uint8_t* buffer, size_t N)
{
// ofc with code inside
}
uint64_t uint8_t__to__uint64_t(uint8_t* buffer, std::streamsize N)
{
// ofc with code inside
}
bool check_magic(uint8_t* buffer)
{
// ofc with code inside
}
bool write_header(std::fstream& file_stream)
{
// ofc with code inside
}
bool make_file(const char* file_path)
{
// ofc with code inside
}
and inside main.cpp is where i include file.h and call functions from file.henter code here