-
Junior Member
registered user
Please please help me :(
I really want to stop using suse and make knoppix my main distro but i really need to make this work in order to do it.
It has to do with c++ and executing source code.
I type ./a.out and the shell just sits there. It doesnt hang it just sits there looking pretty.
I run the program with the ddd option and executed it from ddd...execution window comes up and nothing shows up.
I used anjuta same thing. No compiler errors no warnings but it wont execute.
Checked the permisions (chnod755) of the file and its execute..tried with no execute from desperation,....same crap.
And yeah i got make.
As I said, during compile, NO ERRORS and NO WARNINGS. I demoted my self to a simple hello world program just to keep things simple.
Code:
#include <iostream>
using std::cout;
using std::endl;
using std::cin;
int main ()
{
int x;
cin >>x;
cout<< x<<endl;
return 0;
}
-
Senior Member
registered user
Re: Please please help me :(
--Try recompiling as ELF? (I know nothing about c++ but the kernels I build only support a.out as module, not compiled into kernel.)

Originally Posted by
estranged
I really want to stop using suse and make knoppix my main distro but i really need to make this work in order to do it.
It has to do with c++ and executing source code.
I type ./a.out and the shell just sits there. It doesnt hang it just sits there looking pretty.
I run the program with the ddd option and executed it from ddd...execution window comes up and nothing shows up.
I used anjuta same thing. No compiler errors no warnings but it wont execute.
Checked the permisions (chnod755) of the file and its execute..tried with no execute from desperation,....same crap.
And yeah i got make.
As I said, during compile, NO ERRORS and NO WARNINGS. I demoted my self to a simple hello world program just to keep things simple.
Code:
#include <iostream>
using std::cout;
using std::endl;
using std::cin;
int main ()
{
int x;
cin >>x;
cout<< x<<endl;
return 0;
}
-
Junior Member
registered user
-
Senior Member
registered user
--Not as lost as I am... 
' man g++ '
' /ELF ' (search for ELF)
-melf
Generate an executable in the ELF format, rather than the default mmo format used by the mmix simulator.
--It's a compiler flag that you can pass on the cmd line. But looking back in the man page, it's prolly not applicable for this instance. (shrug) Sorry.

Originally Posted by
estranged
ELF?
I am kinda lost
-
Junior Member
registered user
YAAAAAY..i fixed it.
It seems that when outputing gcc need the gnome-terminal and I didnt have it installed.
Now it works all nice and good.....one thing though i cant make the text show,,its there (i copied and pasted it to an editor) but even if i change the setting on the terminal the text is white
thanks though for answering my question i learned something new ELF :P
-
Senior Member
registered user
--that's very strange... You should be able to run the compiler AND the program from rxvt, xterm, or *text mode* for that matter without anything depending on gnome-terminal. But hey, as long as it works.

Originally Posted by
estranged
YAAAAAY..i fixed it.
It seems that when outputing gcc need the gnome-terminal and I didnt have it installed.
Now it works all nice and good.....one thing though i cant make the text show,,its there (i copied and pasted it to an editor) but even if i change the setting on the terminal the text is white
thanks though for answering my question i learned something new ELF :P

-
Junior Member
registered user
i know
I added alot of packages from apt-get.org.
Maybe something changed there...a path or something like that.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules

Compaq 242506-001 Netelligent 100 FDDI DAS Fiber SC PCI Network Adapter Vintage
$249.00

Vintage HP 21MX 1000 M-Series Minicomputer Chassis Backplane Parts AS-IS
$228.19

Lot of 2 Vintage Plextor PX-43CS SCSI CD-ROM Caddy Drives + 4 Caddies Used
$55.99

Vintage Apple iMac G4 15" Lamp 700MHz 512MB Mac OS X 10.4.6 W/ Pro Speakers
$300.00

Original Vintage Old Style STANDARD Black CD Jewel Case (Heavy Duty) 90g Lot
$316.95

Amiga Commodore A500 - Untested-For Parts or Repair - Vintage
$200.00

Vintage Intel SDK-86 8086 Microprocessor System Design Kit Evaluation Board
$599.00

Vintage Cubix A2870 + 2x A2310 QL 2286 Video Module ISA Boards 1989 Untested
$207.92

Vintage Teac FD-505 5.25" 3.5" Combo Drive 19307571-00
$199.99

VINTAGE COLLECTIBLE Comp USA Maxtor 20 GB 3.5 Inch EIDE Hard Drive NEW SEALED
$500.00