Hello there, I'm trying out FPL on linux.
My main.c contains the basic example for window + opengl from the FPL file :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39 | #define FPL_IMPLEMENTATION
#include "final_platform_layer.h"
int main(int argc, char **args){
fplSettings settings;
fplSetDefaultSettings(&settings);
fplVideoSettings videoSettings = settings.video;
videoSettings.driver = fplVideoDriverType_OpenGL;
// Legacy OpenGL
// videoSettings.opengl.compabilityFlags = fplOpenGLCompabilityFlags_Legacy;
// or
// Modern OpenGL
videoSettings.opengl.compabilityFlags = fplOpenGLCompabilityFlags_Core;
videoSettings.opengl.majorVersion = 3;
videoSettings.opengl.minorVersion = 3;
if (fplPlatformInit(fplInitFlags_Video, &settings)) {
// Event/Main loop
while (fplWindowUpdate()) {
// Handle actual window events
fplEvent ev;
while (fplPollEvent(ev)) {
/// ...
}
// your code goes here
fplVideoFlip();
}
fplPlatformRelease();
return 0;
} else {
return -1;
}
}
|
This is the command I use to compile :
| gcc main.c -ldl && ./a.out
|
Theses are the errors I get.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 | main.c: In function ‘main’:
main.c:17:15: error: ‘fplVideoSettings {aka struct fplVideoSettings}’ has no member named ‘opengl’
videoSettings.opengl.compabilityFlags = fplOpenGLCompabilityFlags_Core;
^
main.c:18:15: error: ‘fplVideoSettings {aka struct fplVideoSettings}’ has no member named ‘opengl’
videoSettings.opengl.majorVersion = 3;
^
main.c:19:15: error: ‘fplVideoSettings {aka struct fplVideoSettings}’ has no member named ‘opengl’
videoSettings.opengl.minorVersion = 3;
^
main.c:26:24: error: incompatible type for argument 1 of ‘fplPollEvent’
while (fplPollEvent(ev)) {
^
In file included from main.c:2:0:
final_platform_layer.h:7187:21: note: expected ‘fplEvent * {aka struct fplEvent *}’ but argument is of type ‘fplEvent {aka struct fplEvent}’
fpl_common_api bool fplPollEvent(fplEvent *ev) {
|
I've got to admit, I have no clue on how to get past this. Any idea ?