Author Topic: Project dependencies => frustrating  (Read 2480 times)

Offline krwtsik

  • Single posting newcomer
  • *
  • Posts: 2
Project dependencies => frustrating
« on: April 03, 2017, 12:29:18 am »
Hello everybody,
I'm pretty new to programming and I was trying to absolve an online C++ workshop with the help of Code::Blocks.
First of all we should write, compile and run a "HelloWorld!"project, which did work.
Second was another project that asks you to "Enter a number" and then displays: "You entered the number x".
Now codeblocks seems to think that I want all projects to look the same and when I run the second program it says "HelloWorld."

The host of this workshop said we should try and make the second project a "HelloMoon", which did work, but after that every project I write behaves like a "HelloMoon". Even if I'm in the tree of "EnterX", as soon as I save, Codeblocks tells me that it just saved "HelloMoon". I tried to clean the workspace and Codeblocks tells me "workspace HelloMoon cleaned", when I'm still in project "EnterX".

It is really quite annoying!

It would be so great if somebody could help me get rid of this function somehow.

Greetz
« Last Edit: April 03, 2017, 12:46:58 am by krwtsik »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Project dependencies => frustrating
« Reply #1 on: April 03, 2017, 02:49:00 am »
Do you know the difference between an CB Project and the CB Workspace?

Your post implies you do NOT know the difference.

Tim S.
 
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline krwtsik

  • Single posting newcomer
  • *
  • Posts: 2
Re: Project dependencies => frustrating
« Reply #2 on: April 03, 2017, 11:20:29 am »
No. I don't even know what a workspace does. I was told that I could use Code::Blocks for this C++ Tutorial.
It just seems that there is a project dependency by default where I don't even need it. If I go into project dependencies under project\properties as proposed in Help I can not change the dependency I can only look at it and see that it's there...

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Project dependencies => frustrating
« Reply #3 on: April 03, 2017, 03:38:24 pm »
Post a full rebuild log and maybe someone will have an idea of what you are doing wrong.

http://wiki.codeblocks.org/index.php/FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F

Edit: Posting a link to the "C++ Tutorial" you are using might also help us help you.

Tim S.
« Last Edit: April 03, 2017, 03:40:04 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Project dependencies => frustrating
« Reply #4 on: April 03, 2017, 10:00:07 pm »
And !always! make one project per main function:
Code
int main(void)
{
}