I've tried to essentially build the PhysFS library with Cmake, what I used was Code::Blocks mingw makefiles. I can import in my project, I can technically declare the PhysFS_init() function (although that gives me too few arguments error) yet when I add an argument it tells me PHYSFS_init is an undefined reference.
That sounds so silly to me, how can you recognize it when it has no argument, but pretend it doesn't exist when I add an argument? I've run CMake twice, but I'm simply getting this:
[...]\src\main.cpp|20|undefined reference to `PHYSFS_init'|
The code, if necessary (just a bit, the rest is irrelevant):
#include <SFML/Window.hpp>
#include <SFML/System.hpp>
#include <iostream>
#include "Globals.h"
#include "GameStates.h"
#include "GameWindow.h"
#include "GameMenu.h"
#include <physfs.h>
int main(int argc, char** argv)
{
///<|===================| Classes & Declarations |===================|>
sf::Event ev;
sf::RenderWindow winMain ( sf::VideoMode( WindowWidth, WindowHeight, 32 ), WindowTitle );
sf::Image Icon;
GameStates gameState;
GameMenu TitleMenu;
MenuButton buttons[4];
PHYSFS_init(NULL);
Why is this happening? What do I have to do to be able to use PhysFS in my project? I've built the library with CMake, I included the library I need, and I tried to initialize PhysFS which gave me an error which makes me feel like the way C++ compiles program is plain silly.