Closed caoimhinp closed 7 years ago
Got the same problem. Were you able to fix or circumvent it?
Nope. I was hoping that the author was going to address it. Instead, I'm just going to add this to my review on Amazon.
Don't, read the README. At the very bottom it instructs you under "Usage". You have to copy arial.ttf and game.map into the bin directory. Worked for me.
As far as compilation is concerned, I haven't setup Visual Studio as described in the README yet, thus I can't tell if the instructions will work.
Why not make that part of the build if it's necessary? I'll try it later and update my post if it works for me.
On Sat, Feb 18, 2017 at 5:30 PM, Oriato notifications@github.com wrote:
Don't, read the README. At the very bottom it instructs you under "Usage". You have to copy arial.ttf and game.map into the bin directory. Worked for me.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/GameHackingBook/GameHackingCode/issues/5#issuecomment-280883140, or mute the thread https://github.com/notifications/unsubscribe-auth/AB-qoT2-wT0CziJLSHN02GPbtSyb8OYHks5rd38mgaJpZM4Lqocj .
@caoimhinp I'll refer you to README.md. Specifically, these lines:
All of the example code should compile out-of-the-box on Visual Studio 2010, and any newer version. The exception is the two practice binaries for Chapter 1, which rely on the Allegro 5.0.10 library to be installed with the bin, lib, and include directories properly set up in your Visual Studio paths for additional include directories and additional linker directories.
If you can't compile yourself, all of the binaries are in the /bin/ directory. Debug binaries are in the /bin/DEBUG_BUILDS/ directory with included debug databases.
There is no need to compile the first 3 chapters, as you can complete the labs on the compiled binaries. Other than that, it seems like you have the remaining projects compiling, which is good, as being able to poke that code and see what happens is an intended part of the experience.
I'm sorry that this wasn't more clear, I'll make it more explicit in the readme.
The point is that the binaries don't work by themselves. Which is why I wrote:
Chapter 1 programs result in "error failed to initialize map!" Chapter 2 and 3 programs result in "error failed to initialize font!"
Running the debug versions show "missing MSVCR100d.dll" for both errors; as expected.
By "program," I mean the binaries. That being the only reason I tried to compile them. But I haven't had time to try any additional instructions for compiling it.
I have to say I find it a bit less than appealing that this topic got immediate attention when I authored a negative review but got no attention for 27 days previous.
On Mon, Feb 20, 2017 at 1:06 AM, Nick Cano notifications@github.com wrote:
Closed #5 https://github.com/GameHackingBook/GameHackingCode/issues/5.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/GameHackingBook/GameHackingCode/issues/5#event-968728028, or mute the thread https://github.com/notifications/unsubscribe-auth/AB-qod0ETp8al_MDsdRJ-3sElJzg0xAPks5reTtkgaJpZM4Lqocj .
No it's not based on your review, I contacted No Starch, so they inform the author.
Had no clue you gave a bad review, but I hope introspection will cause you to realize this is your fault.
Because, if you read the README, which has been there since day 1, which I've asked you to read, you'd find all of your problems solved.
I cannot help you if you refuse to listen.
You are still apparently not reading my actual error. If you did you'd see that the binaries cause the errors as stated. And I tried having Allegro installed as stated. And I have VS installed so I don't need the redistributable. So what exactly am I missing out of the readme?
Thanks for just being rude to a customer. I'll update my post accordingly.
On Mon, Feb 20, 2017 at 11:48 AM, Nick Cano notifications@github.com wrote:
Had no clue you gave a bad review, but I hope introspection will cause you to realize this is your fault.
Because, if you read the README which has been there since day 1, which I've asked you to read, you'd find all of your problems solved.
I cannot help you if you refuse to listen.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/GameHackingBook/GameHackingCode/issues/5#issuecomment-281142687, or mute the thread https://github.com/notifications/unsubscribe-auth/AB-qoSGEVWPHXDJQJ5w5XyySPKaZnOO3ks5redH1gaJpZM4Lqocj .
The errors you've posted are all covered in the README, so I'm confused as to what more you want?
You can skip compilation and just use the binaries if you do what the readme tells you to do. The only error I see that's not explicity covered in the README is:
Running the debug versions show "missing MSVCR100d.dll" for both errors; as expected.
However, just because the error isn't mentioned explicitly, doesn't mean it's not covered. The README clearly states the redistributable package needs to be installed in order to run the code. The redistributable won't install the debug libraries, but you should be able to run the release binaries perfectly fine. Feel free to correct me if I'm wrong, but I've tested on multiple clean machines before releasing, and, given the steps in the README and using the release builds, there are no issues.
So, excuse me for coming off as rude, but I fail to see how your problems are anything short of you failing to read the README.
As for the Allegro issues, you're either linking against the wrong version, or you're linking against a build that wasn't compiled by the same compiler that you're compiling with. Making sure readers understand the niceties of compiling and linking against libraries in C++ in general is completely outside of the scope of my responsibilities here. I understand that C++ is confusing and that its linking process isn't the most user-friendly. To remedy that, I've done two things. First off, I've provided everything pre-compiled so you can avoid this all-together if you'd simply be content with using the pre-compiled binaries. Secondly, I've made sure to state in the book that C++ familiarity should be a pre-requisite.
There's no polite way to tell a sensitive person this, but it's the truth: you're going beyond the boundary of your abilities and blaming me when you fail; even though I've provided you with everything you need to be successful within your boundaries.
One point that I'll happily concede is that I was not clear that debug binaries will only work if the user has the debug redistributable installed. I'll update the README to reflect that.
If I'm objectively wrong anywhere in the post, I would be happy to apologize and correct myself. All I need from you is detailed information that goes beyond what is clearly covered in the book and README, and, other than the one small thing mentioned above, you haven't to my knowledge provided that.
Ok... I'll be fair. I was not reading to the end.
I did not move the game.map
I'm perfectly ok with admitting when I cut it short. I'm also ok with admitting when I get tilted because someone is being rude. It would have been better to just state that the last line says to move the game.map. It would have been even better to respond a month ago. So, yes, I was tilted.
But the issue was resolved and my main issue with the book was resolved so I'll change my review accordingly.
I might also suggest just distributing the binaries with the files in the proper directory as they won't cause a problem being there if not needed and they do cause a problem if they are.
But I was wrong in thinking I had addressed all of the README.
As I've been telling you, the README tells you how to fix this error.
Are you purposely messing with me? I cannot understand how you wouldn't be.
I'm glad we could resolve this issue.
I'm sorry if anything I said was interpreted as rude, I'm just a bit direct and I can go overboard at times.
I've left the files out because it causes duplication, but I think you're right in that I should move them into both places, so I'll do that when I have the chance.
I have problems with people that spend 2 pages of text telling people to RTFM when they could just answer the question in one line.
But I also admit when I miss something. I hadn't had the time to actually check my set up until today. And when I did and found that the files weren't in place I corrected myself.
I know a lot of our demographic (techs) is very blunt. No worries in that regard. I've just lived the RTFM meme for decades and find it less than useful.
On Mon, Feb 20, 2017 at 6:32 PM, Nick Cano notifications@github.com wrote:
I'm glad we could resolve this issue.
I'm sorry if anything I said was interpreted as rude, I'm just a bit direct and I can go overboard at times.
I've left the files out because it causes duplication, but I think you're right in that I should move them into both places, so I'll do that when I have the change.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/GameHackingBook/GameHackingCode/issues/5#issuecomment-281212829, or mute the thread https://github.com/notifications/unsubscribe-auth/AB-qoRzQ2E6LVgZ3Wl9AQ_H5VWrjQIXEks5rejCxgaJpZM4Lqocj .
Chapter 1 programs result in "error failed to initialize map!" Chapter 2 and 3 programs result in "error failed to initialize font!"
Running the debug versions show "missing MSVCR100d.dll" for both errors; as expected.
Using the binaries for Allegro, I get the following errors when compiling:
C:\Users\user\Desktop\GameHackingCode\Chapter1_BasicMemory>g++ game-BasicMem .cpp -o gamebasic.exe -IC:\MinGW\include game-BasicMem.cpp: In function 'int main()': game-BasicMem.cpp:95:16: warning: deprecated conversion from string constant to 'char' [-Wwrite-strings] game-BasicMem.cpp:108:12: warning: deprecated conversion from string constant to 'char' [-Wwrite-strings] game-BasicMem.cpp:119:12: warning: deprecated conversion from string constant to 'char' [-Wwrite-strings] game-BasicMem.cpp:124:12: warning: deprecated conversion from string constant to 'char' [-Wwrite-strings] game-BasicMem.cpp:130:12: warning: deprecated conversion from string constant to 'char' [-Wwrite-strings] game-BasicMem.cpp:135:12: warning: deprecated conversion from string constant to 'char' [-Wwrite-strings] game-BasicMem.cpp:140:12: warning: deprecated conversion from string constant to 'char' [-Wwrite-strings] game-BasicMem.cpp:145:12: warning: deprecated conversion from string constant to 'char' [-Wwrite-strings] game-BasicMem.cpp:150:12: warning: deprecated conversion from string constant to 'char' [-Wwrite-strings] game-BasicMem.cpp:155:12: warning: deprecated conversion from string constant to 'char' [-Wwrite-strings] game-BasicMem.cpp:211:68: warning: passing NULL to non-pointer argument 6 of 'in t al_show_native_message_box(ALLEGRO_DISPLAY, const char, const char, const c har, const char*, int)' [-Wconversion-null] C:\Users\user\AppData\Local\Temp\ccN7M3iA.o:game-BasicMem.cpp:(.text+0x93): undefined reference to
al_map_rgb' C:\Users\user\AppData\Local\Temp\ccN7M3iA.o:game-BasicMem.cpp:(.text+0xfb): undefined reference to
al_draw_filled_rectangle' C:\Users\user\AppData\Local\Temp\ccN7M3iA.o:game-BasicMem.cpp:(.text+0x144): undefined reference toal_map_rgb' C:\Users\user\AppData\Local\Temp\ccN7M3iA.o:game-BasicMem.cpp:(.text+0x1ac): undefined reference to
al_draw_filled_rectangle' C:\Users\user\AppData\Local\Temp\ccN7M3iA.o:game-BasicMem.cpp:(.text+0x1f5): undefined reference toal_map_rgb' C:\Users\user\AppData\Local\Temp\ccN7M3iA.o:game-BasicMem.cpp:(.text+0x25d): undefined reference to
al_draw_filled_rectangle' C:\Users\user\AppData\Local\Temp\ccN7M3iA.o:game-BasicMem.cpp:(.text+0x2a6): undefined reference toal_map_rgb' C:\Users\user\AppData\Local\Temp\ccN7M3iA.o:game-BasicMem.cpp:(.text+0x30e): undefined reference to
al_draw_filled_rectangle' C:\Users\user\AppData\Local\Temp\ccN7M3iA.o:game-BasicMem.cpp:(.text+0x362): undefined reference toal_map_rgb' C:\Users\user\AppData\Local\Temp\ccN7M3iA.o:game-BasicMem.cpp:(.text+0x3d6): undefined reference to
al_draw_filled_rectangle' C:\Users\user\AppData\Local\Temp\ccN7M3iA.o:game-BasicMem.cpp:(.text+0x3f3): undefined reference toal_map_rgb' C:\Users\user\AppData\Local\Temp\ccN7M3iA.o:game-BasicMem.cpp:(.text+0x445): undefined reference to
al_draw_filled_circle' C:\Users\user\AppData\Local\Temp\ccN7M3iA.o:game-BasicMem.cpp:(.text+0x475): undefined reference toal_map_rgb' C:\Users\user\AppData\Local\Temp\ccN7M3iA.o:game-BasicMem.cpp:(.text+0x4b9): undefined reference to
al_draw_text' C:\Users\user\AppData\Local\Temp\ccN7M3iA.o:game-BasicMem.cpp:(.text+0x4d6): undefined reference toal_map_rgb' C:\Users\user\AppData\Local\Temp\ccN7M3iA.o:game-BasicMem.cpp:(.text+0x51a): undefined reference to
al_draw_text' C:\Users\user\AppData\Local\Temp\ccN7M3iA.o:game-BasicMem.cpp:(.text+0x8fd): undefined reference toal_install_system' C:\Users\user\AppData\Local\Temp\ccN7M3iA.o:game-BasicMem.cpp:(.text+0x923): undefined reference to
al_init_primitives_addon' C:\Users\user\AppData\Local\Temp\ccN7M3iA.o:game-BasicMem.cpp:(.text+0x949): undefined reference toal_init_font_addon' C:\Users\user\AppData\Local\Temp\ccN7M3iA.o:game-BasicMem.cpp:(.text+0x94e): undefined reference to
al_init_ttf_addon' C:\Users\user\AppData\Local\Temp\ccN7M3iA.o:game-BasicMem.cpp:(.text+0x974): undefined reference toal_install_keyboard' C:\Users\user\AppData\Local\Temp\ccN7M3iA.o:game-BasicMem.cpp:(.text+0x9ac): undefined reference to
al_load_ttf_font' C:\Users\user\AppData\Local\Temp\ccN7M3iA.o:game-BasicMem.cpp:(.text+0x9f4): undefined reference toal_create_timer' C:\Users\user\AppData\Local\Temp\ccN7M3iA.o:game-BasicMem.cpp:(.text+0xa33): undefined reference to
al_create_display' C:\Users\user\AppData\Local\Temp\ccN7M3iA.o:game-BasicMem.cpp:(.text+0xa68): undefined reference toal_create_event_queue' C:\Users\user\AppData\Local\Temp\ccN7M3iA.o:game-BasicMem.cpp:(.text+0xaa7): undefined reference to
al_get_display_event_source' C:\Users\user\AppData\Local\Temp\ccN7M3iA.o:game-BasicMem.cpp:(.text+0xab9): undefined reference toal_register_event_source' C:\Users\user\AppData\Local\Temp\ccN7M3iA.o:game-BasicMem.cpp:(.text+0xabe): undefined reference to
al_get_keyboard_event_source' C:\Users\user\AppData\Local\Temp\ccN7M3iA.o:game-BasicMem.cpp:(.text+0xad0): undefined reference toal_register_event_source' C:\Users\user\AppData\Local\Temp\ccN7M3iA.o:game-BasicMem.cpp:(.text+0xadf): undefined reference to
al_get_timer_event_source' C:\Users\user\AppData\Local\Temp\ccN7M3iA.o:game-BasicMem.cpp:(.text+0xaf1): undefined reference toal_register_event_source' C:\Users\user\AppData\Local\Temp\ccN7M3iA.o:game-BasicMem.cpp:(.text+0xb00): undefined reference to
al_start_timer' C:\Users\user\AppData\Local\Temp\ccN7M3iA.o:game-BasicMem.cpp:(.text+0xb1d): undefined reference toal_wait_for_event' C:\Users\user\AppData\Local\Temp\ccN7M3iA.o:game-BasicMem.cpp:(.text+0xbc2): undefined reference to
al_is_event_queue_empty' C:\Users\user\AppData\Local\Temp\ccN7M3iA.o:game-BasicMem.cpp:(.text+0xbea): undefined reference toal_map_rgb' C:\Users\user\AppData\Local\Temp\ccN7M3iA.o:game-BasicMem.cpp:(.text+0xc0c): undefined reference to
al_clear_to_color' C:\Users\user\AppData\Local\Temp\ccN7M3iA.o:game-BasicMem.cpp:(.text+0xc3f): undefined reference toal_map_rgb' C:\Users\user\AppData\Local\Temp\ccN7M3iA.o:game-BasicMem.cpp:(.text+0xc8c): undefined reference to
al_draw_text' C:\Users\user\AppData\Local\Temp\ccN7M3iA.o:game-BasicMem.cpp:(.text+0xc91): undefined reference toal_flip_display' C:\Users\user\AppData\Local\Temp\ccN7M3iA.o:game-BasicMem.cpp:(.text+0xcb3): undefined reference to
al_flip_display' C:\Users\user\AppData\Local\Temp\ccN7M3iA.o:game-BasicMem.cpp:(.text+0xd06): undefined reference toal_show_native_message_box' C:\Users\user\AppData\Local\Temp\ccN7M3iA.o:game-BasicMem.cpp:(.text+0xd23): undefined reference to
al_destroy_timer' C:\Users\user\AppData\Local\Temp\ccN7M3iA.o:game-BasicMem.cpp:(.text+0xd32): undefined reference toal_destroy_display' C:\Users\user\AppData\Local\Temp\ccN7M3iA.o:game-BasicMem.cpp:(.text+0xd41): undefined reference to
al_destroy_event_queue' collect2.exe: error: ld returned 1 exit status