Tag Archives: CDT

Seedy Tea

Years ago, C and C++ were the “bread and butter” languages I used most often for my real work.  In my job, these former lingue franche have since been relegated to extension language status.  But extending (building Windows EXEs and user exit DLLs that call out to C APIs) was one of today’s todo’s, so I was back in the C coding saddle again.

Visual C++ is my trusty default tool, but for this task, I was free to use the GNU compilers.  And that brought the opportunity to use the Eclipse CDT (C/C++ Development Tooling) for the first time.  I use Eclipse for many other languages now, so why not?  A quick install from the Helios site (Help -> Install New Software) got me started.

I already had the Cygwin GNU C tools: gcc, gdb, make, etc.  But since I needed to build standalone stuff with no Cygwin runtime pre-reqs, I installed MinGW from the Wascana project.  By adding these through Eclipse, it automatically set up my environment to use the MinGW toolchain.

After launching into code, I soon faced a variety of weird errors; for example, just trying to launch my program (Run->Run As->Local C/C++ Application) resulted in: Launch failed.  Binary Not Found.  After poking around, I found that the Build Artifact settings were configured for an oddly-named unix library.  I changed them as follows:

  • Artifact Type:  Executable
  • Artifact name: ${ProjName}
  • Artifact extension: exe
  • Output prefix:    (empty)

I left the object file suffixes as the unix-like .o‘s rather than Windows .obj‘s, since that didn’t really matter. It would be nice if the CDT were more Windows-aware when it came to default settings.  “When in Rome,” dontchaknow.

After getting past the initial problems, I found that coding, running, and debugging was very, well, Eclipse-like: a good thing.  I have more to do, and will probably encounter more hiccups, but I’m determined now to finish this cup of CDT.