0

My knowledge and experience in programming is still very fresh and basic, so please bear with me.

I want to be able to use C++ on my MacBook (OS 10.9.5 Mavericks) via Eclipse, which I have already been using for Java previously.

So I followed the instructions in Eclipse GDB MacOSX Mavericks to get GDB, but now I still need the GDB command file (.gdbinit), which I can't find anywhere (I tried which .gdbinit on Terminal to no avail).

Please help me.

Community
  • 1
  • 1
Harmony
  • 3
  • 1
  • 3

1 Answers1

0

.gdbinit is a configuration file. You won't have one unless you've downloaded one or written one separately. It goes in your home directory and just contains a list of commands to run on startup. You don't necessarily need one. See this answer: .gdbinit file missing

However, if you are fairly new to programming, I'd suggest starting with Xcode, Clang and LLDB on the Mac for C++ rather than Eclipse, GCC and GDB. It's far easier to get setup, and well documented.

See:

How do I set up a C++ project in Xcode 4?

Community
  • 1
  • 1
JCx
  • 2,689
  • 22
  • 32
  • Thanks for your help!! The debugger does run without the .gdbinit file, but I get some weird error warning messages in the console as it debugs so I thought it might have something to do with the .gdbinit file. I'll give Xcode a try. – Harmony Mar 22 '15 at 15:02
  • Xcode is definitely an easier starting point. More coding, less worrying about the tools. :) – JCx Mar 22 '15 at 15:53
  • Very true, I only just installed Xcode and it was really easy to set-up and use. Thanks very much. – Harmony Mar 23 '15 at 09:56