Author Topic: The 19 september 2010 build (6608) CODECOMPLETION BRANCH version is out.  (Read 65950 times)

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: The 19 september 2010 build (6608) CODECOMPLETION BRANCH version is out.
« Reply #30 on: September 22, 2010, 12:35:27 pm »
Im not touching compiler or linker settings. They are setted to default compiler, and in the linker options i have comctl32 and gdi32. A single code, which uses some of these libraries, cant compile. But this SAME CODE compiles when i put it into a project, which has SAME settings. Weird, isnt it ?
Change "Settings -> Compiler and debugger... -> Global compiler settings -> [the compiler you use] -> Other settings(rightmost tab)" "Compiler logging" to "Full commandline" and compare the commands used to invoke the compiler.

Offline helpse

  • Multiple posting newcomer
  • *
  • Posts: 25
Re: The 19 september 2010 build (6608) CODECOMPLETION BRANCH version is out.
« Reply #31 on: September 22, 2010, 01:10:23 pm »
Thanks. I did that. Here is what i get from compiling a project:

Code
mingw32-g++.exe -Wall  -g     -c "C:\[Sergio]\C++\C++ Projects\test\main.cpp" -o obj\Debug\main.o
mingw32-g++.exe  -o bin\Debug\test.exe obj\Debug\main.o   -enable-auto-import  -lcomctl32 -lgdi32


And from compiling a single file:

Code
 mingw32-g++.exe   -c "C:\[Sergio]\C++\cGui Library\Examples\Button_Example.cpp" -o "C:\[Sergio]\C++\cGui Library\Examples\Button_Example.o"
 mingw32-g++.exe  -o "C:\[Sergio]\C++\cGui Library\Examples\Button_Example.exe" "C:\[Sergio]\C++\cGui Library\Examples\Button_Example.o"

Easy: It's just not linking the files i told it to link. I have comctl32 and gdi32 added to Compiler & Debugger -> Linker Settings. Dont forget to compile and upload it when u fix this bug, pls.

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: The 19 september 2010 build (6608) CODECOMPLETION BRANCH version is out.
« Reply #32 on: September 22, 2010, 01:21:00 pm »
Easy: It's just not linking the files i told it to link. I have comctl32 and gdi32 added to Compiler & Debugger -> Linker Settings. Dont forget to compile and upload it when u fix this bug, pls.

Please attach here or send me (via PM or mail) your project-file (just the cbp) and the default.conf of C::B.

Offline helpse

  • Multiple posting newcomer
  • *
  • Posts: 25
Re: The 19 september 2010 build (6608) CODECOMPLETION BRANCH version is out.
« Reply #33 on: September 22, 2010, 03:22:11 pm »
Ok, here are the 2 files.

Offline blueshake

  • Regular
  • ***
  • Posts: 459
Re: The 19 september 2010 build (6608) CODECOMPLETION BRANCH version is out.
« Reply #34 on: September 22, 2010, 04:59:56 pm »
support member variable initialation codecompletion now
Keep low and hear the sadness of little dog.
I fall in love with a girl,but I don't dare to tell her.What should I do?

Offline Loaden

  • Lives here!
  • ****
  • Posts: 1014
Re: The 19 september 2010 build (6608) CODECOMPLETION BRANCH version is out.
« Reply #35 on: September 23, 2010, 02:29:05 am »
1. Simplified interface to batch parse
2. Improve batch parse performance

Offline Loaden

  • Lives here!
  • ****
  • Posts: 1014
Re: The 19 september 2010 build (6608) CODECOMPLETION BRANCH version is out.
« Reply #36 on: September 23, 2010, 03:00:45 am »
Improve system headers locker

Offline Loaden

  • Lives here!
  • ****
  • Posts: 1014
Re: The 19 september 2010 build (6608) CODECOMPLETION BRANCH version is out.
« Reply #37 on: September 23, 2010, 03:17:00 am »
support member variable initialation codecompletion now

Hi, blueshake, based you patch, I am fixed a bug.
Now, this patch shoud works well.

Offline Loaden

  • Lives here!
  • ****
  • Posts: 1014
Re: The 19 september 2010 build (6608) CODECOMPLETION BRANCH version is out.
« Reply #38 on: September 23, 2010, 03:35:20 am »
Hi, all!
I encountered a problem about scintilla.
Quote
void CodeRefactoring::Find(cbStyledTextCtrl* control, const wxString& file, const wxString& target)
{
    const int end = control->GetLength();
    int start = 0;
    int pos = 0;

    for (;;)
    {
        int lengthFound;
        pos = control->FindText(start, end, target, wxSCI_FIND_WHOLEWORD | wxSCI_FIND_MATCHCASE, &lengthFound);
        if (pos != wxSCI_INVALID_POSITION)
        {
            start = pos + lengthFound;

           // TODO (Loaden) not work?
            const int style = control->GetStyleAt(pos); // always been zero?
            if (control->IsString(style) || control->IsComment(style))
                continue;

            int line = control->LineFromPosition(pos);
            wxString text = control->GetLine(line).Trim(true).Trim(false);
            m_SearchDataMap[file].push_back(crSearchData(pos, line, text));
        }
        else
            break;
    }
}
Please see the bold style code, why the return value always been zero.
Any comment are welcome!
« Last Edit: September 23, 2010, 03:38:24 am by Loaden »

Offline helpse

  • Multiple posting newcomer
  • *
  • Posts: 25
Re: The 19 september 2010 build (6608) CODECOMPLETION BRANCH version is out.
« Reply #39 on: September 23, 2010, 07:41:18 am »
Ok, so i see its at revision 6627, but i cant compile it since i didnt configure wxwidgets yet. Could any1 compile and upload CB rev 6627? Thank you!

Offline Loaden

  • Lives here!
  • ****
  • Posts: 1014
Re: The 19 september 2010 build (6608) CODECOMPLETION BRANCH version is out.
« Reply #40 on: September 23, 2010, 08:02:17 am »
Ok, so i see its at revision 6627, but i cant compile it since i didnt configure wxwidgets yet. Could any1 compile and upload CB rev 6627? Thank you!
Same as r6627.
http://portablecb.googlecode.com/files/CB_CCBRANCH_6623_patched.7z
Or, waiting the next nightly build.

Offline helpse

  • Multiple posting newcomer
  • *
  • Posts: 25
Re: The 19 september 2010 build (6608) CODECOMPLETION BRANCH version is out.
« Reply #41 on: September 23, 2010, 08:27:50 am »
I just tried that 6623. The bug isn't fixed.

This is what i get from compiling a project:

Code
mingw32-g++.exe -Wall  -g     -c "C:\[Sergio]\C++\C++ Projects\test\main.cpp" -o obj\Debug\main.o
mingw32-g++.exe  -o bin\Debug\test.exe obj\Debug\main.o   -enable-auto-import  -lcomctl32 -lgdi32


And from compiling a single file:

Code
 mingw32-g++.exe   -c "C:\[Sergio]\C++\cGui Library\Examples\Button_Example.cpp" -o "C:\[Sergio]\C++\cGui Library\Examples\Button_Example.o"
 mingw32-g++.exe  -o "C:\[Sergio]\C++\cGui Library\Examples\Button_Example.exe" "C:\[Sergio]\C++\cGui Library\Examples\Button_Example.o"

The difference is that when i build a project, it linkes the libraries i have setted  in Compiler & Debugger -> Linker Settings. So it works fine.

But when i build a single file, with NO project, it doesnt link the libraries, and it SHOULD. The building log, for this case should be:

Code
 mingw32-g++.exe   -c "C:\[Sergio]\C++\cGui Library\Examples\Button_Example.cpp" -o "C:\[Sergio]\C++\cGui Library\Examples\Button_Example.o"
 mingw32-g++.exe  -o "C:\[Sergio]\C++\cGui Library\Examples\Button_Example.exe" "C:\[Sergio]\C++\cGui Library\Examples\Button_Example.o"
 -enable-auto-import  -lcomctl32 -lgdi32

That seems easy to fix...

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: The 19 september 2010 build (6608) CODECOMPLETION BRANCH version is out.
« Reply #42 on: September 23, 2010, 11:28:17 am »
I can confirm this, and it works on debugger-branch and trunk.

@helpse:
the enable-auto-import option should be: -Wl,--enable-auto-import .

Offline Loaden

  • Lives here!
  • ****
  • Posts: 1014
Re: The 19 september 2010 build (6608) CODECOMPLETION BRANCH version is out.
« Reply #43 on: September 23, 2010, 12:06:54 pm »
It must has some thing wrong in this commit.
Quote
Revision: 6238
Author: mortenmacfly
Date: 2010-5-16 2:18:56
Message:
* applied patch "Fix compiler invalid bug, when the default compiler does not exist" (http://forums.codeblocks.org/index.php/topic,12351.0.html)
-------------------------------
M : /branches/codecompletion_refactoring/src/plugins/compilergcc/compilergcc.cpp

Offline Loaden

  • Lives here!
  • ****
  • Posts: 1014
Re: The 19 september 2010 build (6608) CODECOMPLETION BRANCH version is out.
« Reply #44 on: September 23, 2010, 12:18:52 pm »
I can confirm this, and it works on debugger-branch and trunk.

@helpse:
the enable-auto-import option should be: -Wl,--enable-auto-import .
Hi, Jens, could you trying this patch?
The patch just to revert r6238.

If this patch can solved the issue, please commit it in cc branch, thanks!

@helpse
Could you trying this build?
http://portablecb.googlecode.com/files/CB_CCBRANCH_6627_patched.7z