Other Help Topics :: gcc....problems...
I've never used it before, and I cant seem to get it to compile a simple program...
#include <iostream>
using namespace std;
int main()
{
cout << "Hello, world" << endl;
return 0;
}
Won't work with even a good old stdio.h & printf hello world, not a clue why. to compile im just typing in:
gcc hello.cpp
and getting stuff like "/tmp/ccT98qqb.o(.text+0x1b): In function 'main': undefined reference to std::cout....then a load of other similar errors. I am absolutely lost.
DSL had tcc compiler built-in..
Try this...
#include <tcclib.h>
int main(void)
{
printf("Hello World!\n");
return 0;
}
Let us know how it works for you.
If you wish to use gcc, try this..
Change your sources.list in /etc/apt from the stable branch to unstable.
Then, type ' apt-get install gcc g++ make '
There is also the kernelsources.dsl in the repository,
if you need those for your project..
73
ke4nt
tcclib.h: No such file or directory. I'm guessing there are some libraries I need to download so I can actually get cracking with some programming?
Neilo, try compiling your program with g++ instead of gcc. g++ is the c++ compiler; gcc is the c compiler. You should be ok then.
g++ -o hello hello.cpp
yay
its compiled, im too used to using m$ visual studio...
Next Page...
original here.