Author Topic: Some Issues on CB rev 7079 and older  (Read 3251 times)

Offline MasterAlexei

  • Multiple posting newcomer
  • *
  • Posts: 77
    • Fun electronic
Some Issues on CB rev 7079 and older
« on: April 10, 2011, 11:37:46 am »
Hello all,
first of all, thanks for a great IDE! I just love it :)

With the issue with ThreadSearch I am still on waiting, when it occures, seems that it depends on count of files in project, at home I have not so much files in a projects.

But there are some other issues:
1. In "Project Build options" dialog, at "Linker settings" Tab in "Other Linker options" I usually add the list on my libs one more times, because of internal dependencies in libs. (see picture)
After saving the project, closing CB and then reopening it, the duplicated libs are removed, and the project then does not linking.

2. The file properties dialog:
The Checkbox "File is read only" on the "General" Tab is being checked, when I check the Checkbox "Use custom command line to build this file:" on the "Advanced" tab. And the file then being Read only, what is not needed.

And also if I check that check box "Use custom command ...", and then click "Cancel", the file will be Read only too.
It is not critical, but unexpected behavior :)





Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9615
Re: Some Issues on CB rev 7079 and older
« Reply #1 on: April 10, 2011, 11:44:35 am »
1. In "Project Build options" dialog, at "Linker settings" Tab in "Other Linker options" I usually add the list on my libs one more times, because of internal dependencies in libs. (see picture)
After saving the project, closing CB and then reopening it, the duplicated libs are removed, and the project then does not linking.
This makes no sense. You should use the left library list in this dialog and add the libs only one time in the right order. There is no such thing like a cyclic dependency possible. The linker would surely complain. What happens in your case is most likely that by adding the list another time the dependency is magically satisfied.

If you are unsure about the dependency order, do the following:
  • Remove all libs, compile & link
  • Note the first linker error (missing implementation)
  • Add the library that provides this implementation
  • Start again with compile and link

The Checkbox "File is read only" on the "General" Tab is being checked, [...]
This might be a bug, I'll look into it...
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline MasterAlexei

  • Multiple posting newcomer
  • *
  • Posts: 77
    • Fun electronic
Re: Some Issues on CB rev 7079 and older
« Reply #2 on: April 10, 2011, 11:49:39 am »
This makes no sense. You should use the left library list in this dialog and add the libs only one time in the right order. There is no such thing like a cyclic dependency possible. The linker would surely complain. What happens in your case is most likely that by adding the list another time the dependency is magically satisfied.

If you are unsure about the dependency order, do the following:
  • Remove all libs, compile & link
  • Note the first linker error (missing implementation)
  • Add the library that provides this implementation
  • Start again with compile and link
I already tried it, but till now with no success. May be I should try it a little bit more accurately.

But in embedded world this approach is common thing ;-) and just to remove any double libs in a list without any warning - not a good idea, I think.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9615
Re: Some Issues on CB rev 7079 and older
« Reply #3 on: April 10, 2011, 03:25:55 pm »
But in embedded world this approach is common thing ;-)
Weird. Can you explain why this makes sense and what the linker actually does in this case?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline MasterAlexei

  • Multiple posting newcomer
  • *
  • Posts: 77
    • Fun electronic
Re: Some Issues on CB rev 7079 and older
« Reply #4 on: April 10, 2011, 03:38:28 pm »
But in embedded world this approach is common thing ;-)
Weird. Can you explain why this makes sense and what the linker actually does in this case?
In this project I did solved this by moving two first libs at the end of the list without to put them twice in the list.

It seems weird, but some times it happens :)
In other Project (not of mine, but one within ethernut projects) there was such dependency, that the program uses some function A from lib 1, that uses other function B in lib 2, that uses another function C in lib 1 (I don't know exactly the details of that issue anymore).
And in that case the linker didn't find some functions until the libs was not doubled in the libs list - it was official solution form ethernut team to that time.
In my project linker takes only the functions, used from the libs into final executable, not the whole libs twice. I see it with a exec's resulting size.
« Last Edit: April 10, 2011, 03:40:51 pm by MasterAlexei »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13438
    • Travis build status
Re: Some Issues on CB rev 7079 and older
« Reply #5 on: April 17, 2011, 12:57:12 am »
This might be a bug, I'll look into it...
Definitely a bug, I can reproduce it, too...
(Windows xp 32 bit sp3, latest debugger's branch nightly)
(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 ouch

  • Almost regular
  • **
  • Posts: 223
Re: Some Issues on CB rev 7079 and older
« Reply #6 on: April 22, 2011, 05:23:21 pm »
Yep, I just had that happen to me too.

rev 7121

seems to be when a project gets loaded that can happen.

Also, even if you uncheck the box the icon keeps the little lock in the project files.