I want to have a c++ hello world program not c

General questions regarding the usage of CodeLite
josheeg
CodeLite Curious
Posts: 2
Joined: Fri May 27, 2011 6:56 pm
Genuine User: Yes
IDE Question: c++
Contact:

I want to have a c++ hello world program not c

Post by josheeg »

I want to have a c++ hello world program not c.
I am more comfortable with c but I am trying to compile ALGLIB.
I tried compiling it by putting the cpp and .h source files of ALGLIB in with the hello world c exmaple but it requested c++ headers or libraries. So now I guess I have to find how to start a C++ project not C to try to compile it. :mrgreen: :geek: :ugeek:
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: I want to have a c++ hello world program not c

Post by eranif »

Your post is unclear.

If you have some build errors, please follow the instruction from this post, and post all relevant information:

http://codelite.org/forum/viewtopic.php?f=3&t=804

Eran
Make sure you have read the HOW TO POST thread
josheeg
CodeLite Curious
Posts: 2
Joined: Fri May 27, 2011 6:56 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: I want to have a c++ hello world program not c

Post by josheeg »

Hi
I used the newest stable CodeLite version with ubuntu 11.04
I added all cpp libraries until the dataanalisis.cpp header compiled.
then commented out cpp libraries till it wouldn't compile and went back through the list until I had the minimum header .cpp files and dataanalisis.cpp compiled. I wanted to use the LDA subpackage.
The program is currently the hello world example using g++ under gcc c.
So I assume that is gcc c's c++ compiler.
I tried diferent compiler options -o3 -os seperately.
The results are 1.4meg and 1.7meg result files.
Would this be able to be compiled smaller to get the lda subpackage to work?
So first I added the 3 or so example headers sugjested and that didn't work then I added all the .cpp files till it worked.
Should I add the .h files instead to make the lda subpackage to work and compile smaller.
DavidGH
CodeLite Plugin
Posts: 819
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: I want to have a c++ hello world program not c

Post by DavidGH »

Hi,
using g++ under gcc c. So I assume that is gcc c's c++ compiler
Yes indeed.
The results are 1.4meg and 1.7meg result files.
So, tiny by modern standards :) .
So first I added the 3 or so example headers sugjested and that didn't work then I added all the .cpp files till it worked.
Should I add the .h files instead to make the lda subpackage to work and compile smaller.
Unless I'm failing to understand your post correctly, these are C/C++ questions, and not to do with CodeLite itself. But generally, you need to supply all the necessary code for ALGLIB to compile. It matters little (I expect it doesn't matter at all, but I'm not an expert) whether you put that code in cpp or h files: it will still build to much the same size.

Regards,

David
Post Reply