Allegro 5.2 compilation errorserror: Unable to find vcvarsall.batsocket() return -1 but errno 0Can code that is valid in both C and C++ produce different behavior when compiled in each language?setting up allegro5 with visual studio 2012 on win8Functions of Allegro 4 in Allegro 5Allegro 5: al_create_display() failsNode.js/Windows error: ENOENT, stat 'C:UsersRTAppDataRoamingnpm'Compiling an application for use in highly radioactive environmentsAllegro - Missing MSVCR110D.dllAllegro Installation
Nails holding drywall
Combinatorics problem, right solution?
How bug prioritization works in agile projects vs non agile
Von Neumann Extractor - Which bit is retained?
Why do distances seem to matter in the Foundation world?
Can a stored procedure reference the database in which it is stored?
How can I wire a 9-position switch so that each position turns on one more LED than the one before?
What is this word supposed to be?
Prove that the countable union of countable sets is also countable
Work requires me to come in early to start computer but wont let me clock in to get paid for it
Why must Chinese maps be obfuscated?
How do I reattach a shelf to the wall when it ripped out of the wall?
Why did Rep. Omar conclude her criticism of US troops with the phrase "NotTodaySatan"?
Could moose/elk survive in the Amazon forest?
SFDX - Create Objects with Custom Properties
How to have a sharp product image?
What is the term for a person whose job is to place products on shelves in stores?
Contradiction proof for inequality of P and NP?
"The cow" OR "a cow" OR "cows" in this context
How to pronounce 'c++' in Spanish
Negative Resistance
Find the identical rows in a matrix
Island of Knights, Knaves and Spies
What is the unit of time_lock_delta in LND?
Allegro 5.2 compilation errors
error: Unable to find vcvarsall.batsocket() return -1 but errno 0Can code that is valid in both C and C++ produce different behavior when compiled in each language?setting up allegro5 with visual studio 2012 on win8Functions of Allegro 4 in Allegro 5Allegro 5: al_create_display() failsNode.js/Windows error: ENOENT, stat 'C:UsersRTAppDataRoamingnpm'Compiling an application for use in highly radioactive environmentsAllegro - Missing MSVCR110D.dllAllegro Installation
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I've been trying to work with Allegro version 5.2, but for some reason I cannot get it to compile on my System (running Windows 10 64 bit) using MinGW.
My Linker Settings
here's what I'm trying to link. According to the wiki this should be right, but whenever I try to compile sample code I get errors such as
srcgame.c|13|undefined reference to `al_clear_to_color'|
This function should be present for all I know.
I really appreciate any help :)
Here's an example of code that won't compile
#include"../include/init.h"
#include "allegro5/allegro5.h"
#include"allegro5/allegro_audio.h"
#include"allegro5/allegro_acodec.h"
#include<stdio.h>
#include<stdlib.h>
const float fps = 30;
const int width = 256;
const int height = 240;
int init()
running = 1;
if(!al_init())
fprintf(stderr, "failed to initialize allegro!n");
return -1;
timer = al_create_timer(1.0 / fps);
if(!timer)
fprintf(stderr, "failed to create timer!n");
return -1;
display = al_create_display(width, height);
if(!display)
fprintf(stderr, "failed to create display!n");
return -1;
event_queue = al_create_event_queue();
if(!event_queue)
fprintf(stderr, "failed to create event_queue!n");
return -1;
/*if(!al_install_audio())
fprintf(stderr, "failed to initialize audio!n");
return -1;
if(!al_install_keyboard())
fprintf(stderr, "failed to initialize the keyboard!n");
return -1;
if(!al_init_acodec_addon())
fprintf(stderr, "failed to initialize audio codecs!n");
return -1;
if (!al_reserve_samples(1))
fprintf(stderr, "failed to reserve samples!n");
return -1;
*/
if(!al_init_primitives_addon())
fprintf(stderr, "failed to create primitives addon");
return -1;
al_register_event_source(event_queue, al_get_display_event_source(display));
// register timer event for max fps
al_register_event_source(event_queue, al_get_timer_event_source(timer));
//al_register_event_source(event_queue, al_get_keyboard_event_source());
al_clear_to_color(al_map_rgb(0,0,0));
al_flip_display();
al_start_timer(timer);
return 1;
c windows allegro5
add a comment |
I've been trying to work with Allegro version 5.2, but for some reason I cannot get it to compile on my System (running Windows 10 64 bit) using MinGW.
My Linker Settings
here's what I'm trying to link. According to the wiki this should be right, but whenever I try to compile sample code I get errors such as
srcgame.c|13|undefined reference to `al_clear_to_color'|
This function should be present for all I know.
I really appreciate any help :)
Here's an example of code that won't compile
#include"../include/init.h"
#include "allegro5/allegro5.h"
#include"allegro5/allegro_audio.h"
#include"allegro5/allegro_acodec.h"
#include<stdio.h>
#include<stdlib.h>
const float fps = 30;
const int width = 256;
const int height = 240;
int init()
running = 1;
if(!al_init())
fprintf(stderr, "failed to initialize allegro!n");
return -1;
timer = al_create_timer(1.0 / fps);
if(!timer)
fprintf(stderr, "failed to create timer!n");
return -1;
display = al_create_display(width, height);
if(!display)
fprintf(stderr, "failed to create display!n");
return -1;
event_queue = al_create_event_queue();
if(!event_queue)
fprintf(stderr, "failed to create event_queue!n");
return -1;
/*if(!al_install_audio())
fprintf(stderr, "failed to initialize audio!n");
return -1;
if(!al_install_keyboard())
fprintf(stderr, "failed to initialize the keyboard!n");
return -1;
if(!al_init_acodec_addon())
fprintf(stderr, "failed to initialize audio codecs!n");
return -1;
if (!al_reserve_samples(1))
fprintf(stderr, "failed to reserve samples!n");
return -1;
*/
if(!al_init_primitives_addon())
fprintf(stderr, "failed to create primitives addon");
return -1;
al_register_event_source(event_queue, al_get_display_event_source(display));
// register timer event for max fps
al_register_event_source(event_queue, al_get_timer_event_source(timer));
//al_register_event_source(event_queue, al_get_keyboard_event_source());
al_clear_to_color(al_map_rgb(0,0,0));
al_flip_display();
al_start_timer(timer);
return 1;
c windows allegro5
Well I dont really see why the code does not compile, you could try asking the devs directly on the allegro.cc forums. They usually like to help new users :)
– rlam12
Jul 3 '16 at 16:35
Seems like a good idea :) Thanks
– unlink
Jul 4 '16 at 17:30
add a comment |
I've been trying to work with Allegro version 5.2, but for some reason I cannot get it to compile on my System (running Windows 10 64 bit) using MinGW.
My Linker Settings
here's what I'm trying to link. According to the wiki this should be right, but whenever I try to compile sample code I get errors such as
srcgame.c|13|undefined reference to `al_clear_to_color'|
This function should be present for all I know.
I really appreciate any help :)
Here's an example of code that won't compile
#include"../include/init.h"
#include "allegro5/allegro5.h"
#include"allegro5/allegro_audio.h"
#include"allegro5/allegro_acodec.h"
#include<stdio.h>
#include<stdlib.h>
const float fps = 30;
const int width = 256;
const int height = 240;
int init()
running = 1;
if(!al_init())
fprintf(stderr, "failed to initialize allegro!n");
return -1;
timer = al_create_timer(1.0 / fps);
if(!timer)
fprintf(stderr, "failed to create timer!n");
return -1;
display = al_create_display(width, height);
if(!display)
fprintf(stderr, "failed to create display!n");
return -1;
event_queue = al_create_event_queue();
if(!event_queue)
fprintf(stderr, "failed to create event_queue!n");
return -1;
/*if(!al_install_audio())
fprintf(stderr, "failed to initialize audio!n");
return -1;
if(!al_install_keyboard())
fprintf(stderr, "failed to initialize the keyboard!n");
return -1;
if(!al_init_acodec_addon())
fprintf(stderr, "failed to initialize audio codecs!n");
return -1;
if (!al_reserve_samples(1))
fprintf(stderr, "failed to reserve samples!n");
return -1;
*/
if(!al_init_primitives_addon())
fprintf(stderr, "failed to create primitives addon");
return -1;
al_register_event_source(event_queue, al_get_display_event_source(display));
// register timer event for max fps
al_register_event_source(event_queue, al_get_timer_event_source(timer));
//al_register_event_source(event_queue, al_get_keyboard_event_source());
al_clear_to_color(al_map_rgb(0,0,0));
al_flip_display();
al_start_timer(timer);
return 1;
c windows allegro5
I've been trying to work with Allegro version 5.2, but for some reason I cannot get it to compile on my System (running Windows 10 64 bit) using MinGW.
My Linker Settings
here's what I'm trying to link. According to the wiki this should be right, but whenever I try to compile sample code I get errors such as
srcgame.c|13|undefined reference to `al_clear_to_color'|
This function should be present for all I know.
I really appreciate any help :)
Here's an example of code that won't compile
#include"../include/init.h"
#include "allegro5/allegro5.h"
#include"allegro5/allegro_audio.h"
#include"allegro5/allegro_acodec.h"
#include<stdio.h>
#include<stdlib.h>
const float fps = 30;
const int width = 256;
const int height = 240;
int init()
running = 1;
if(!al_init())
fprintf(stderr, "failed to initialize allegro!n");
return -1;
timer = al_create_timer(1.0 / fps);
if(!timer)
fprintf(stderr, "failed to create timer!n");
return -1;
display = al_create_display(width, height);
if(!display)
fprintf(stderr, "failed to create display!n");
return -1;
event_queue = al_create_event_queue();
if(!event_queue)
fprintf(stderr, "failed to create event_queue!n");
return -1;
/*if(!al_install_audio())
fprintf(stderr, "failed to initialize audio!n");
return -1;
if(!al_install_keyboard())
fprintf(stderr, "failed to initialize the keyboard!n");
return -1;
if(!al_init_acodec_addon())
fprintf(stderr, "failed to initialize audio codecs!n");
return -1;
if (!al_reserve_samples(1))
fprintf(stderr, "failed to reserve samples!n");
return -1;
*/
if(!al_init_primitives_addon())
fprintf(stderr, "failed to create primitives addon");
return -1;
al_register_event_source(event_queue, al_get_display_event_source(display));
// register timer event for max fps
al_register_event_source(event_queue, al_get_timer_event_source(timer));
//al_register_event_source(event_queue, al_get_keyboard_event_source());
al_clear_to_color(al_map_rgb(0,0,0));
al_flip_display();
al_start_timer(timer);
return 1;
c windows allegro5
c windows allegro5
edited Jun 28 '16 at 21:16
unlink
asked Jun 28 '16 at 19:26
unlinkunlink
11
11
Well I dont really see why the code does not compile, you could try asking the devs directly on the allegro.cc forums. They usually like to help new users :)
– rlam12
Jul 3 '16 at 16:35
Seems like a good idea :) Thanks
– unlink
Jul 4 '16 at 17:30
add a comment |
Well I dont really see why the code does not compile, you could try asking the devs directly on the allegro.cc forums. They usually like to help new users :)
– rlam12
Jul 3 '16 at 16:35
Seems like a good idea :) Thanks
– unlink
Jul 4 '16 at 17:30
Well I dont really see why the code does not compile, you could try asking the devs directly on the allegro.cc forums. They usually like to help new users :)
– rlam12
Jul 3 '16 at 16:35
Well I dont really see why the code does not compile, you could try asking the devs directly on the allegro.cc forums. They usually like to help new users :)
– rlam12
Jul 3 '16 at 16:35
Seems like a good idea :) Thanks
– unlink
Jul 4 '16 at 17:30
Seems like a good idea :) Thanks
– unlink
Jul 4 '16 at 17:30
add a comment |
3 Answers
3
active
oldest
votes
Are using al_map_rgb_f()
function to mapping the color, like this: al_clear_to_color(al_map_rgb(255, 255, 255));
?
Can you insert your code here?
Sorry, it shouldn't be an answer, for while I don't have a reputation to comment it.
Yes I am, I added a code example as an edit in the main question.
– unlink
Jun 28 '16 at 21:09
add a comment |
I can see in your linker settings that you both link the monolith version and all modules separately. The monolith version is all other modules combined into one, making you only not need all the other allegro_* libraries. Maybe there's a conflict there? Other than that, check the log and check if the issue is both with Debug and Release.
This might be better as a comment
– mhatch
Nov 1 '16 at 14:53
add a comment |
Your linker settings are all messed up. You're mixing both dynamic and static libraries, as well as monolithic and non-monolithic libraries.
Libraries ending in .dll.a are import archives. Libraries ending in just .a are static library archives. When you link to the dynamic allegro monolith, you do not need to link to anything else.
When you link to the static allegro libraries, you must link their dependencies as well.
As an aside, I generally don't recommend using the 'link libraries' pane in the Code Blocks project linker settings. Set the linker include directores and the linker options instead. It allows you to change your link directory at will without changing any library link options. That way, you can upgrade your allegro and other libraries at will. Otherwise you have to remove and re-add all the link libraries.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f38084700%2fallegro-5-2-compilation-errors%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
Are using al_map_rgb_f()
function to mapping the color, like this: al_clear_to_color(al_map_rgb(255, 255, 255));
?
Can you insert your code here?
Sorry, it shouldn't be an answer, for while I don't have a reputation to comment it.
Yes I am, I added a code example as an edit in the main question.
– unlink
Jun 28 '16 at 21:09
add a comment |
Are using al_map_rgb_f()
function to mapping the color, like this: al_clear_to_color(al_map_rgb(255, 255, 255));
?
Can you insert your code here?
Sorry, it shouldn't be an answer, for while I don't have a reputation to comment it.
Yes I am, I added a code example as an edit in the main question.
– unlink
Jun 28 '16 at 21:09
add a comment |
Are using al_map_rgb_f()
function to mapping the color, like this: al_clear_to_color(al_map_rgb(255, 255, 255));
?
Can you insert your code here?
Sorry, it shouldn't be an answer, for while I don't have a reputation to comment it.
Are using al_map_rgb_f()
function to mapping the color, like this: al_clear_to_color(al_map_rgb(255, 255, 255));
?
Can you insert your code here?
Sorry, it shouldn't be an answer, for while I don't have a reputation to comment it.
answered Jun 28 '16 at 20:13
AipiAipi
3551919
3551919
Yes I am, I added a code example as an edit in the main question.
– unlink
Jun 28 '16 at 21:09
add a comment |
Yes I am, I added a code example as an edit in the main question.
– unlink
Jun 28 '16 at 21:09
Yes I am, I added a code example as an edit in the main question.
– unlink
Jun 28 '16 at 21:09
Yes I am, I added a code example as an edit in the main question.
– unlink
Jun 28 '16 at 21:09
add a comment |
I can see in your linker settings that you both link the monolith version and all modules separately. The monolith version is all other modules combined into one, making you only not need all the other allegro_* libraries. Maybe there's a conflict there? Other than that, check the log and check if the issue is both with Debug and Release.
This might be better as a comment
– mhatch
Nov 1 '16 at 14:53
add a comment |
I can see in your linker settings that you both link the monolith version and all modules separately. The monolith version is all other modules combined into one, making you only not need all the other allegro_* libraries. Maybe there's a conflict there? Other than that, check the log and check if the issue is both with Debug and Release.
This might be better as a comment
– mhatch
Nov 1 '16 at 14:53
add a comment |
I can see in your linker settings that you both link the monolith version and all modules separately. The monolith version is all other modules combined into one, making you only not need all the other allegro_* libraries. Maybe there's a conflict there? Other than that, check the log and check if the issue is both with Debug and Release.
I can see in your linker settings that you both link the monolith version and all modules separately. The monolith version is all other modules combined into one, making you only not need all the other allegro_* libraries. Maybe there's a conflict there? Other than that, check the log and check if the issue is both with Debug and Release.
answered Nov 1 '16 at 14:19
KraxieKraxie
614
614
This might be better as a comment
– mhatch
Nov 1 '16 at 14:53
add a comment |
This might be better as a comment
– mhatch
Nov 1 '16 at 14:53
This might be better as a comment
– mhatch
Nov 1 '16 at 14:53
This might be better as a comment
– mhatch
Nov 1 '16 at 14:53
add a comment |
Your linker settings are all messed up. You're mixing both dynamic and static libraries, as well as monolithic and non-monolithic libraries.
Libraries ending in .dll.a are import archives. Libraries ending in just .a are static library archives. When you link to the dynamic allegro monolith, you do not need to link to anything else.
When you link to the static allegro libraries, you must link their dependencies as well.
As an aside, I generally don't recommend using the 'link libraries' pane in the Code Blocks project linker settings. Set the linker include directores and the linker options instead. It allows you to change your link directory at will without changing any library link options. That way, you can upgrade your allegro and other libraries at will. Otherwise you have to remove and re-add all the link libraries.
add a comment |
Your linker settings are all messed up. You're mixing both dynamic and static libraries, as well as monolithic and non-monolithic libraries.
Libraries ending in .dll.a are import archives. Libraries ending in just .a are static library archives. When you link to the dynamic allegro monolith, you do not need to link to anything else.
When you link to the static allegro libraries, you must link their dependencies as well.
As an aside, I generally don't recommend using the 'link libraries' pane in the Code Blocks project linker settings. Set the linker include directores and the linker options instead. It allows you to change your link directory at will without changing any library link options. That way, you can upgrade your allegro and other libraries at will. Otherwise you have to remove and re-add all the link libraries.
add a comment |
Your linker settings are all messed up. You're mixing both dynamic and static libraries, as well as monolithic and non-monolithic libraries.
Libraries ending in .dll.a are import archives. Libraries ending in just .a are static library archives. When you link to the dynamic allegro monolith, you do not need to link to anything else.
When you link to the static allegro libraries, you must link their dependencies as well.
As an aside, I generally don't recommend using the 'link libraries' pane in the Code Blocks project linker settings. Set the linker include directores and the linker options instead. It allows you to change your link directory at will without changing any library link options. That way, you can upgrade your allegro and other libraries at will. Otherwise you have to remove and re-add all the link libraries.
Your linker settings are all messed up. You're mixing both dynamic and static libraries, as well as monolithic and non-monolithic libraries.
Libraries ending in .dll.a are import archives. Libraries ending in just .a are static library archives. When you link to the dynamic allegro monolith, you do not need to link to anything else.
When you link to the static allegro libraries, you must link their dependencies as well.
As an aside, I generally don't recommend using the 'link libraries' pane in the Code Blocks project linker settings. Set the linker include directores and the linker options instead. It allows you to change your link directory at will without changing any library link options. That way, you can upgrade your allegro and other libraries at will. Otherwise you have to remove and re-add all the link libraries.
answered Mar 22 at 16:30
BugSquasherBugSquasher
1026
1026
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f38084700%2fallegro-5-2-compilation-errors%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Well I dont really see why the code does not compile, you could try asking the devs directly on the allegro.cc forums. They usually like to help new users :)
– rlam12
Jul 3 '16 at 16:35
Seems like a good idea :) Thanks
– unlink
Jul 4 '16 at 17:30