LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices

Reply
 
Search this Thread
Old 01-27-2005, 03:56 AM   #1
NL-Stitch
Member
 
Registered: Jul 2004
Posts: 75

Rep: Reputation: 16
programming c++ in emacs , compiling


i want to start with programming. i downlaoded emacs and insatlled it on a windows box.i made the hello world program and compiled it with emacs. it doesn't work because the output is a .el file.
i know this is a programming question but i thought it was a nooby question so..

so i downlaoded a c++ editor for windows and a compiler named bloodshed dev. i tried it but it can't get it .. now im a bit confused.
can somebody tell me how-to use emacs for c++ howto compile and howto run the program?like can you run .el file by just typing sh <filename>.el ?
 
Old 01-27-2005, 04:15 AM   #2
friend3141
Member
 
Registered: Jan 2005
Posts: 34

Rep: Reputation: 15
Are you sure compiling & linking was succesful?
because I don't think you can make a c++ source code to .el

You are talking about emacs for windows right?
There will be an option where you can configure the external compiler & linker.
Configure it to a c++ compiler & linker.
 
Old 01-27-2005, 04:38 AM   #3
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
.el files are not executable binaries; they are Emacs Lisp files.

Emacs by itself does not compile C++ code. It can be configured to execute a compiler using the pull-down menus (like friend3141 mentioned). Emacs is just the editor in the same way that Windows Notepad can be used to write C++. You need another program (the compiler and linker) to turn the C++ code you write in emacs into an executable.
 
Old 01-27-2005, 04:45 AM   #4
NL-Stitch
Member
 
Registered: Jul 2004
Posts: 75

Original Poster
Rep: Reputation: 16
could someone the recommend me a program to edit c++ in and another to compile it in ? i'm going to use linux soon so linux programs would be a good choiche

spoken of choice.. is learning c++ more helpfull then other languages . if not. wich language shall i choose ?
 
Old 01-27-2005, 04:59 AM   #5
elsheikhmh
Member
 
Registered: Aug 2004
Location: Cairo, Egypt
Distribution: Slackware
Posts: 101

Rep: Reputation: 15
i think u could use an IDE (integrated development environment) = an editor + compiler + debugger + integrated help ..
it will be better for u
if u r going to use linux, and C++ then KDE's KDevelope may be best for u.

,,
mustafa

mustafa
 
Old 01-27-2005, 05:02 AM   #6
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
You can edit C++ files in emacs. That's perfectly fine.

You can use the C++ compiler that the GNU foundation provides for Windows: DJGPP
 
Old 01-27-2005, 05:23 AM   #7
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
what problem did you have with Dev-c++?
 
Old 01-27-2005, 05:37 AM   #8
NL-Stitch
Member
 
Registered: Jul 2004
Posts: 75

Original Poster
Rep: Reputation: 16
error 2091

could not load c:emacs/2
 
Old 01-27-2005, 05:53 AM   #9
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
you were having that problem with Dev-c++?

anyway, Dev-c++ uses the gnu tools for compiling (what you will be using if you decide to try linux later on) and is a decent IDE (not too bad, especially for the price ).
 
Old 01-27-2005, 09:58 AM   #10
kornerr
Member
 
Registered: Dec 2004
Location: Russia, Siberia, Kemerovo
Distribution: Slackware
Posts: 893

Rep: Reputation: 35
Some basic info for a linux programmer: www.advancedlinuxprogramming.com (or .org, can't remember). This site has a programming forum too
____________
Every Linux editor is optimised for writing codes (cpp, html, pas...).
I use KWrite.
 
Old 01-27-2005, 12:56 PM   #11
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,985
Blog Entries: 11

Rep: Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879
Moved: This thread is more suitable in General (no, it does NOT deserve to go in programming since it's about someone who doesn't even know the first thing about using windows) and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 01-27-2005, 06:41 PM   #12
microsoft/linux
Senior Member
 
Registered: May 2004
Location: Sebec, ME, USA
Distribution: Debian Etch, Windows XP Home, FreeBSD
Posts: 1,445
Blog Entries: 9

Rep: Reputation: 45
www.cprogramming.com is a good site for beginners, I've read through it all, and still don't exactly understand. Under linux I use vi and g++, in windows I use Dev-C++(mentioned above), they both seem to work well
 
  


Reply


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
Compiling C with Emacs sdpeelejr Programming 9 04-07-2004 10:47 PM
What packages do I need to install to start programming in emacs? O_o Linux - Newbie 7 11-10-2003 03:04 AM
compiling in emacs blacbastard Programming 7 07-03-2003 11:10 PM
compiling in emacs blacbastard Linux - Software 1 07-02-2003 08:59 PM
Compiling in emacs blacbastard Linux - Software 0 07-02-2003 06:53 AM


All times are GMT -5. The time now is 05:17 PM.

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