long compiler messages get cut off

General questions regarding the usage of CodeLite
Modem Man
CodeLite Enthusiast
Posts: 28
Joined: Tue Sep 11, 2012 11:50 am
Genuine User: Yes
IDE Question: C++
Contact:

long compiler messages get cut off

Post by Modem Man »

Hi all,

Please see my update on this isue, I have new informations!

in multiple of my projects, the compiler gives very long result messages on errors. For instance this one (scroll the graphic in both directions, to see my notes on the arrows):
cl9_cutoffcompilermessage.PNG
As you see, there is indeed a horizontal scroll bar on the Build output window, but CodeLite seems to not got all columns from the MinGW compilers output.

Without scrolling, we see:

Code: Select all

 ... blah-blah ..... as 'this' argument of 'std::basic_string<_CharT, _Tr
after full scrolled to the right, we see:

Code: Select all

 ... blah-blah ..... as 'this' argument of 'std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT,
As you see, the important part can't ever be seen. Because the Build output window has a horizontal scroll bar, but this only scrolls to half the full message.

The full message can only be seen by using the "Paste Build Output into an empty Editor" button:

Code: Select all

 ... blah-blah ..... as 'this' argument of 'std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT,
_Traits, _Alloc>::operator=(const std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = wchar_t; _Traits = std::char_traits<wchar_t>; _Alloc = std::allocator<wchar_t>]' discards qualifiers [-fpermissive]
This is a :cry: workaround, right. But it stops good development performance.

That's why I played a bit with the CMD shell, that is called from within CodeLite. CodeLite is calling my Compiler with:

Code: Select all

C:\Windows\system32\cmd.exe /C D:/c/MinGW-4.9.2/bin/mingw32-make.exe -j4 SHELL=cmd.exe -e -f  Makefile
and this cuts the very long messages. Not really cut, but line break a way, it never comes into the Build output pane of CodeLite

Now I tried some different: "mode con: cols=1024 lines=43".
if I would find a place where I can say "call my compiler shell with:..."

Code: Select all

C:\Windows\system32\cmd.exe /C  mode con: cols=1024 lines=43 && 
which will result in:

Code: Select all

C:\Windows\system32\cmd.exe /C  mode con: cols=1024 lines=43 && D:/c/MinGW-4.9.2/bin/mingw32-make.exe -j4 SHELL=cmd.exe -e -f  Makefile
this could fix the problem entirely, right?

So I navigated to "Settings | Editor Settings | Terminal" and found "Enter here the command to be used by CodeLite for launching consoles:" ... but this is disabled in 9.0.1 :cry: :cry: :cry:

What is the trick to get the full length compiler message within the scroll range - or as a tool tip?
Please help ...

Thank you all in advance!
MM
You do not have the required permissions to view the files attached to this post.
Modem Man
CodeLite Enthusiast
Posts: 28
Joined: Tue Sep 11, 2012 11:50 am
Genuine User: Yes
IDE Question: C++
Contact:

[update] long compiler messages get cut off (wxWidgets issue

Post by Modem Man »

Hi,

I played around with this issue a bit more, and now I believe that Eran can fix it easily. To better understand it, follow these steps:
  • write any code that will fail compiling with a quite long message
  • press compile
  • open the Build output pane
  • see the horizontal scroll bar slider, move it
  • confirm, this is not showing the full content of the long message
  • put the active "cursor" like line to this cut-off message (*)
  • press "END" key, while having an eye on the horizontal scroll bar slider
  • confirm, the message is not longer cut off, the slider now respects the aspect between viewpart and max line length
used: Win7ulti, 1920x1080 resolution, official 9.0.1 release for windows from sourceforge, compiler doesn't matter, but it was MinGW-4.9.2.

So finally, this seems to be just an wxWidgets horizontal "calibration" problem. One could try it with this non-sense test code (the pragma must be given in one single line):

Code: Select all

int main(int argc, char **argv)
{
#  define STRINGINIZE_HELPER(x) #x
#  define STRINGINIZE_THIS(x) STRINGINIZE_HELPER(x)
#  if defined(__MINGW32__) || defined(__GNUC__)
#    define __TODO__  "ToDo: "
#  else // MSVC++
#    define __TODO__ __FILE__ "("STRINGINIZE_THIS(__LINE__)") : ToDo: "
#  endif
#  define __DUMP(x)  ""#x"="STRINGINIZE_THIS(x)""
#  define __VALUE(x) ""STRINGINIZE_THIS(x)""
#  pragma message( __TODO__ "I am compiling this under the following GCC compiler:" __VALUE(__GNUC__) "." __VALUE(__GNUC_MINOR__) "." __VALUE(__GNUC_PATCHLEVEL__) " and " __DUMP(__BYTE_ORDER__) " and " __DUMP(__BIGGEST_ALIGNMENT__) " and " __DUMP(__cdecl) " and " __DUMP(__CHAR_BIT__) " and " __DUMP(__CHAR16_TYPE__) " and " __DUMP(__CHAR32_TYPE__) " and " __DUMP(__cplusplus) " and " __DUMP(__FLOAT_WORD_ORDER__) " and " __DUMP(__FLT_EPSILON__) " and " __DUMP(__DBL_DECIMAL_DIG__) " and " __DUMP(__DBL_DENORM_MIN__) " and " __DUMP(__DBL_EPSILON__) " and " __DUMP(__GCC_HAVE_DWARF2_CFI_ASM) " and " __DUMP(__GXX_ABI_VERSION) " and " __DUMP(__GXX_RTTI) " and " __DUMP(__INT64_MAX__) "AND THIS IS REALLY THE END OF THE LINE!!" )
return NonexistentVar;
}
(*) if you retry this with the pragma output, instead of a lengthy compiler error, you need to set the cursor onto the line that does NOT contain the "main.cpp:10:717: note: #pragma message:" and the resolved macros. Instead, you need to place the highlighted line onto the line that repeats the raw content of the pragma message. Then press the "END" key on the keyboard.

Hope that brings us more near to the fix...
MM
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: long compiler messages get cut off

Post by eranif »

This was already reported and fixed on GitHub https://github.com/eranif/codelite/issues/980


Eran
Make sure you have read the HOW TO POST thread
Modem Man
CodeLite Enthusiast
Posts: 28
Joined: Tue Sep 11, 2012 11:50 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: long compiler messages get cut off

Post by Modem Man »

eranif wrote:... already reported and fixed
Eran
great, thx!
Post Reply