Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: Abiel Francis on November 12, 2013, 10:12:48 am

Title: C++ Doubt
Post by: Abiel Francis on November 12, 2013, 10:12:48 am
I downloaded and installed Code Blocks 12.11.I made a new project and there was a default file in source main.cpp.I compiled it,then ran it and it was successful."http://postimg.org/image/drz1735ov/".Then i made a new empty file in the same project named 1.cpp and wrote a program and saved it."http://postimg.org/image/5tyx8qvir/".Then i compiled it i got two errors and i couldnt run either of them.But if i delete 1.cpp and then run main.cpp then main.cpp works and vice versa.PLEASE HELP!!!!!!!!
Title: Re: C++ Doubt
Post by: Abiel Francis on November 12, 2013, 10:56:21 am
14 Views.no replies. >:(
Title: Re: C++ Doubt
Post by: BlueHazzard on November 12, 2013, 10:56:33 am
well, read the error. It will tell what your problem is....

Remember: C::B gives all files from a project to the compiler/linker unless you tell him to ignore the files in this target...

if you don't understand the last sentence in would recommend you a c/c++ Tutorial and: http://wiki.codeblocks.org/index.php?title=The_build_process_of_Code::Blocks

greetings
Title: Re: C++ Doubt
Post by: Abiel Francis on November 12, 2013, 11:01:11 am
 :D Thank you.Thank you.But I am a newbie so i dint understand anything  ???.So can you tell if i want to make multiple .cpp files and make them run what i should do.
Title: Re: C++ Doubt
Post by: BlueHazzard on November 12, 2013, 11:22:27 am
You can read: http://wiki.codeblocks.org/index.php?title=The_build_process_of_Code::Blocks and a c++ tutorial....

(Or you make a new project for every cpp file, or you make a target for every cpp file (how you do this read: http://wiki.codeblocks.org/index.php?title=Basic_Tutorial and the other wiki pages))

greetings
Title: Re: C++ Doubt
Post by: thomas on November 12, 2013, 04:20:31 pm
Or, you know, there exists a book that explains the basics of application development, specifically using Code::Blocks:
Application Development with Code::Blocks (https://www.packtpub.com/c-plus-plus-application-development-with-code-blocks/book).