Ian Taylor Ian.Taylor at noaa.gov
Fri Jun 18 16:50:14 PDT 2010

As a less advanced user of Emacs who started before Arni came up with 
the ADMB-IDE, I would add that Arni has taken some well chosen steps to 
make it easier for beginners to use. Whereas the default installation of 
Emacs has an idiosyncratic set of keyboard shortcuts and a confusing (to 
me) lingo to describe the commands that they perform, for the ADMB-IDE, 
Arni has enabled some common user access shortcuts: 

I bring this up because if you get into the practice of configuring the 
ADMB-IDE to speed it's use with C++ in general (which will not be hard), 
you should not be daunted by the array of information on the web that 
may seem confusing in comparison to the ease of using the program as 
configured. And when in doubt, ask Arni--it turns the sun will set in 
Iceland tonight, but not until after midnight.


Arni Magnusson wrote:
>> Can anyone let me know if I can run C++ code alone in the ADMB IDE or 
>> is the IDE more specific to ADMB applications? The reason that I ask 
>> is that I am new of ADMB and would like to use the IDE but also have 
>> separate C++ code projects.
> The answer is yes. Inside ADMB-IDE is the Emacs editor, and you can 
> definitely use Emacs to work with C++. ADMB-IDE also comes with the 
> GCC compiler for C++ and the GDB debugger, so in a way you're all set.
> Emacs is a powerful editor, but the default settings are silly. You 
> can configure it extensively, but here's how it works out of the box:
> ---
> Start ADMB-IDE and open an existing hello.cpp. Notice that the mode 
> line near the bottom of the frame says (C++/l Abbrev), and the code is 
> shown using helpful colors.
> Now run M-x compile [RET] (that's Alt-x compile enter). Emacs guesses 
> that you want to run
>   make -k
> but delete that and type
>   g++ -static -o hello hello.cpp
> or if you're a fast typist
>   g++ -s -static -Wall -o hello hello.cpp
> and press enter.
> The hello(.exe) executable is now ready. To run the executable from 
> within Emacs, do M-! hello [RET] (that's Alt-Shift-1 hello enter). The 
> minibuffer at the bottom of the frame should say "Hello world" if 
> that's what the hello.cpp program is supposed to do.
> ---
> Could that be any clunkier? The good news is that you can configure 
> Emacs to be exceedingly smooth and efficient. As a trivial example, 
> you could configure a personal "C++ hook" that lets f9 compile and f10 
> run the C++ program that you have open.
> You see, in each mode, be it ADMB, C++, or something else, Emacs looks 
> for your personal settings in so-called hooks. You can study a few 
> hooks in the .emacs file that comes with ADMB-IDE, and then study some 
> more starting from 
> http://admb-project.org/community/editing-tools/emacs/config.
> This takes years to learn, but it's a rewarding journey if you edit 
> text files every day and enjoy tinkering. Emacs has modes for all 
> major programming languages, sometimes with quite sophisticated tools, 
> and you can use the same working environment in all operating systems. 
> But I should also point out that there are many C++ IDEs that are more 
> beginner-friendly.
> Arni
> _______________________________________________
> Users mailing list
> Users at admb-project.org
> http://lists.admb-project.org/mailman/listinfo/users

More information about the Users mailing list