User forums > Help
Unable to compile ClangCompletion cbplugin
stahta01:
Look at the build logs and you can see which wxWidgets is being used in the Compiler and Linking steps.
If you do NOT know how to understand the "build logs" then please give up or learn to understand them!
Tim S.
astrapi:
The build log is the input where g++ is shown isn't it ?
--- Code: ----------------- Build: ClangLib in clanglib (Unix) (compiler: GNU GCC Compiler)---------------
g++-5 /home/astrapi/.lib/codeBlocks -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -I/usr/lib/llvm-3.6/include -fmessage-length=0 -fexceptions -Winvalid-pch -fPIC -pthread -DBUILDING_PLUGIN -O3 -Wextra -Wall -std=c++0x -ansi /home/astrapi/.lib/codeBlocks -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -I/usr/lib/llvm-3.6/include -fmessage-length=0 -fexceptions -Winvalid-pch -fPIC -pthread -DcbDEBUG -DCB_PRECOMP -DWX_PRECOMP -Wall -std=c++11 -std=c++14 -D__GXX_EXPERIMENTAL_CXX0X__ -I/usr/include/codeblocks -I/usr/include/codeblocks/wxscintilla/include -I. -c /home/astrapi/.lib/codeBlocks/ClangLib-staging/clangproxy.cpp -o .objs/plugins/clanglib/clangproxy.o
--- End code ---
If not I will pass my way and took off my hat no problem, and take a litte tour on openclassroom or something :)
stahta01:
It is one line of the build log; but, it shows many possible problems!
You are likely using a different C++ Compiler then was used to build Code::Blocks; on Windows this will fail to work; not sure on Linux.
I have no idea what GCC C++ version was used to build Code::Blocks on your OS. ( I just realized this might be my issue on Linux.)
You have both "-std=c++11" and "-std=c++14" in it.
I question this "-D__GXX_EXPERIMENTAL_CXX0X__"; it could be valid or it might not be valid.
You do appear to be using wxWidgets 2.8; from "-I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8"
Tim S.
--- Quote from: astrapi on March 22, 2016, 12:19:04 am ---The build log is the input where g++ is shown isn't it ?
--- Code: ----------------- Build: ClangLib in clanglib (Unix) (compiler: GNU GCC Compiler)---------------
g++-5 /home/astrapi/.lib/codeBlocks -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -I/usr/lib/llvm-3.6/include -fmessage-length=0 -fexceptions -Winvalid-pch -fPIC -pthread -DBUILDING_PLUGIN -O3 -Wextra -Wall -std=c++0x -ansi /home/astrapi/.lib/codeBlocks -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -I/usr/lib/llvm-3.6/include -fmessage-length=0 -fexceptions -Winvalid-pch -fPIC -pthread -DcbDEBUG -DCB_PRECOMP -DWX_PRECOMP -Wall -std=c++11 -std=c++14 -D__GXX_EXPERIMENTAL_CXX0X__ -I/usr/include/codeblocks -I/usr/include/codeblocks/wxscintilla/include -I. -c /home/astrapi/.lib/codeBlocks/ClangLib-staging/clangproxy.cpp -o .objs/plugins/clanglib/clangproxy.o
--- End code ---
If not I will pass my way and took off my hat no problem, and take a litte tour on openclassroom or something :)
--- End quote ---
astrapi:
I install codeblocks from ppa:damien-moore/codeblocks-stable with apt-get, apt-get use g++
and I use in my program g++-5 (I should make a symbolic link to g++-5 to g++ maybe if it can make problem
to use different compiler).
I thought that it was normal to have -std=c++11 AND -std=c++14, so -std=c++14 is enough.
For "-D__GXX_EXPERIMENTAL_CXX0X__" it's something I found on internet, it is suppose to tell at he precompiler
how understand shared_ptr in purpose to have completion for it (for what I understand)
In your project I've replace "wx-config --libs/--cflags" by "wx-config --version=2.8 --libs/--cflags" for built it with the
same wxWidgets than my codeblocks but maybe if you are builting it for codeblocks with wxWidgets3.0 there are
some functions or differences that make some errors...
I don't know what I have to do, do I continue to try to built Yves or Tim S libclang ? (I'm sorry all this is new for me :compling myself, so I understand little step by little step)
I've tried to built https://github.com/yvesdm3000/ClangLib/tree/staging plugin without c++14 (I think it just need c++11) without g++-5 but g++, and without
-D__GXX_EXPREIMENTAL_CXX0X__ but I come the same errors :
--- Code: ---||=== Build: ClangLib in clanglib (Unix) (compiler: GNU GCC Compiler) ===|
||warning: /home/astrapi/Bureau: linker input file unused because linking not done| /// Because of my local variable the thing that I don't undersant what is for
/home/astrapi/.lib/codeBlocks/ClangLib-staging/clangproxy.cpp||In member function ‘void ClangProxy::RemoveTranslationUnit(ClTranslUnitId)’:|
/home/astrapi/.lib/codeBlocks/ClangLib-staging/clangproxy.cpp|760|error: use of deleted function ‘ClTranslationUnit& ClTranslationUnit::operator=(const ClTranslationUnit&)’|
/home/astrapi/.lib/codeBlocks/ClangLib-staging/translationunit.h|30|note: ‘ClTranslationUnit& ClTranslationUnit::operator=(const ClTranslationUnit&)’ is implicitly declared as deleted because ‘ClTranslationUnit’ declares a move constructor or move assignment operator|
/home/astrapi/.lib/codeBlocks/ClangLib-staging/clangproxy.cpp||In member function ‘void ClangProxy::GetFunctionScopes(ClTranslUnitId, const wxString&, std::vector<std::pair<wxString, wxString> >&)’:|
/home/astrapi/.lib/codeBlocks/ClangLib-staging/clangproxy.cpp|1762|error: no matching function for call to ‘make_pair(const wxString&, const wxString&)’|
/home/astrapi/.lib/codeBlocks/ClangLib-staging/clangproxy.cpp|1762|note: candidate is:|
/usr/include/c++/4.8/bits/stl_pair.h|276|note: template<class _T1, class _T2> constexpr std::pair<typename std::__decay_and_strip<_Tp>::__type, typename std::__decay_and_strip<_T2>::__type> std::make_pair(_T1&&, _T2&&)|
/usr/include/c++/4.8/bits/stl_pair.h|276|note: template argument deduction/substitution failed:|
/home/astrapi/.lib/codeBlocks/ClangLib-staging/clangproxy.cpp|1762|note: cannot convert ‘it.__gnu_cxx::__normal_iterator<_Iterator, _Container>::operator-><const ClFunctionScope*, std::vector<ClFunctionScope> >()->ClFunctionScope::scopeName’ (type ‘const wxString’) to type ‘wxString&&’|
||=== Build failed: 2 error(s), 10 warning(s) (0 minute(s), 32 second(s)) ===|
--- End code ---
Questions :
1) I've seen this include in your project : ../codeblocks-1510/src/include
and this one : ../codeblocks_src/src/include.
Me I just put /usr/include/codeblocks/ AND /usr/include/codeblocks/wxscintilla/include (because I don't understand
what else to put)
Did I again miss something ?
2) $(#CB_RELEASE_TYPE) is the global variable, I've see that it's in setting global variables cb-release-type that I
configure it, but I've always this linking undone.
What do I have to put in base ?
In include ? (/usr/include/codeblocks no ?)
In lib ? the place where is libcodeblocks.so no ?
3) maybe it will be easier if I built codeblocks (with wxWidgets3.0) myself with the same version as you've got ? (now I understand a bit more compilng stuff) ?
stahta01:
I would suggest self building Code::Blocks using wxWidgets 2.8 version already on your computer.
I would NOT install it; in other words skip the step "make install".
I will try to self build wxWidgets 2.8 and Code::Blocks; since I have failed to get the Plugin to work with wxWidgets 3.0 (It causes runtime crashes on CB startup.)
This will eliminate wxWidgets 3.0 as a possible cause.
--- Quote from: astrapi on March 22, 2016, 10:59:27 am ---3) maybe it will be easier if I built codeblocks (with wxWidgets3.0) myself with the same version as you've got ? (now I understand a bit more compilng stuff) ?
--- End quote ---
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version