Advertisement

Linux and g++

Started by July 28, 2000 07:50 AM
3 comments, last by NeRo 24 years, 4 months ago
I am new to a linux environment, and haven''t ever used g++. When I compile using g++ file.cpp i get a single file named a.out*. Is that my obj code (looks like it in vi)? How do I link and run that? If I try to run that i get a segmentation error.
|============================|| Things Smell VERY different|| to a midget in an elevator||============================|
type:
./a.out
Advertisement
That''s what gave me the segmentation error!
|============================|| Things Smell VERY different|| to a midget in an elevator||============================|
a.out is the final executable. Adding the -o flag, like g++ test.cpp -o test, will let you set what it is named. I hate to say it but the segfault is a problem in your code.

I''m not the same anonymous poster. I really should register some time...
Cool... not that I am going to use it exclusively, but I''d like knowing how.
|============================|| Things Smell VERY different|| to a midget in an elevator||============================|

This topic is closed to new replies.

Advertisement