Page 1 of 1

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

Posted: Fri May 27, 2011 7:00 pm
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:

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

Posted: Sat May 28, 2011 7:52 am
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

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

Posted: Tue May 31, 2011 6:10 pm
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.

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

Posted: Wed Jun 01, 2011 2:20 pm
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