Page 1 of 1

I'm at my wits end with this

Posted: Wed Jun 06, 2012 9:17 pm
by Aspirer
I know you can't really help me, I just want to vent, and maybe you could give some advice.

I've been trying to follow one of the tutorials in Lazyfoo's website, and I just can't get it right. The problem is extracting all the files, putting them in a good location, making sure everything's in the right spot. I know how to link the damn things for the most part. I won't even tell you how much of my day I've spent working on this. If they weren't in fricking .zip files, this would be 10x easier. I can open a .zip file, but an HD monitor, the way windows 7 displays the file types on screen, and the fact that navigating the hard drive is a bitch doesn't help anything. Seriously, at school they have windows 7 with just a few more simple features, like a freaking up level button, back button (like a web browser), and shit like that. Windows 7 home premium doesn't have that apparently. Who spends an extra hundred or so bucks on those kinds of features anyway? Copy pasting this shit is annoying as hell, and I can't be arsed to remember where everything came from and goes!

I am NOT a calm person. FUCK!

Re: I'm at my wits end with this

Posted: Thu Jun 07, 2012 8:55 am
by hurstshifter
My recommendation to you would be to download and install winrar or 7zip if you don't have one of those programs. Both are very powerful compression/extraction applications. With one installed, you should be able to right-click on the .zip file and tell it exactly where you want to extract the files to or simply tell it to extract to the current directory. Hope this helps.

Also, if you're missing certain navigation features in Windows 7 it is unlikely to be the version you are running, but rather that your layout options in Explorer are configured incorrectly. Open up an Explorer window (My Computer, or whichever) and click on the Organize button in the top left, find Layout, then make sure everything you need is checked.

Re: I'm at my wits end with this

Posted: Thu Jun 07, 2012 7:55 pm
by Aspirer
I'm sooo close to getting this to work, I can feel it! Right now I've found out what was wrong with all the files and stuff, but I really don't know what is wrong this time. It has something to do with TTF, but I've checked a few things and they're all there I think.

The errors:
1>------ Build started: Project: Redacted, Configuration: Debug Win32 ------
1> Redacted.cpp
1>Redacted.obj : warning LNK4248: unresolved typeref token (0100001B) for '_TTF_Font'; image may not run
1>Redacted.obj : error LNK2028: unresolved token (0A0002D2) "extern "C" struct SDL_Surface * __cdecl IMG_Load(char const *)" (?IMG_Load@@$$J0YAPAUSDL_Surface@@PBD@Z) referenced in function "struct SDL_Surface * __cdecl load_image(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?load_image@@$$FYAPAUSDL_Surface@@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>Redacted.obj : error LNK2019: unresolved external symbol "extern "C" struct SDL_Surface * __cdecl IMG_Load(char const *)" (?IMG_Load@@$$J0YAPAUSDL_Surface@@PBD@Z) referenced in function "struct SDL_Surface * __cdecl load_image(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?load_image@@$$FYAPAUSDL_Surface@@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>MSVCRT.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
1>C:\Users\Redacted\Documents\Visual Studio 2010\Projects\Redacted\Debug\Redacted.exe : fatal error LNK1120: 3 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Can someone help me, pretty please? :D

Re: I'm at my wits end with this

Posted: Fri Jun 08, 2012 12:56 pm
by bbguimaraes
I don't know about SDL, but when the compiler (or the linker, I should say) says it has an unresolved external, it usually means you are not linking all your object files and/or libraries you need.

Re: I'm at my wits end with this

Posted: Fri Jun 08, 2012 3:41 pm
by dandymcgee
bbguimaraes wrote:I don't know about SDL, but when the compiler (or the linker, I should say) says it has an unresolved external, it usually means you are not linking all your object files and/or libraries you need.
Yeah, you're linker configuration for SDL_ttf and SDL_Image are seemingly incorrectly. Double check those.

Re: I'm at my wits end with this

Posted: Fri Jun 08, 2012 6:25 pm
by Aspirer
Gah! That's what I've been having trouble with a lot! SDL_ttf and SDL_Image, I don't know where they go, and I thought I linked them... where do they go?

You can't just tell me I have such and such a problem, because I don't even understand this, let alone know how to fix it.

Re: I'm at my wits end with this

Posted: Fri Jun 08, 2012 8:36 pm
by bbguimaraes
Okay, I'll try to wirte in steps:
  • Download the source from the site.
  • Extract the file. It's a zip file, so I think recent versions of Windows can open and extract them. If I remember correctly, you can open a zip file like you open a folder on Windows Explorer and click and drag the files to any place.
  • The file readme.txt lists the libraries you are going to need to install. You just have to download the files and tell your compiler where to find them. Usually there is a common directory for library files.
  • Compile the code, linking to the libraries. This page shows how to set the libraries to link. If you forget to link to some library, you will get unresolved externals when you try to compile.
  • Finally, next time try to be nicer with the people you ask for help.

Re: I'm at my wits end with this

Posted: Fri Jun 08, 2012 11:39 pm
by Aspirer
Ok I will try that. And sorry about the attitude, a lot of the time I come off as callous when chatting in text, I don't know why, I really don't mean to 85% of the time. I like to say things which sound "awesome", which is what that last statement was, which probably sounded pretty callous, huh? I rarely proofread too...

EDIT: SUCCESS!

Re: I'm at my wits end with this

Posted: Sat Jun 09, 2012 10:23 am
by dandymcgee
Aspirer wrote:Ok I will try that. And sorry about the attitude, a lot of the time I come off as callous when chatting in text, I don't know why, I really don't mean to 85% of the time. I like to say things which sound "awesome", which is what that last statement was, which probably sounded pretty callous, huh? I rarely proofread too...

EDIT: SUCCESS!
Grats, you've conquered perhaps one of the most frustrating aspects of learning programming. Now to learn what 0xCCCCCCCC, 0xCDCDCDCD, and 0xDDDDDDDD mean. :lol: