User forums > Help

Unable to compile ClangCompletion cbplugin

(1/11) > >>

astrapi:
Hello everybody !

I've found greatfull healp here, so I tried again !

I'm trying to built the clangcompletion plugin for codeblocks.
I've download this --> https://github.com/Lalaland/ClangComplete

I open it with my newlly installed codeblocks ( ;) ) , but I've got this error :

||=== Build: default in ClangComplete (compiler: GNU GCC Compiler) ===|
/home/astrapi/.lib/codeBlocks/ClangComplete-master/ClangComplete.h||In member function ‘wxArrayString ClangComplete::GetCallTips()’:|
/home/astrapi/.lib/codeBlocks/ClangComplete-master/ClangComplete.h|71|warning: no return statement in function returning non-void [-Wreturn-type]|
/home/astrapi/.lib/codeBlocks/ClangComplete-master/ClangComplete.cpp||In function ‘wxString generateCommandString(ProjectFile*)’:|
/home/astrapi/.lib/codeBlocks/ClangComplete-master/ClangComplete.cpp|130|error: invalid initialization of reference of type ‘const CompilerTool&’ from expression of type ‘const CompilerTool*’|
/home/astrapi/.lib/codeBlocks/ClangComplete-master/ClangComplete.cpp|132|error: ‘class Compiler’ has no member named ‘GenerateCommandLine’|
/home/astrapi/.lib/codeBlocks/ClangComplete-master/ClangComplete.cpp|130|warning: unused variable ‘tool’ [-Wunused-variable]|
/home/astrapi/.lib/codeBlocks/ClangComplete-master/ClangComplete.cpp||In member function ‘CXCodeCompleteResults* ClangComplete::getResults(cbEditor*, cbStyledTextCtrl*)’:|
/home/astrapi/.lib/codeBlocks/ClangComplete-master/ClangComplete.cpp|308|warning: narrowing conversion of ‘length’ from ‘int’ to ‘long unsigned int’ inside { } [-Wnarrowing]|
/home/astrapi/.lib/codeBlocks/ClangComplete-master/ClangComplete.cpp|317|warning: unused variable ‘status’ [-Wunused-variable]|
/usr/include/codeblocks/cbplugin.h||In instantiation of ‘static cbPlugin* PluginRegistrant<T>::CreatePlugin() [with T = ClangComplete]’:|
/usr/include/codeblocks/cbplugin.h|1109|required from ‘PluginRegistrant<T>::PluginRegistrant(const wxString&) [with T = ClangComplete]’|
/home/astrapi/.lib/codeBlocks/ClangComplete-master/ClangComplete.cpp|70|required from here|
/usr/include/codeblocks/cbplugin.h|1116|error: invalid new-expression of abstract class type ‘ClangComplete’|
/home/astrapi/.lib/codeBlocks/ClangComplete-master/ClangComplete.h|28|note:   because the following virtual functions are pure within ‘ClangComplete’:|
/usr/include/codeblocks/cbplugin.h|822|note:     virtual cbCodeCompletionPlugin::CCProviderStatus cbCodeCompletionPlugin::GetProviderStatusFor(cbEditor*)|
/usr/include/codeblocks/cbplugin.h|869|note:     virtual std::vector<cbCodeCompletionPlugin::CCToken> cbCodeCompletionPlugin::GetAutocompList(bool, cbEditor*, int&, int&)|
/usr/include/codeblocks/cbplugin.h|881|note:     virtual wxString cbCodeCompletionPlugin::GetDocumentation(const cbCodeCompletionPlugin::CCToken&)|
/usr/include/codeblocks/cbplugin.h|902|note:     virtual std::vector<cbCodeCompletionPlugin::CCCallTip> cbCodeCompletionPlugin::GetCallTips(int, int, cbEditor*, int&)|
/usr/include/codeblocks/cbplugin.h|914|note:     virtual std::vector<cbCodeCompletionPlugin::CCToken> cbCodeCompletionPlugin::GetTokenAt(int, cbEditor*, bool&)|
/usr/include/codeblocks/cbplugin.h|925|note:     virtual wxString cbCodeCompletionPlugin::OnDocumentationLink(wxHtmlLinkEvent&, bool&)|
||=== Build failed: 3 error(s), 7 warning(s) (0 minute(s), 5 second(s)) ===|



reference to this part of code :

--- Code: ---const CompilerTool &tool = comp->GetCompilerTool(ctCompileObjectCmd,_(".cpp"));
    wxString tempCommand = _("$options $includes");
    comp->GenerateCommandLine(tempCommand,target,file,UnixFilename(pfd.source_file_absolute_native),Object,pfd.object_file_flat,
                              pfd.dep_file);
    return tempCommand;

--- End code ---


If someone see the problem...

I'm with Starting Code::Blocks Release 16.01  rev 10760 Feb  2 2016, 03:11:29 - wx2.8.12 (Linux, unicode) - 64 bit
On ubuntu


Alpha:
You may want to try https://github.com/yvesdm3000/ClangLib.  That is where active development is.  The project file probably needs to be tweaked to remove absolute paths first though.

If you run into problems with it, you could alternatively try https://github.com/alpha0010/ClangLib/tree/threads (threads branch).

astrapi:
Wonderful I try all this as soon as possible, thanks !

astrapi:
Sorry sorry, surely that's look better, but I load the clanlib.cdb (unix)
and I have this error

Scanned 0 files for #includes, cache used 0, cache updated 0
g++-5 -DBUILDING_PLUGIN -O3 -Wextra -Wall -std=c++0x -ansi (invalid) -I/usr/lib/llvm-3.4/include -fmessage-length=0 -fexceptions -Winvalid-pch -fPIC -pthread -DcbDEBUG -DCB_PRECOMP -DWX_PRECOMP -Wall -std=c++0x -std=c++11 -std=c++14 -D__GXX_EXPERIMENTAL_CXX0X__ -I/usr/include/codeblocks -I/usr/lib/llvm-3.4/include/ -I. -I../codeblocks-1510/src/include -c /home/astrapi/.lib/codeBlocks/ClangLib-master/cclogger.cpp -o .objs/plugins/clanglib/cclogger.o

/bin/sh: 1: Syntax error: "(" unexpecte

Certainly it's not terrible... But I don't know what to  do...

In the build option I see that there was a relative path to ..codeblockas-16.01/sdk/wxscintilla but I don't have this lib, and I can't see what thing I'v got to install... (it's really obscure all this for me...)

Thanks again for helping!

oBFusCATed:
You have this "(invalid)" in the command which means that you have not defined a global variable.
Go to the settings -> global variables and define it.
Then rebuild.
Also clean up all the -std and ansi option. You have almost all of them in a single command which is not good.

Navigation

[0] Message Index

[#] Next page

Go to full version