Page 1 of 1

C builds, C++ says successful but does nothing

Posted: Sat Jun 04, 2011 6:46 pm
by brian
I hated putting this post in here but I could not find anything related to this topic and it was impossible to search for it and get results that are meaningful.
I have a set of C and C++ library projects that build successfully on Windows using Visual Studio.
Now I make the scary leap into Linux as a complete Linux newbie after being spoiled by having 1000s of trivial tasks automatically done for you on Windows.
So I check the web and see CodeLite is one potential means of easing the pain of transition to Linux (its a lot harder for us near-60 year old guys to remember the nitty gritty of all those command line sequences needed on Linux)
So using VirtualBox with Fedora15-64 Gnome 3 on a Win7-64 host I THINK I have successfully installed CodeLite.
Do a git for my library C and C++ source files
Open CodeLite; basic project and workspace constructs looks pretty similar to VS so things are looking good.
Create a workspace and create a new project for a static library. Source code is all C. Compiler is set to gcc and g++.
Go for the build ... and it WORKS!! I get a Linux static library. WHOW! Put together that project in just a few minutes. This looks REALLY great; maybe I can avoid the terror of 'make' and 'autoreconfig' and typing in all those paths and stuff and never getting it right.
Do the same for two more C-based projects with equal success.
Now I do the same for the first C++ based library. Load all the src and header files in the same way, click build, and the result is 'build successful'.
But wait! That took NO time. On Windows that build took more than 2 minutes. So I check, no object files, no library.
NOTHING happened, but successful was reported. WHAT DID I DO WRONG? {There is a lot use std container use like std::vector<> etc. in the C++ code}

Re: C builds, C++ says successful but does nothing

Posted: Sun Jun 05, 2011 2:02 pm
by DavidGH
Hi Brian,
the nitty gritty of all those command line sequences needed on Linux
Needed 10 or 15 years ago, certainly. Nowadays they're still there if you want to use them (once mastered, they're usually the easiest way of doing complex tasks) but there are plenty of high-level gui substitutes (e.g. file managers rather than using mv or cp on the command-line).
NOTHING happened, but successful was reported.
Have a look in the 'Build' pane of the Output View. When a build finishes, CodeLite (wrongly IMHO) switches automatically to the 'Errors' pane. Useful information should be in 'Build'...

One possibility is that you have the gcc package installed, but not the gcc-c++ one, which (obviously) isn't needed for C compilation.

Regards,

David

Re: C builds, C++ says successful but does nothing

Posted: Sun Jun 05, 2011 2:53 pm
by brian
David,

You were right. Looking at the 'Build' window shows that I have no g++. But even a bigger help was the fact that the information I needed was IN the Build window and that there was a quick switcheroo pulled. I DID see a quick flash of something but it was so quick, I never knew what it was. I simply thought the information was deleted (not that there was a window switch). I looked for some build log but could not find one. (Doesn't mean there isn't one, I just don't know where it might be yet.)

I thought I had g++ installed (that it came in the gcc package) and that IF I didn't have it the result would not have been 'build successful'. So I was barking up the wrong tree. I figured it was more likely some configuration issue; PATHs and ENVIRONMENT variables and those buddies.

So big thanks for that clue. I don't think I would have ever guessed my way out of this one. Now I just need to find and install g++. Apparently there is no 'yum' package (perhaps there is but it is not called 'g++'). Due to the build error message I also know where it is to go so I will know if it gets successfully installed.

Re: C builds, C++ says successful but does nothing

Posted: Sun Jun 05, 2011 5:56 pm
by eranif
brian wrote:You were right. Looking at the 'Build' window shows that I have no g++. But even a bigger help was the fact that the information I needed was IN the Build window and that there was a quick switcheroo pulled. I DID see a quick flash of something but it was so quick, I never knew what it was. I simply thought the information was deleted (not that there was a window switch). I looked for some build log but could not find one.
'Settings | Build Settings | Build output and appearance' and uncheck the option "Always show errors pane after build"

Eran

Re: C builds, C++ says successful but does nothing

Posted: Sun Jun 05, 2011 7:10 pm
by DavidGH
Apparently there is no 'yum' package (perhaps there is but it is not called 'g++')
I think you'll find it's called gcc-c++.

@Eran:
'Settings | Build Settings | Build output and appearance' and uncheck the option "Always show errors pane after build"

Eran
How about changing the default to false? That used to be the behaviour until a few months ago, and (again IMHO) to have the error pane shown by default causes much more confusion than it's worth.

Re: C builds, C++ says successful but does nothing

Posted: Sun Jun 05, 2011 7:13 pm
by eranif
DavidGH wrote:How about changing the default to false?
Indeed, it makes more sense

Eran

Re: C builds, C++ says successful but does nothing

Posted: Sun Jun 05, 2011 11:36 pm
by DavidGH
Done! :)