Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 09-20-2005, 11:21 PM   #1
Registered: Dec 2003
Location: Long Beach, CA
Distribution: haven't settled on one.
Posts: 251

Rep: Reputation: 30
what software turns c++ code into working application?

I'm in a c++ class at my school where we are using microsoft visual studio .net to compile and run c++ code that we write. How can I do this in linux?

I tried
g++ test.cpp -o test
and nothing really happened. Did "test.cpp" compile? If it did, how and where can I run the object-code from the command line?

Old 09-20-2005, 11:30 PM   #2
Mega Man X
LQ Guru
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 65
By yours "nothing really happened", I believe that once you ran the above command, you were brought back to an empty command line right? So then I would assume that your code was compiled successfully.

The executable is called test and should be on the same place where test.cpp is. You should be able to run it with ./test. The "./" means "this" folder. You may need to convert the "test" into an executable file first (though, I doubt this is your problem). That is done with:

chmod +x test

Old 09-20-2005, 11:31 PM   #3
Senior Member
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 51
That should have created an executable named "test" in the same directory that you can run with "./test"
Old 09-20-2005, 11:32 PM   #4
Registered: Dec 2003
Location: Long Beach, CA
Distribution: haven't settled on one.
Posts: 251

Original Poster
Rep: Reputation: 30
thanks that's just what I needed. This last bit of infor should be added to the tutorial here in linuxquestion.

thanks megaman x
Old 12-31-2005, 03:51 AM   #5
Registered: Jan 2005
Location: Melbourne
Distribution: Debian
Posts: 42

Rep: Reputation: 15
Thankyou from me as well, just the answer I was looking for...


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Install application from source code UltraSoul Linux - Software 2 07-29-2005 01:23 PM
creating desktop application with same xterm code degraffenried13 Linux - Newbie 3 05-28-2005 01:52 PM
Application software gardenair Linux - Newbie 1 11-21-2004 09:48 PM
Software application KNOPPIX redbiro Linux - General 2 04-15-2004 12:41 PM
Software application KNOPPIX redbiro Linux - Hardware 1 04-15-2004 12:18 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:15 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration