antirez / load81

SDL based Lua programming environment for kids similar to Codea
BSD 2-Clause "Simplified" License
599 stars 62 forks source link

Make 3 #29

Closed ghost closed 12 years ago

ghost commented 12 years ago

Needed to swap -lm and liblua.a order or else

~/code/load81$ make cc load81.o -lm lua/src/liblua.a pkg-config --libs sdl SDL_gfx -o load81 /usr/bin/ld: lua/src/liblua.a(lmathlib.o): undefined reference to symbol 'sin@@GLIBC_2.0' /usr/bin/ld: note: 'sin@@GLIBC_2.0' is defined in DSO /usr/lib/gcc/i686-linux-gnu/4.6.1/../../../i386-linux-gnu/libm.so so try adding it to the linker command line /usr/lib/gcc/i686-linux-gnu/4.6.1/../../../i386-linux-gnu/libm.so: could not read symbols: Invalid operation collect2: ld returned 1 exit status make: *\ [load81] Error 1

antirez commented 12 years ago

Merged! Thanks. Just an hint about commit messages, "fix to build on my ubuntu machine" is not a descriptive commit message, a better one is "swapped -l and liblua in Makefile to allow building on Linux Ubuntu". Cheers.

ghost commented 12 years ago

I know ;( not sure what I'm doing with git and I was trying to rush. It seems by the time I figured that out you're already two steps ahead of me.

antirez commented 12 years ago

Well I would say that's pretty cool that while learning git you provided a fix that was merged, best way to learn for sure, and thanks again!

Tip: if after a commit you don't like the commit message you can use:

git commit --amend

This will open the editor and you'll be able to change the commit message before to push your changes. If you already pushed your changes to the remote repository, then you should not do this, otherwise bad things will happen.

ghost commented 12 years ago

To stay in sync with your master, I should use (I think):

git merge upstream/master

However, it says I am:

"Your branch is ahead of 'origin/master' by"

What am I doing wrong? I could see that you merged my change, but can't get it back. (Sorry this is off the real topic.)

antirez commented 12 years ago

This is why I merged in a special way in order to avoid merging your "merge commits". So now to fix it just type:

git fetch
git reset --hard 97f8d175340074e61dd5c46790e1b502b0020b8f

This will force your source tree to go to the state of the specified commit, that is current origin/master.