|
Crasehs when use primitive functions |
Ramara
Member #19,118
January 2021
|
Hello everyone, Code Blocks Allegro 5.2.7 (allegro-x86_64-w64-mingw32-gcc-10.2.0-posix-seh-static-5.2.7.0) Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz 3.70 GHz x64 Windows 10 Pro I'm lost, no wrong .dll somewhere. Compiled with seh-static-5.2.7 Simple Test Code: 1#define ALLEGRO_STATICLINK
2#include <stdio.h>
3#include <allegro5/allegro5.h>
4
5#include <allegro5/allegro_primitives.h>
6
7#include <cmath>
8#include <math.h>
9#include <string>
10#include <sstream>
11#include <iostream>
12#include <ctime>
13#include <unistd.h>
14#include <windows.h>
15int main() {
16
17ALLEGRO_DISPLAY * display;
18
19if(!al_init()){
20 fprintf(stderr,"No init!\n");
21 //system("pause");
22 return -1;
23 }
24
25display = al_create_display(640, 480);
26if(!al_init_primitives_addon()){
27 fprintf(stderr,"Couldn't initialize primitives addon!\n");
28 return -1;
29 }
30al_get_allegro_primitives_version();
31bool running = true;
32 while (running) {
33
34 al_draw_rectangle(100, 100, 300, 300, al_map_rgb(0, 255, 0), 1);
35
36 al_flip_display();
37 }
38al_shutdown_primitives_addon();
39al_destroy_display(display);
40return 0;
41}
---------------------- |
SiegeLord
Member #7,827
October 2006
|
Do you have a backtrace? "For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
Ramara
Member #19,118
January 2021
|
Hey, i adde this code: 1bool init=false;
2init=al_init();
3cout << "Init: " << init << "\n";
4
5printf("Ver: %0x\nVer: %0x\n", ALLEGRO_VERSION_INT, al_get_allegro_version());
6
7bool primitive=false;
8primitive=al_init_primitives_addon();
9cout << "Primitive: " << primitive << "\n";
//system("pause"); Result: Init: 1 I attached debug too. |
SiegeLord
Member #7,827
October 2006
|
That's not it. It needs to be a list of functions + files + line numbers that comprise the call stack. It should start in your main, and end somewhere in the primitives addon (and I'd like to know where in the addon it stops). "For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
|