Compiling Allegro 4.2 For MinGW/CodeBlocks - c++

I'm having trouble getting Allegro to Compile. When I begin the fix.bat mingw, it gives me an output which says:
Configuring for Windows/Allegro...Stop!
Yet, when I try to compile the rest by typing mingw32-make.exe, the following is output:
makefile.all:248: ***recipe commences before first target. Stop.
I've been spending a good hour trying to get this to compile, and there I haven't been able to find much on the net in terms of troubleshooting specifically for MinGW.
Everything I've done has been from here, though nothing past the point of compilation.
If anyone would like a log file of some sort, please let me know how I can provide that and I will as soon as possible.

First, there's no reason to use Allegro 4.2 as it is past end of life. If you want to use the 4 series, you should be using the 4.4 branch.
http://www.allegro.cc/files/?v=4.4
It's possible that the Makefile on it will just work, but you may also need to update your copy of MinGW in case the version you have is buggy.
Also, there's not much use in compiling Allegro yourself unless you are planning on working on the library itself. The link above has binary downloads that include everything you need to use the library.

Related

How to get wxWidgets working in Visual Studio 2012

I've got a problem for which I would very much like a solution please:
All I'm trying to do is use wxWidgets in Visual Studio 2012 (in C++), and make it accessible to my code project. That shouldn't be so hard, should it? But as usual, even though there are programming tutorials for it, wxWidgets is evidently one of those things that has no proper documentation just to simply get it running, or if it does then I sure can't find it.
I downloaded the installer for Windows and installed it. When it finished, it gave me a message that said:
wxWidgets was installed successfully!
Please note: before using wxWidgets in your application,
you must build the library using the same compiler you
use for building your program.
Please see docs/msw/install.md file in the installation
directory for the detailed instructions about how to build
wxWidgets and use it from your application.
It should be noted that I think I remember something on the website or somewhere saying that I can just include a header file into my project and forego the DLL altogether (which is what I'd prefer to do, if possible), though I may possibly be misremembering that or confusing it with something else.
Anyway, when I opened the docs/msw/install.md file, I found (amongst other things) these instructions:
--- From the IDE
Ready to use project files are provided for VC++ versions 8, 9,
10, 11, 12, 14, 15, 16 and 17 (also known as MSVS 2005, 2008, 2010, 2012,
2013, 2015, 2017, 2019 and 2022 respectively).
Simply open wx_vcN.sln (for N=8, 9, 10, 11, 12, 14, 15, 16 or 17) file,
select the appropriate configuration (Debug or Release, static or DLL)
and build the solution. Notice that when building a DLL configuration,
you may need to perform the build several times because the projects
are not always built in the correct order, and this may result in link
errors. Simply do the build again, up to 3 times, to fix this.
Of course, it doesn't even say WHERE the "wx_vcN.sln" files are, but I ran a file search and found them in C:\wxWidgets-3.1.6\build\msw and I opened the one called wx_vc11.sln, because that seems to be the one that corresponds to VS2012, right?
Anyway, it took a LONG time to load, because it had to keep scanning through thousands of files and so forth, but when it was finally finished, I did the "Rebuild All" command thrice in a row, like it says to do (which also took a while).
But I'm not sure where it even put the actual DLL file. It says that it's in C:\wxWidgets-3.1.6\build\msw....\lib\vc_lib\wxmsw31ud_xrc.lib, but where the hell is "...."? It doesn't even bother to specify the entire path! What kind of nonsense is that?! I just want the file so that I can put it into my project! Or better yet, just a .h file that takes care of everything would be great. Supposedly there's one to include called "wx/wx.h", which then includes everything else, I think, but I don't know if that one indirectly also requires a DLL.
I always have problems with DLLs, anyway, though I'll use one if I absolutely have to. You'd think it would be the easiest thing to import a DLL into a project, but for some reason, I've never been able to find any sort of tutorial that explains a specific, step-by-step way to do it which is guaranteed to work, so on the rare occasion that I actually need to use a DLL (99% of the time I can just rely on my own code and the .h files included with Visual Studio), I always end up muddling through it until it FINALLY works by sheer accident (if I'm lucky). Mostly, it just reports errors for one reason or another, that it's not properly included or compatible, or that the header files that I'm using which reference it keep showing the same errors, as though I hadn't even imported the DLL file at all! I've been programming for about 30 years, and I work on things like AI and compression and cryptographic algorithms. I don't say this to brag, but to point out that if someone as experienced as me has trouble getting a DLL to attach properly to a roject, then there's something severely wrong with the whole process, or the documentation for it! I HATE using DLLS, because it's always a HUGE chore, but I'll do it if there's absolutely no other way (though I'd appreciate step-by-step instructions, if you don't mind).
But enough about that. In any case, I have an example project in which wxWidgets is being used in conjunction with Vulkan, and though it has compilation errors (because Vulkan didn't properly install on my machine (when I try to run the sample programs it says they're missing DLLs - big surprise) and as it turns out, I don't think it's compatible with my video card, anyway (which might possibly be why it didn't install properly), so I think I'll have to resort to OpenGL instead - PLEASE tell me that's compatible with wxWidgets!), but even in that example project, it has errors where it's trying to include and use wxWidgets stuff (like "wx/wx.h"), even though that's supposed to be a complete and already working project! I can't find any DLL files or the header files in question anywhere in the project directories!
So anyway, there's got to be an easier way to get this all set up, just to the point that I can make a simple test program using wxWidgets, and compile it. I'd REALLY like to be able to get at least that much working sometime tomorrow morning, so I'd greatly appreciate any help you can give me! Thank you.
#ThisIsMe,
First of all you need to educate yourself on properly using C++.
When you acquire the C++ code it contains of 2 portion - header file and source code.
Header file is what you call a declaration you declare you classes there - class name, member variable and method.
In the source files You define what you declared and you put an actual code there.
Now with that in mind:
wxWidgets contains both header and source files. When you downloaded the installer and did the installation it just copied the "text file" (headers and sources) into the folder of you choice.
Now as you can imagine text files are not executable - you need to compile them into the binary files And that is exactly what you did. (I don't know why you did it 3 times though - I guess you got an errors after building 1st and 2nd time).
Now, you said you have a project that (either uses wxWidgets or you want to incorporate wxWidgets into - which one is it, BTW?). The answer to this question will help direct you to a proper solution.
Now, you said that you tried the Vulkan and it fails to run the demo. How did it fails? Did it produce an error? What was it? Did it even run?
Now wxWidgets does support OpenGL as can be seen by looking at the documentation and checking the different samples that comes with the library, but I'm just curious if what you are seeing from Vulkan is really an incompatibility with the Video Card.
So, we need you to answer the questions I put and so we can help you further. Just keep in mind - C++ is not for the beginner programmers and if you are struggling with understanding the difference between compilation, installation , headers and sources - it will be very hard for you.
Maybe you should start with something simpler - like wxPython and forget about C++ for now.

OpenAL32.dll missing error

I have downloaded gorilla-audio source code to use it in my software, but when I use the external library from OpenAL (in gorilla-audio, the OpenAL32.lib) the project compiles with no errors or anything, but it doesn't run normally, I still haven't implemented anything from gorilla sound, just wanted to check that after adding the library it would still work the same before editing anything, but it just doesn't, I have linked everything and used the correct version of .lib but when I run the project it says:
The program can't start because OpenAL32.dll is missing from your
computer. Try reinstalling the program to fix this problem.
What should I do, I've googled that but I'm just scared to download random things, plus I don't even know where should I put it.
Any help guys,
Thanks ^_^

Qt is remembering previous versions of my code

What am I doing wrong?
1. I write some code in Qt Creator, it works.
2. I save all, copy the folder with all the files in it to another location for safekeeping.
3. Then I write more code. This additional code doesn't work and I've gone too far to undo it.
4. So I close Qt, delete that folder, move the earlier one back to where it was originally, and load the older version.
But Qt still gives me the same errors that the newer code gave me, and won't run. It seems to remember this newer (bad) code even though it no longer appears anywhere in Qt - and the problem persists over computer reboot. I feel I'm missing something very obvious, but Mr Google can't help at all.
Try Build->Rebuild all. Your IDE is probably caching some of the previous results for performance reasons. I had the problem once using Qt Creator, and it solved it for me.
Delete the build folder. All that the build system knows about is the built files being newer than your now even older sources*. So a build won't succeed since plenty of intermediate files are wrong.
By the way, you really should be using version control, not moving folder around. I suggest git via smartgit, but that's just my personal preference. It's effortless.
* A build system could remember the absolute timestamps of the source used in the build and rebuild if they change, not only if the sources are newer than the results.

run-time error "boost_log-vc100-mt-1_49.dll"

this may sound like a silly question, but it would be really useful if there was a way around this.
I am writing a c++ code using microsoft visual which uses eigen, matlab, and ilog cplex libraries. It can be build without problem but there is a run time error as follow:
[Translated]
impossible to start the program because it lacks "boost_log-vc100-mt-1_49.dll".
Try reinstalling the programe for courriger this problem.
6 months ago I tried to use boost library but I gave up. After I deleted all dependencies to boost and I used Eigen without any problem. Even I can not run previous versions of my code now! Maybe I deleted a file some where?
Moreover, I tried my code on another machine and the error is the same. So, it looks it's not a system error.
I appreciate any advice you may have.
Thank you.
It's solved!
Matlab has some boost libraries and the link between MSV and matlab was not working though it was mentioned in linker. I copied those dll files to the current folder and now it is working.

Setting up a working D2.x toolchain (with gtkd) on Ubuntu 10.04

I've been playing around with D for a few days and was getting quite excited about it until, that is, I tried to get gtkd working. I've now wasted the best part of 3 days trying to get a working setup and am beginning to get (read; long ago got) a bit demoralised. I was wondering if anyone can help before I give up. A lot of the information I can find online is outdated so I'm not sure if I'm even right in thinking this is even possible.
The rest of this is just about what I've tried so far and you may not need to read it if you have a quick solution, so feel free to jump to ... [Jump to here]
So, firstly I need to know, is tango actually available for use with D2.0, I believe that it wasn't originally but now D2.x is such that you can use tango and phobos alongside each other. If this isn't true, then I guess I've fallen at the first hurdle and this is a non-starter.
The steps I've taken so far.
I installed gdc from the ubuntu repositories
I installed libtango-headers from the repos (note, headers only, no libs available, so that's not much help)
I manually installed dsss
This setup would compile D but when I came to installing gtkd (with dsss), it compiled but I got all sorts of errors (relating to tango) when trying to compile anything using it. Well, as I've mention I didn't have the libs so this shouldn't have been unexpected. I tried to install the tango libs manually but still got loads of errors and in the end resorted to a dsss net install tango which warned me that I wouldn't be able to go back to phobos (something which confused me as as I have mentioned I thought the two could be used alongside each other) anyway, I proceeded and it completely screwed my setup. I couldn't compile any D now.
Sorry I couldn't be more explicit about what errors I got in that last section, I honestly don't remember.
Anyway, I removed everything I had installed. And started afresh.
I installed gdc from repos
I installed dsss manually
I now read that the latest tango doesn't work with gdc (not sure if this is true) so I
Got the deb for dmd and installed that.
Installed the latested tango (libs and headers) manually.
Installed gtkd with dsss
Now I can't get dsss to recognize dmd, so can only use gdc with it. That however doesn't find tango. If I use dmd directly it finds tango and gtkd but I get errors about volatile statements being deprecated. Something which is apparently true in D2.x, which brings me back to "is tango even supported".
Gosh I'm confused!
[Jump to here]
If anyone can give me step by step instructions on how to get a working setup set up, I'd be forever grateful!
Thanks, T.
Update: "We're there!"
So I downloaded dmd.2.049.zip from http://www.digitalmars.com/d/download.html and extracted to my home directory and did a export PATH = $PATH:~/dmd2/linux/bin (thanks to dsimcha).
Forgot about dsss. Got the svn version of gtkd as per the instructions at http://www.dsource.org/projects/gtkd/wiki/UsingSubversion. Edited GNUmakefile to change the prefix to /home/me/dmd2/linux and did a make install.
Edited ~/dmd2/linux/bin/dmd.conf so the include paths included ../include (the gtkD libs are put in ../lib so I didn't need to edited the library paths).
Now finally to compile with gtkD I needed to link against libgtkd and libdl, this was done by, dmd mydprog.d -L-lgtkd -L-ldl(thanks to jpf).
Tango does not work with D2. There was some effort a long time ago towards porting it, but this kind of hit a wall and it's unclear whether this is ever actually going to be finished. OTOH Phobos for D2 is much better than Phobos for D1, so lack of Tango is not as bad as it sounds.
GDC supports an ancient version of D2. There's absolutely no chance of gtkD compiling with it. You should use the reference DMD compiler.
Generally the proper way to set up DMD on Linux is to simply unzip dmd.2.0xx.zip into your home directory and do an export PATH = $PATH:~/dmd2/linux/bin to make sure the DMD executable is in your path. Then everything should work (with DMD2 and Phobos).
If you want dmd to pass arguments to the linker you have to prefix them with -L.
I think for gtkd you need to link to the gtkd library and libdl.
-L-lgtkd -L-ldl