News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

The 19 september 2010 build (6608) CODECOMPLETION BRANCH version is out.

Started by killerbot, September 19, 2010, 09:23:36 AM

Previous topic - Next topic

Jenna

Quote from: helpse on September 22, 2010, 12:29:53 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.

helpse

Thanks. I did that. Here is what i get from compiling a project:

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:

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.

Jenna

Quote from: helpse on September 22, 2010, 01:10:23 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.

helpse


blueshake

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?

Loaden

1. Simplified interface to batch parse
2. Improve batch parse performance


Loaden

Quote from: blueshake on September 22, 2010, 04:59:56 PM
support member variable initialation codecompletion now

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

Loaden

Hi, all!
I encountered a problem about scintilla.
Quotevoid 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!

helpse

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!

Loaden

Quote from: helpse 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!
Same as r6627.
http://portablecb.googlecode.com/files/CB_CCBRANCH_6623_patched.7z
Or, waiting the next nightly build.

helpse

I just tried that 6623. The bug isn't fixed.

This is what i get from compiling a project:

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:

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:

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...

Jenna

I can confirm this, and it works on debugger-branch and trunk.

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

Loaden

It must has some thing wrong in this commit.
QuoteRevision: 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.next.codeblocks.org/index.php/topic,12351.0.html)
-------------------------------
M : /branches/codecompletion_refactoring/src/plugins/compilergcc/compilergcc.cpp

Loaden

Quote from: jens 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 .
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