Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Ugh, I suck at compiling....

Name: Anonymous 2011-04-28 20:32

I don't know what it was, but despite all my years in computer science I never was very good at taking other people's code and compiling it myself.  I mean, I'm fine at coding once shit gets set up, but I'm piss at setting things up.

Currently, I'm trying to compile NXengine, the cave story engine simulator.  http://nxengine.sourceforge.net/

I decided to use Code::Blocks as my IDE, since it seemed like the least amount of setting up required.

So, this is pretty much how my day went:

-eventually figure out how to import all the files recursively into a new, empty project.

-forgot to install SDL, and SDL_TTF, copy those files into the bin, lib, and include dirs.

-try building, eventually figure out a few niggling errors with code placement, fix them.

-the website made it sound like that SIFEdit sprite-properties editor was optional, tried removing it to no avail, eventually tried to install the wxWidget thing (although, I think I dit it wrong...   this is probably where I messed up.)

-have no idea why it won't compile.  eventually add "apt-get install libsdl1.2 libsdl1.3-dev libsdl-ttf2.0" into the linker because it was on a site, not really sure what it's for.

-things seem to compile, but running it fails because it's looking for libsdl1.2 and libsdl1.3-dev.

-when i take those out and try to build it again, it freaks out, with weird errors about stdio and things being declared twice?


Yeah, basically any help someone could provide would be helpful.  If you want, I could 7z up my whole shebang and throw it up on megaupload or something if someone wanted to look at what was wrong.  Thanks for your help.

Name: Anonymous 2011-04-28 20:36

COMPILE MY ANUS

Name: Anonymous 2011-04-28 20:40

Oh Mr.Troll, I can't help but lol anyway.

Name: Anonymous 2011-04-28 21:05

You're going to have to provide full error messages if you want any actual help. You should also post the exact compiler flags you're compiling with.

I can tell you that I think you might be taking the wrong approach though. I don't know anything about Code::Blocks but if it's an IDE, doesn't it have its own project file format? You should just use the included Makefile. All I had to do to get it to build on my machine was type make and it built completely.

When you want to start hacking on it, just use a text editor for now. Don't go on a Yak Shaving expedition with IDEs and stuff. You can worry about that later.

Name: Anonymous 2011-04-28 21:10

That said I did a quick search and possibly doing this might help. Try using just make at the command line first though.

http://wiki.codeblocks.org/index.php?title=FAQ#Q:_My_project_should_be_compiled_with_a_custom_makefile._Is_it_possible_with_Code::Blocks.3F

Name: Anonymous 2011-04-28 21:28

Thanks for the help - when I try that, it tells me "Using makefile: Makefile
Execution of 'make.exe -s -f Makefile Debug' in 'C:\Documents and Settings\Aaron and Nat\Desktop\CodeBlocks\Projects\Cave Story' failed.
Nothing to be done."

Name: Anonymous 2011-04-28 21:41

Hey Aaron or Nat,

Oh. You're using Windows? I assumed from your skimming your post you were using Linux from the apt-get stuff. apt-get is a package manager for Debian. You can't use it on Windows. Remove that stuff from the linker. You probably want to do something to do with this: http://wiki.codeblocks.org/index.php?title=Using_SDL_with_Code::Blocks

The reason you have a hard time getting set up is probably because you're using Windows and you're trying to set up with stuff developed on Linux. Not that that isn't possible for something cross platform like this, but it's certainly more difficult since you have to use a ported toolchain like mingw.

So on Windows Code:Blocks is probably the right choice since it packages the whole toolchain for you.

I'm not sure where exactly the options are in Code:Blocks, (This is why you should use the command line when you start out. Better for control. Better for understanding what's actually going on.) but you might want to turn off that -s flag since that's stopping potentially valuable output. The main thing though is the target should be 'all' not 'Debug'. Again, don't know anything about Code:Blocks so you'll have to figure out how to change the target.

If you're still having trouble or this seems like a lot of hassle, that's because it is, because you're not using Microsoft's native development stuff so it's a bit more painful. It may be worthwhile considering installing Ubuntu possibly using something like wubi and trying to compile it under there.

Name: Anonymous 2011-04-28 21:41

Also note that it's considered polite to sage your posts in /prog/.

Name: Anonymous 2011-04-28 21:43

>>8
You can post without sage if the post is relevant to the immediate discussion. You should sage when you post shit.

Name: Anonymous 2011-04-28 21:48

Yes, sort of. But sage => modesty => politeness.

Name: Anonymous 2011-04-28 21:53

>>10
Back to /jp/, please.

---
Sent from my iPhone

Name: Anonymous 2011-04-28 21:56

>Hey Aaron or Nat

Haha yeah, I only noticed that the path after I posted...

>apt-get is a package manager for Debian

Yeah, eventually I figured out that wasn't really aplicable to me, it was just confusing because it actually seemed to compile without problems when i had that in the linker.

>Also note that it's considered polite to sage your posts in /prog/.

Also, thanks for the tip.  Didn't know that.

Yeah, one of the reasons I chose codeblocks was the toolchain, and (I thought) nothing having to bother with MSYS and all that jazz with makefiles, to be honest.  When we were learning in university, I really just figured the teachers were stubbornly old hat, so I didn't really retain the unix stuff.

I guess I just figured that shit should be "simple" with importing a project with any ol' IDE.  I've used SDL in projects before on my own with no problems, both in c++ and java.  No, I think the real issue is that stupid wxWidgets thing, and having to compile that on my own?  yeah, christ who knows.  

I'm trying to install MSYS now.

Name: Anonymous 2011-04-28 22:21

well, doing all that jazz with MSYS worked. I can compile it in there at least.  Still annoys me about how much of a pain in the ass it is to make the things work in the IDE though.  ah well, bitch bitch.

Thanks for your help, the whole thing was really bugging me all day.

Name: Gayfer 2011-04-28 22:48

C++

Name: Anonymous 2011-04-29 10:54

Name: Anonymous 2011-04-29 12:33

uuuupdaaate.

Yeah, eventually I figured out the problem with trying to compile it in my IDE.

The problem was twofold:  1) I needed to remove the files that were associated with the SIFEdit suit he mentioned.  I was removing the wrong ones.  I had to remove the tools directory, and the sifedit directory (but NOT the siflib one).  My main problem was that I didn't really understand the error messages I was getting, also due to some graphical errors i was receiving for some reason... :P

2) thanks to lazyfoo (http://lazyfoo.net/SDL_tutorials/lesson01/index.php) I was able to set up the linker properly (-lmingw32 -lSDLmain -lSDL -lSDL_ttf) in the compiler settings.

Anyway, thanks anonymous for the help earlier.  Probab ly would have given up on the whole shebang if I didn't see it work with the make.   (still can't figure out how to use mingw32-m ake though.  yeesh)

Name: Anonymous 2011-04-30 6:21


Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List