Installation glitches & lack of error messages

General questions regarding the usage of CodeLite
robinwhittle
CodeLite Enthusiast
Posts: 14
Joined: Sat Mar 26, 2011 4:22 pm
Genuine User: Yes
IDE Question: C++
Contact:

Installation glitches & lack of error messages

Post by robinwhittle »

Code: Select all

Hello Eran and other Developers,

Thanks very much for CodeLite - I am looking forward to using it 
for C++ on Linux.

Here is my experience as a complete newbie installing CodeLite 
and getting a successful executable according to the 
instructions, including:

  http://codelite.org/LiteEditor/QuickStart

This may help other newbies and may enable you to alter the 
program or the documentation to avoid some of the problems I 
encountered

My machine is a P4 freshly installed with 64 bit Debian 6.0 
squeeze.  I don't recall what I selected when I installed it, 
but I didn't request that GCC and other development tools be 
installed.

After an evening researching "IDE Linux C++" I tentatively 
concluded that Code::Blocks and CodeLite were the most promising 
of the FOS IDEs - since I surmised that Eclipse's support for 
C++ was not very strong, and was probably not very specific to 
C++ on Linux.   

Since CodeLite was available from Synaptic, I installed it 
(2.6.0.4189) together with the required package 
"codelite-plugins".  Here is the list of packages which I 
needed to install with CodeLite:


binutils             2.20.1-16
codelite             2.6.0.4189~dfsg-1
codelite-plugins     2.6.0.4189~dfsg-1
g++                  4:4.4.5-1
g++-4.4              4.4.5-8
gcc                  4:4.4.5-1
gcc-4.4              4.4.5-8
gdb                  7.0.1-2+b1
gdbserver            7.0.1-2+b1
libc-dev-bin         2.11.2-10
libc6-dev            2.11.2-10
libstdc++6-4.4-dev   4.4.5-8
linux-libc-dev       2.6.32-31
manpages-dev         3.27-1
qt4-qmake            4:4.6.3-4
wx-common            2.8.10.1-3+b1 

CodeLite appeared in the Gnome "Applications > Programming"
menu, and I ran it.  Codelite told me I should download a 
later version.  This fired up Epiphany, which crashed for 
some unknown reason.  I tried a few times, and eventually 
got it to run and download a single .deb file.  I tried 
installing this with:

   dpkg -i codelite_2.9.0.4684-ubuntu0_amd64.deb

This failed due to the presence of the codelite-plugins 
package.  I wondered if I should have downloaded a new 
version of this package, but since I couldn't find one, I 
used Synaptic to remove it.  Then I could install the 
2.9.0.4684 version.  I later found that it included a 
bunch of plugins, so I guess there is no longer a separate 
plugins package.

So now I thought I was ready to rumble . . . 

I followed the QuickStart instructions exactly and after 
adding my own text in line 37 of baz_frame.cpp I proceeded to 
"Build > Build project".

In the bottom right window I got a nice green "Build ended 
successfully" message.  I tried "Build > Run" and there was an 
error due to the executable not existing.  Sure enough, there 
was no executable file.  

At this point, it is possible that I and other newbies could 
become seriously stuck.

Thanks to this forum, I found a message:
  
  Viewing compiler output
  http://codelite.org/forum/viewtopic.php?f=11&t=1234

in which you instructed the original poster:

    You need to "unlink" between the two views: the 
    "Errors" and the "Build" views.  To unlink them:
    Navigate to: 

    Settings | Build Settings | Build Output Appearance     

    and un-tick the option "Always show the error pane 
    after build"

I did this and retried "Build > Rebuild project".

Now I could see an error message - there was no "make" 
program . . . 

I used Synaptic to install make 3.81-3 and rebuilt the 
project again.  This lead to more action, but a bunch of 
errors which I figured were due to missing wxwidgets 
header files.  Without too much thought, I searched for
"wxw" in Synaptic and found that I had these (and perhaps
others) installed:

  libwxtgt2.8-0  2.8.10.1-3+b1
  wx-common   2.8.10.1-3+b1

Without much detailed knowledge of header files and the 
like, I decided to install:

  libwxbase2.8dev
  wx2.8-headers

The result was the following packages:

wx-common          2.8.10.1-3+b1
wx2.8-headers      2.8.10.1-3+b1

libwxtgt2.8-0      2.8.10.1-3+b1
libwxtgt2.8-0-dev  2.8.10.1-3+b1

libwxbase2.8       2.8.10.1-3+b1
libwxbase2.8dev    2.8.10.1-3+b1

Now I almost succeeded - "Build > Rebuild project" worked 
without errors.

However, I couldn't use "Build > Run" because it was greyed 
out.  I eventually used "Build > Stop" and then I could use 
"Build > Run".  A text window appeared and spawned a bare-
bones GUI-style application window, with my own personal 
text in the bottom bar.

These headaches are typical when using a program for the 
first time.  Perhaps if you alter package dependencies and 
make the error messages always visible by default, other 
newbies might have a smoother time learning how to use 
CodeLite.

BTW, in the Forum text of terms and conditions, the name 
of the forum was missing, and the confirmation email was 
titled:    Welcome to ""

  Cheers  - Robin   
robinwhittle
CodeLite Enthusiast
Posts: 14
Joined: Sat Mar 26, 2011 4:22 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Installation glitches & lack of error messages

Post by robinwhittle »

Code: Select all

BTW, every time I run CodeLite, it starts with a warning dialogue:

  Impossible to get child process input (error 4: Interrupted 
  system call) 

Next I tried to change the workspace view to Debug, hoping to try
setting a breakpoint in the program.  There were a bunch of errors 
due to a missing wx/app.h, preceded by some very helpful messages:

  Warning: No config found to match: /usr/bin/wx-config --cxxflags 
  --unicode=yes --static=no --universal=no --debug=yes 
  in /usr/lib/wx/config

  If you require this configuration, please install the desired
  library build.  If this is part of an automated configuration
  test and no other errors occur, you may safely ignore it.
  You may use wx-config --list to see all configs available in
  the default prefix.

So in Synaptic, I selected for installation:

  libwxbase2.8-dbg    2.8.10.1-3+b1

With "Build > Rebuild project" there were no errors such as the 
above, but the first of a long list of errors was:

  make[1]: Entering directory `/###/baz'

    g++ -c  "/###/baz/baz_app.cpp" -g  -I/usr 
    /lib/wx/include/base-unicode-debug-2.8 -I/usr/include/wx-2.8 
    -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXDEBUG__ -DwxUSE_GUI=0 
    -pthread -D__WX__  -o ./Debug/baaz_app.o "-I." 

  In file included from /usr/include/wx-2.8/wx/window.h:23,
                 from /usr/include/wx-2.8/wx/toplevel.h:21,
                 from /usr/include/wx-2.8/wx/frame.h:19,
                 from /audio/cpp/codelite-1/test1/baaz/baaz_frame.h:4,
                 from /audio/cpp/codelite-1/test1/baaz/baaz_app.cpp:5:
  /usr/include/wx-2.8/wx/cursor.h: In constructor   
  ‘wxBusyCursorSuspender::wxBusyCursorSuspender()’:
  /usr/include/wx-2.8/wx/cursor.h:65: error: ‘wxIsBusy’ was not 
  declared in this scope
  /usr/include/wx-2.8/wx/cursor.h:67: error: ‘wxBusyCursor’ has not 
  been declared

I figure this is something to do with inner workings of wxwidgets 
libraries.  Since I am only planning on writing command-line programs
I abandoned this program and tried to make a simple command-line 
program based on:

  http://codelite.org/LiteEditor/HelloWorld

  > From the main menu bar go to the 'Workspace' menu and select the 
  > entry 'Create New Project'.

I started with no workspaces in the left column, and Workspace View 
set to "Debug".  Then I created a fresh workspace, with this new 
project within it.  The command is just "New Project".

  > In the 'New Project' dialog that came up, select the 'Console' 
  > category 

OK - I did this and selected from the resulting list "Simple 
executable (g++)".

F7 (Build > Build project) builds it without errors.  There's an 
executable program in the /Debug/ subdirectory of the project 
directory.

Running this manually, it emits "hello world".  So far so good!  
I added a few lines of code and this was fine too.

I used F9 (Debug > Toggle breakpoint) on one of my new lines.  Then 
F5 (Debug > Start/Continue Debugger) and . . . the program ran, 
emitted some lines, stopped as planned - and I could step it to the 
next line.

Very cool.  Thanks again!

  - Robin
DavidGH
CodeLite Plugin
Posts: 819
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: Installation glitches & lack of error messages

Post by DavidGH »

Hi Robin,
This failed due to the presence of the codelite-plugins
package.
You had the official debian binary installed, which comes in two packages. You then upgraded to our, unofficial, deb which comes in just one. The initial failure to install is intentional, to prevent conflicts between the two.
Here is my experience as a complete newbie installing CodeLite
and getting a successful executable according to the
instructions, including:
http://codelite.org/LiteEditor/QuickStart
This may help other newbies and may enable you to alter the
program or the documentation to avoid some of the problems I
encountered
Thanks. I've added a bit to http://codelite.org/LiteEditor/Download, about needing 'make' and probably libwxgtk-dev.
Without much detailed knowledge of header files and the
like, I decided to install:
libwxbase2.8dev
wx2.8-headers

...

With "Build > Rebuild project" there were no errors such as the
above, but the first of a long list of errors was:
/usr/include/wx-2.8/wx/cursor.h:65: error: ‘wxIsBusy’ was not
declared in this scope
You only properly installed wxBase. You needed the libwxgtk2.8-dev package too for a gui app. However as you're only interested in writing command-line programs...
Perhaps if you make the error messages always visible by default
I'm inclined to agree, but what do other people think?

Thanks for making the post: a view from a fresh pair of eyes is always useful.

Regards,

David
Post Reply