Author Topic: Simple SlickEdit + Cygwin GCC integration?  (Read 12900 times)

Mike H

  • Community Member
  • Posts: 25
  • Hero Points: 3
Simple SlickEdit + Cygwin GCC integration?
« on: March 11, 2009, 05:11:09 am »
I'm looking for the best way to obtain a simple, reliable, and stable development environment using SlickEdit integrated with GNU GCC.  Can someone give me the "easy" steps?  I did a lot of searching in the forums and tried a lot of different tricks but can't get a 100% working solution.
Here is the context:
1.  I want to build and debug C programs for Windows (i.e. i386) from within SE.  I'd prefer to use the SE project option where
     SlickEdit generates/maintains the makefile so I don't have to create/maintain one.
2.  I'm running on Win XP (also like to do this on my Vista PC as well - if possible).
3.  I have the base Cygwin package + GCC + GDB installed on my PC.

I thought this integration would be easy, but for me it is not.  Here are some things that are confusing me so maybe someone can clear these up:
- should I use cmd.exe as the build shell or bash? (and if bash, how is this done)
- should I use the GDB that shipped with SE or the one downloaded from cygwin?
- I see references to MinGW in the forums - should I be using that vs. GCC?

Actually I'm not partial to CYgwin GNU GCC.  I just need a free, reliable C compiler that integrates well into SlickEdit.  So if there is another alternative, I'll use that.

thanks for the help!
Mike

pvonkaenel

  • Senior Community Member
  • Posts: 211
  • Hero Points: 6
Re: Simple SlickEdit + Cygwin GCC integration?
« Reply #1 on: March 11, 2009, 11:10:31 am »
I use the Visual Studio integration which is really good: SE can open solution files so no Makefiles are necessary.  I have not tried it, but you might want to give the free Visual Studio C++ Express a try.

Peter

Mike H

  • Community Member
  • Posts: 25
  • Hero Points: 3
Re: Simple SlickEdit + Cygwin GCC integration?
« Reply #2 on: March 11, 2009, 02:36:23 pm »
Thanks Peter.  I'm downloading this to try right now.  I didn't realize MS had a free version of VC++.  The downside to this solution that I see so far is that it is a HUGE package to download.  And I just need this to write plain old C programs, ultimately for an embedded target, but the PC target is a good way to verify and troubleshoot most coding bugs w/o hardware.  I'll try this out and get feedback.

Any other suggestions from the community??

Mike

Mike H

  • Community Member
  • Posts: 25
  • Hero Points: 3
Re: Simple SlickEdit + Cygwin GCC integration?
« Reply #3 on: March 11, 2009, 04:48:06 pm »
I think VC++ is too big for my needs.  SlickEdit didn't seem to recognize the project extension - .vcproj
I googled for free C compilers and get quite a list.  I list the ones that look best to me.  Has anyone used these and can comment on their ease of use and compatibility with SE?

 - Digital Mars
 - Opensource Whatcom
 - PCC
 - TCC
 - DJGPP
 - MinGW32

Can someone from the SE development team comment on these being successfully integrated into SlickEdit?  For me definition of success is being able to build/debug within the SE IDE without need of a cmd window.  Are all these compatible with GDB?

Mike

thefrogger

  • Community Member
  • Posts: 38
  • Hero Points: 2
Re: Simple SlickEdit + Cygwin GCC integration?
« Reply #4 on: March 11, 2009, 07:42:13 pm »
Hi Mike,

I am currently using SE along with the MinGW32 compiler package, and it has been working very well including GDB integration. Creation of new projects is very simple, and works as well as any other IDE I've used with no extra steps or fuss. However:

1. I use the "build without a makefile" option. SE has done a good job of dependency checking and building so far for me. If you don't require the makefile for other reasons, you might try this option. I just create my projects, add whatever files they contain, and the builds "just work".

2. Default GCC options can be changed (warnings, errors, etc), and once changed in the project type settings, all new projects retain those changes. Works great.

3. I use the version of GDB that comes with SE. There are some bugs with the GDB integration under SE v12 that cause variables to not always display correctly, but they are supposed to be fixed in version 13 of SlickEdit (which I don't have yet).

4. I'm using XP and cannot vouch for Vista compatibility.

If you'd like any other specifics, just ask.

--
John

Mike H

  • Community Member
  • Posts: 25
  • Hero Points: 3
Re: Simple SlickEdit + Cygwin GCC integration?
« Reply #5 on: March 12, 2009, 03:15:05 pm »
John,
This seems like a good option.  I haven't tried it yet since I'd like to see if others out there have tried any of the other compilers with SE.  MinGW does seem to be the most popular choice.  One thing I forgot to mention is that I'd like the compiler to support C99 (or at least complex types - complex.h header).  I don't think GNU GCC supports this yet.  So maybe I should have chosen a different name for the thread since GNU gcc may not be the best choice for my needs :o

Mike

Tim Kemp

  • Senior Community Member
  • Posts: 537
  • Hero Points: 91
Re: Simple SlickEdit + Cygwin GCC integration?
« Reply #6 on: March 12, 2009, 08:05:34 pm »
I use MinGW32 too.  Along with the integrated GDB it makes a great environment for developing C and C++ code.

I have a copy of SE and MinGW along with a batch file to set up the paths and start SE on the flash drive on my keychain.  I think I got the original batch file from here and made a couple modifications to it.  It's wonderful to have such a great development platform anywhere I go.  I've included the batch file here.

Mike H

  • Community Member
  • Posts: 25
  • Hero Points: 3
Re: Simple SlickEdit + Cygwin GCC integration?
« Reply #7 on: March 19, 2009, 03:17:23 pm »
Thanks for the help.  I downloaded the MinGW32 installer and base package.  Integration with SlickEdit was very nice (although all I've done at this point is compile the hello world program and step through using the debugger).

I think the MinGW GCC will work nicely for my needs.  Haven't tried installing MinGW on my Vista PC yet.  I'll try that next week...

Mike

Mike H

  • Community Member
  • Posts: 25
  • Hero Points: 3
Re: Simple SlickEdit + Cygwin GCC integration?
« Reply #8 on: March 31, 2009, 07:09:17 pm »
Thanks for the comments.  I now have MinGW installed on my laptop (XP) and desktop (Vista).  In both cases installation was easy (I followed the defaults and used the installer program).  I think MinGW will work nicely as a GNU C compiler to augment my cross-compiling projects.  I like being able to build projects for my embedded target as well as on a PC for verifying and debugging purposes.  I never got any response about the other open source compilers so I guess no one thinks very highly of them.

Mike

ScottW, VP of Dev

  • Senior Community Member
  • Posts: 1471
  • Hero Points: 64
Re: Simple SlickEdit + Cygwin GCC integration?
« Reply #9 on: April 06, 2009, 09:04:07 pm »
I use Cygwin GNU gcc all the time. Once it is installed, create a new project, selecting "GNU C/C++ Wizard" as the project type. In SlickEdit 2009, you can use the New Project Wizard, selecting "C/C++" for the language and "GNU C/C++ Wizard" for the tool chain.

Having done this, I don't think you need to do anything more to get SlickEdit to build and debug. Admittedly, I set up Cygwin about 2 years ago on my current machine, so I may be forgetting something about paths. When you go through the wizard, have it build a Hello World application and you can use that to baseline your configuration before you do anything more complicated.

Tim Kemp

  • Senior Community Member
  • Posts: 537
  • Hero Points: 91
Re: Simple SlickEdit + Cygwin GCC integration?
« Reply #10 on: April 15, 2009, 08:21:43 pm »
Cygwin GCC works great.  The problem with it is that it doesn't produce a native Windows executable.  You need to run it in the Cygwin environment.

The advantage to using MinGW32 is that it produces a native executable that you can run directly on anyone's Windows box.  I've been using it for years.  It's easy to install and plays well with SlickEdit.

- Tim

john.dehelian

  • Junior Community Member
  • Posts: 9
  • Hero Points: 1
Re: Simple SlickEdit + Cygwin GCC integration?
« Reply #11 on: September 17, 2013, 12:48:09 am »
I was having the same problem. I was trying to run gdb using the default slick edit debugger on Windows 8. I added C:\cygwin64\bin\ to my system path and so could build, but the debugger didn't work. So I went to Debug-> Debugger Options->Configurations and added C:\cygwin64\bin\gdb.exe and checked off the native debugging configuration check box and then it worked.