Saturday 31 January 2009

How To Build Projects With Libraries In Dev-C++


These days when I was coding the Mp3ListPlayer in IDE Dev-C++,I found a big problem building the project.
Of course,I finally solved it.And I want to tell you how to,so you won't meet the problem I met.HEHE~

For example,your project need a library named winmm.lib,and you want to build the project in Dev-C++:
1.Open the Dev-C++ menu "Project"-"Project Options".
2.Change to Parameters page like the picture show you.
3.Choose the "Add Library or Object" button.
4.Change into dir \Dev-Cpp\lib.
5.Find a file called lib[].a(and the library name you need in [],for example libwinmm.a).
6.Apply the configuration and build the project.

Hope this post useful to you.

Wednesday 28 January 2009

A Console Mp3 Player Using MCI Functions

Read many data on audio file play under Windows,including DirectSound,DirectMusic,and MCI..
Finally used MCI to write this program,found it easy to use.

Required Header File : mmsystem.h
Required Library File : winmm.lib

Another main problem is that I don't know how to link it under console[don't know the command],so I can only build my project in Visual C++.Fainting..

And please reference here.
These two days studied many new things,Assembly Language,Direct,MCI,and in the following days plan to read something,I should read more.HEHE~

Tuesday 27 January 2009

Corrected A Program From An Assembly Language Book

The code on the book Assembly Languuage Programming is like this:[without bold sentences]

TITLE EG617

STACKSG SEGMENT STACK 'STACK'
DW 32 DUP(0)
STACKSG ENDS

DATASG SEGMENT
CR EQU 13
LF EQU 10
CHARIN DB 'PLEASE INPUT A CHARACTER:','$'
CHAROUT DB 'THE RESULT IS:','$'
LOUT DB 'LETTER','$'
NOUT DB 'NUMBER','$'
OOUT DB 'OTHERS','$'
CRLF DB CR,LF,'$'
DATASG ENDS

CODESG SEGMENT
MAIN PROC FAR
ASSUME CS:CODESG,DS:DATASG,SS:STACKSG
MOV AX,DATASG
MOV DS,AX

LEA DX,CHARIN
MOV AH,9
INT 21H

MOV AH,1
INT 21H
;MOV CL,AL

LEA DX,CRLF
MOV AH,9
INT 21H

LEA DX,CHAROUT
MOV AH,9
INT 21H

;MOV AL,CL

CMP AL,'0'
JB OTHERS
CMP AL,'9'
JA CON1

LEA DX,NOUT
MOV AH,9
INT 21H
JMP EXIT

CON1:
CMP AL,'A'
JB OTHERS
CMP AL,'Z'
JA CON2

LEA DX,LOUT
MOV AH,9
INT 21H
JMP EXIT

CON2:
CMP AL,'a'
JB OTHERS
CMP AL,'z'
JA OTHERS

LEA DX,LOUT
MOV AH,9
INT 21H
JMP EXIT

OTHERS:
LEA DX,OOUT
MOV AH,9
INT 21H

EXIT:
MOV AX,4C00H
INT 21H
MAIN ENDP
CODESG ENDS
END MAIN

Before I correct it,it always return the result from the proc OTHERS,so I add those two sentences into the code and it became correct.I think it may because the following code:

LEA DX,CRLF
MOV AH,9
INT 21H

LEA DX,CHAROUT
MOV AH,9
INT 21H

changed the value stored by the register AL,so I copyed it into the register CL,and it then became correct.

By the way,found that Assembly Language is very interesting and powerful~~

Monday 26 January 2009

Happy New Year And The Great AC Millan

First of all,HAPPY NEW YEAR!
And just now watched a football match of AC Millan.She wins with the score of 4-1!
SeeDorf made the first goal,KaKa then scored 2 goals,then BECKHAM!My favorite star scored~
Beautiful Match!!!!!!

And I played a round Chenghai,chose ES,then TC, then Paladin,then DK,then BMG,a very succesful ES.

Friday 23 January 2009

First Time APM 100+ In War3


Just now played a round Chenghai with my classmate Qin Zihao,I chose BM as my first hero,then BMG,then Lich,and I found my APM is 136.99,maximum over 220!(We didn't finish this game because his mother is angry with him~I have got a little advantage over him)
A great progress.
This morning I installed the S60_2nd(8.0a) SDK and Visual C++ 6.0,and successfully built the HelloWorldBasic example program.

Thursday 22 January 2009

Crack Is Great

OllyICE is the most powerful one..
Just followed a hacker magazine Hacker Defence cracked an application AHeadDVDRipper.And wrote a regiter machine.Feeling great!~

Wednesday 21 January 2009

Drink A Lot&Talk A Lot

Yesterday evening I went to Yizer's party.Many of his friends attended it,and I met a boy called Wang Hailong,he is studying Software Engineering at Hei Longjiang University.He used to be a student of my chemistry and physics teacher--Xu Deli and Liu Zhanwei.HEHE~
Found him a really interesting guy~
We all drank many cups of beer.And I really drank much more than ever before~

Party is really a good chance to meet new friends~

For such a long time haven't update this blog[other blogs either...>_<]because of so many lessons and exams.Now finally get into my holiday,and just finished the whole English homework..
Three cups of tea,and became clear-headed..

Sunday 11 January 2009

Back From Windows


For many days--since finished installing Ubuntu on my PC--I haven't gone back to Windows.Just now I returned to it for a not short time.
Watched the last chapter of Death Note.
A really great animation..

Saturday 10 January 2009

Compile To Install Emacs22.3



Compiling to install the great editor Emacs.
Like it very much,wrote many programs by it in the last period of my programming career.

Just watched chapter 25 of my girl's favourite animation Death Note.In this chapter her favourite role L was killed...
She said L was the same with me....
Lonely.Talent.
When L closed his clearly eyes,I felt like something lost in my heart...

Junk Exam

Be on the junk School work Level Exam.
Full of junk problems.

This winter holiday plans to read 20+ books,including novel,mathematics,physics and programming.
I admire it's 'A Death Match With Time.'
HEHE~

Wednesday 7 January 2009

Dreaming Of This Keyboard

As title.

A Sentence

Coloured glaze is made for breaking.

This just came into my mind yesterday evening when doing geography paper.
But my girl,I promised you forever be with you.
And you've promised me,too.

To tell the truth,I want you my wife some years later.
Can we?

Tuesday 6 January 2009

A+B Program In C++


Faint.
Don't know how to compile a simple console c++ source file in Eclipse and Anjuta.
Thanks to Yizer.He suggested me to use the Code::Blocks IDE,and it really works--successfully compiled and run the 'famous' A+B program.HEHE~

Usplash


Just restart my computer to enjoy the new Usplash theme.
Really good~~
You can download it from here.

A Cup Of Sumiyaki Coffee

Daddy bought me a pocket of Sumiyaki Coffee in Hainan.
Now drink a cup and begin to study~

Eclipse


Finally installed Eclipse~
Download speed so low~
Really like its font~

Study

Study through midnight.
Without feeling tired,don't know what's wrong.
My girl is sleeping now,but I didn't accompany her.
Forgive me,please.The Oracle The God.

Monday 5 January 2009

Printer

For a long time my effort trying to add my Legend M7200 Printer into Ubuntu failed.Because the .ppd file provided by the gift CD is not supported by Ubuntu.Faint.
Just now I tried the Generic settings for the printer,it told me add succeed,I wrote a sentence 'Just For Test' and tried to print it,the printer works!!
Great Ubuntu~
Again feels the power of millions of HACKERS~

The Second Day Under Ubuntu

Exam results not bad,so I can open my computer today~[Just a joke,even bad I can also done this]
On the way home,I told my mother that Ubuntu is a lot better than Fedora Core--that system runs very slow on my computer!--faster,less-bug,and the simple apt-get!
I hope this system not crash very soon HEHE~

Miss my girl a lot.
She cried today without telling me the reason.
I know it's her way her style her right.
When I walk her home,we talked many thing including the stupid CPY..
She laughed.
I wish her no more sorrow.

Sunday 4 January 2009

Installing finished

Just finished installing Language Support and many things else like QQ etc.
Rhythmbox--such a poetic name for a music player,understand the meaning just now...Faint,too.
Though now I can write something in Chinese,I do not wanna do it~~
And,
though this blog is called 'Code Fortress',I do not want to make it a complete blog of programming.
Reason is simple,because I've left this area~
Today I watched some video on Tudou.com[Youtube in China~] about a map of War3,which we call it Chenghai in Chinese,the explication is a man called Xiaozhi.He has left the arena of this map.I think I got something when he explained why he left.
Yes,maybe someday I would truly say goodbye to Code or Programming,and maybe someday I would come back.
Now I really missed the days 2 months ago.When we fight together for our beautiful dreams.Full of memories.I will keep those days in my mind forever.
How long haven't we stay together,Yizer,Teacher Yuan,CPY,HG and other boys and girls.
Just like a joke.Now is 2009,but my memory still lives in 2008.
A year I cannot forget.
So many happy,so many sorrow.

Poor Wired Network Connection

My downloading rate is so low.So I still cannot type Chinese under this fantasy system.Faint again.
Ignore CPY.I've just finished install and test the Free Pascal compile and IDE environment under Ubuntu.Feel Great~~
E~~,yes,wanna try Eclipse under Ubuntu,I like its font very much~
Poor Wired Network Connection!!!
With Language Support downloading items,Ubuntu cannot install .deb packages!
QQ,Adobe Reader,Adobe Flash Player.....

My Ubuntu finally succed

As title.
By using the iso file of Super Ubuntu[2008.11],this fantasy system can finally run on my computer.Before this when I use the standard Ubuntu desktop iso it crash when loading desktop!
Faint for such a long time.

And for two nights I've been thinking about the name of this new blog.You know we are in testing now,but I still thought it many times.

So,a new blog and a new life.