Author Topic: sudden amnesia of linker?  (Read 16228 times)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: sudden amnesia of linker?
« Reply #15 on: September 18, 2013, 10:21:18 pm »
PS: I would rather not like deleting cbproject.depend with my project open... maybe I'll set up a test project...
Why? Aren't you storing your project in a VCS (subversion,git,etc)?

The best thing to do is to try reproduce the problem with a simple console project. Then post the exact steps needed to reproduce it on another computer.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline frithjofh

  • Regular
  • ***
  • Posts: 376
Re: sudden amnesia of linker?
« Reply #16 on: September 19, 2013, 09:35:33 pm »
hi, and thanks for the interest...

actually I am using git as version control system...

but back to my observed c::b problem: did anyone else reproduce it on his/her machine?

regards

frithjof
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: sudden amnesia of linker?
« Reply #17 on: September 20, 2013, 12:49:59 am »
but back to my observed c::b problem: did anyone else reproduce it on his/her machine?

No.

Which settings do you use in the new class dialog ?
Which pch-settings do you have for your project ?

As written by oBFusCATed: a minimal test-project and exact steps (all settings in new class dialog) would be good.

Offline frithjofh

  • Regular
  • ***
  • Posts: 376
Re: sudden amnesia of linker?
« Reply #18 on: September 20, 2013, 11:33:17 am »
Hi everybody,

I attached a zip with a minimal console test project. PCH settin is the default: PCH generatedalongside original header.

I have added two classes via the new class dialog. Settings of the dialog for both classes like in the attached jpg file screen shot.

After adding the first class, the compilation/linking failed. I closed the project and reopened it and it compiled/linked fine.

After adding the second class, compilation/linking failed. I attach the build log as fail_2.txt.

regards

frithjofh

[attachment deleted by admin]
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: sudden amnesia of linker?
« Reply #19 on: September 20, 2013, 02:03:01 pm »
i think i know what is going on...
this should fix the error...

greetings

[edit] a better patch would be, in the compiler plugin, witch prevents to add a empty patch to the command line.... at the moment i have no time, but later i could try to fix it...
« Last Edit: September 20, 2013, 02:11:04 pm by BlueHazzard »

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: sudden amnesia of linker?
« Reply #20 on: September 20, 2013, 04:07:53 pm »
I would prefer this patch...

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: sudden amnesia of linker?
« Reply #21 on: September 20, 2013, 04:50:54 pm »
BlueHazzard:
Are you able to reproduce the problem?
If so can you enlighten us about the steps needed to reproduce it?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: sudden amnesia of linker?
« Reply #22 on: September 20, 2013, 05:06:08 pm »
To reproduce the bug, you have only to create a project and add a class with the class wizzard.
The options "Add path to Project", "Use relative Path", and "Header and implementation file shall be in the same folder"
and the folder should point to the main project directory.
The problem is, that the relative path to the project directory is nothing (or a empty string). And if we add a empty Include path, c::b produce the output with the empty -I flag.
My patch checks if the path to add to the include directories is empty, if so, reject it... (or should we add a "."?)

greetings

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: sudden amnesia of linker?
« Reply #23 on: September 20, 2013, 09:17:24 pm »
I would prefer the "-I .", because it does what the wizard is told to do (add the reletive path).
@oBFusCATed: I can reproduce it now also, you have to uncheck "Explicitely add currently compiling file's directory to compilers search dir" in compiler options.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: sudden amnesia of linker?
« Reply #24 on: September 20, 2013, 10:36:57 pm »
Great now you'll choose a way to fix it :)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline frithjofh

  • Regular
  • ***
  • Posts: 376
Re: sudden amnesia of linker?
« Reply #25 on: September 21, 2013, 02:05:17 pm »
thanks for the efforts and the fix. maybe I should mention, that this worked fine all the time in the past. the bug was introduced only some months ago...

thanks again
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: sudden amnesia of linker?
« Reply #26 on: September 21, 2013, 06:21:13 pm »
@frithjofh: you can remove the tick at "Add path to Project" and it should work, for the moment, until a fix is committed...

i think this patch should work...


greetings