I am using SIGIL for C++ and am having an issue where every function call to a SIGIL function given an undefined reference error. I am using the example program, here is a copy of it:
#include "sl.h"
int main(int args, char *argv[])
{
// set up our window and a few resources we need
slWindow(400, 400, "Simple SIGIL Example", false);
slSetFont(slLoadFont("ttf/white_rabbit.ttf"), 24);
slSetTextAlign(SL_ALIGN_CENTER);
int tex = slLoadTexture("png/glow.png");
while(!slShouldClose() && !slGetKey(SL_KEY_ESCAPE))
{
// background glow
slSetForeColor(0.1, 0.9, 0.2, 0.4);
slSprite(tex, 200, 240, 300, 200);
// large text and fat line
slSetForeColor(0.0, 0.8, 0.2, 1.0);
slSetFontSize(24);
slText(200, 250, "SIGIL:");
slRectangleFill(200, 240, 100, 7);
// smaller subtext
slSetFontSize(14);
slText(200, 220, "Sprites, text, sound, input, and more!");
slLine(48, 210, 352, 210);
slRender(); // draw everything
}
slClose(); // close the window and shut down SIGIL
return 0;
}
Here is the build log:
-------------- Build: Debug in Puzzle Fusion (compiler: GNU GCC Compiler)---------------
g++.exe -Wall -g -Iinclude -Ibin -c "C:\Users\Ninji2701\Desktop\Pile-o-Stuff\Puzzle Fusion\main.cpp" -o obj\Debug\main.o
g++.exe -Llib -o "bin\Debug\Puzzle Fusion.exe" obj\Debug\main.o lib\libsigil.dll.a
obj\Debug\main.o: In function `main':
C:/Users/Ninji2701/Desktop/Pile-o-Stuff/Puzzle Fusion/main.cpp:6: undefined reference to `slWindow'
C:/Users/Ninji2701/Desktop/Pile-o-Stuff/Puzzle Fusion/main.cpp:7: undefined reference to `slLoadFont'
C:/Users/Ninji2701/Desktop/Pile-o-Stuff/Puzzle Fusion/main.cpp:7: undefined reference to `slSetFont'
C:/Users/Ninji2701/Desktop/Pile-o-Stuff/Puzzle Fusion/main.cpp:8: undefined reference to `slSetTextAlign'
C:/Users/Ninji2701/Desktop/Pile-o-Stuff/Puzzle Fusion/main.cpp:9: undefined reference to `slLoadTexture'
C:/Users/Ninji2701/Desktop/Pile-o-Stuff/Puzzle Fusion/main.cpp:11: undefined reference to `slShouldClose'
C:/Users/Ninji2701/Desktop/Pile-o-Stuff/Puzzle Fusion/main.cpp:11: undefined reference to `slGetKey'
C:/Users/Ninji2701/Desktop/Pile-o-Stuff/Puzzle Fusion/main.cpp:14: undefined reference to `slSetForeColor'
C:/Users/Ninji2701/Desktop/Pile-o-Stuff/Puzzle Fusion/main.cpp:15: undefined reference to `slSprite'
C:/Users/Ninji2701/Desktop/Pile-o-Stuff/Puzzle Fusion/main.cpp:18: undefined reference to `slSetForeColor'
C:/Users/Ninji2701/Desktop/Pile-o-Stuff/Puzzle Fusion/main.cpp:19: undefined reference to `slSetFontSize'
C:/Users/Ninji2701/Desktop/Pile-o-Stuff/Puzzle Fusion/main.cpp:20: undefined reference to `slText'
C:/Users/Ninji2701/Desktop/Pile-o-Stuff/Puzzle Fusion/main.cpp:21: undefined reference to `slRectangleFill'
C:/Users/Ninji2701/Desktop/Pile-o-Stuff/Puzzle Fusion/main.cpp:24: undefined reference to `slSetFontSize'
C:/Users/Ninji2701/Desktop/Pile-o-Stuff/Puzzle Fusion/main.cpp:25: undefined reference to `slText'
C:/Users/Ninji2701/Desktop/Pile-o-Stuff/Puzzle Fusion/main.cpp:26: undefined reference to `slLine'
C:/Users/Ninji2701/Desktop/Pile-o-Stuff/Puzzle Fusion/main.cpp:28: undefined reference to `slRender'
C:/Users/Ninji2701/Desktop/Pile-o-Stuff/Puzzle Fusion/main.cpp:30: undefined reference to `slClose'
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 0 second(s))
19 error(s), 0 warning(s) (0 minute(s), 0 second(s))
I am using minGW and have followed all instructions in the tutorial exactly.
What is causing this, and how can I fix it?
I have read the "duplicate question", and it is extremely general, and doesn't help me, as what I'm asking is a question about a very specific instance, and the answers to the other question do not help in this instance.