I am currently trying to write a small program using FMOD audio libraries but am having trouble understanding how to link them.
I have a small program that looks as follows
#include "/home/me/fmod_test/api/lowlevel/inc/fmod.h"
#include "/home/me/fmod_test/api/lowlevel/inc/fmod.hpp"
#include "/home/me/fmod_test/api/lowlevel/inc/fmod_errors.h"
#include <iostream>
using namespace std;
int main()
{
FMOD::System *system;
FMOD::Sound *sound1;
FMOD::System_Create(&system); // create an instance of the game engine
}
But when I attempt to compile using
g++ -L/home/me/fmod_test/api/lowlevel/lib/x86_64 -lfmod -lfmodL test.cpp -o test
I get an error like this
In function `FMOD::System_Create(FMOD::System**)':
test.cpp:(.text._ZN4FMOD13System_CreateEPPNS_6SystemE[_ZN4FMOD13System_CreateEPPNS_6SystemE]+0x14): undefined reference to `FMOD_System_Create'
I have included screenshots to show that these libraries and headers do actually exist in my system
Interestingly enough, if I comment out the System_Create call the FMOD::System and Sound initializations still work fine.
Am I linking incorrectly, I cant figure out why this wouldnt be working (and yes I am on x86_64 architecture as per the output of uname -a)