Author Topic: How to integrate SE with mingw compiler?  (Read 14584 times)

eruisi

  • Community Member
  • Posts: 18
  • Hero Points: 0
How to integrate SE with mingw compiler?
« on: July 26, 2006, 03:55:59 PM »
I am using gdb.exe from mingw as the debugger, but everytime I start the debug, there is a warning messgage saying that "cygwin1.dll not found".
Does this mean SE for windows works only with cygwin gcc/gdb environment?
If not, can anyone help me how to set up the environment for mingw gcc/gdb.
Thanks a lot!

eruisi

  • Community Member
  • Posts: 18
  • Hero Points: 0
Re: How to integrate SE with mingw compiler?
« Reply #1 on: July 27, 2006, 03:55:09 AM »
Well, I tried mingw,cygwin but am losing my patience now.

The menus are not intuitive or convenient at all.

I can't imagine how hard to use customer-defined compiler and debugger and I still can not make it work!

I believe SE is a promising IDE but there is a long way to go before it matures.

Good luck!

sschims

  • Community Member
  • Posts: 7
  • Hero Points: 0
Re: How to integrate SE with mingw compiler?
« Reply #2 on: July 27, 2006, 02:50:52 PM »
I had the same problem using GCC with cygwin also.  I had to add the cygwin bin directory to the path environment variable.  It seemed to work fine after that.

I have been looking for a way to have VSE add it to the path as part of the build process before calling the cygwin programs so I would not have to add it to the general path.  I tried doing that in the pre-build commands with no luck.

Hope this helps.

eruisi

  • Community Member
  • Posts: 18
  • Hero Points: 0
Re: How to integrate SE with mingw compiler?
« Reply #3 on: July 27, 2006, 03:36:03 PM »
My problem is:
No matter what kind of debugger I choose, when I start the debugging, the SE simply triggles a gdb session but pause with a gdb command-line window.
I can not set breakpoint in the C++ source code, nor can I step into/over etc.

Can anyone tell me how to configure a dubugger (either mingw or cygwin) for C/C++ in SE? What I want is an intergrated debugger like Visual Studio/Eclipse so that I can
set breakpoints in source codes and can watch variables in a panel.

Thanks a lot!

ScottW, VP of Dev

  • Senior Community Member
  • Posts: 1471
  • Hero Points: 64
Re: How to integrate SE with mingw compiler?
« Reply #4 on: July 27, 2006, 09:52:52 PM »
If you have Cygwin installed, it should be easy to get you up and running. I suspect your problem may be the kind of project you created.

First, make sure that the Cygwin bin directory is in your system path. On my machine I use c:\cygwin\bin. If you're not using Cygwin, then make sure you have added the path to compatible binaries.

Let's create a sample project to help debug any issues. Select Project > New from the main menu. In the "New" dialog, select "GNU C/C++ Wizard" in the list on the left. Enter a project name and make sure the location is correct. One quick warning, if you fiddle with Location, the project name will no longer be added to the location. The location is where your project and workspace files will be created.  Be sure that "Create new workspace" is checked.  Click OK.  You will be prompted to create a directory. Click Yes.

Next you are prompted for the Project Type and the Source Type. For our sample project, select Executable and C++. Click Next.

Now you are prompted for the Application Type. Select "A Hello World" application and click Next.

Next you are prompted for the Build System. For our sample, have SlickEdit do all the work. Select "Build without a makefile..." This should already be selected.  Click Finish.

SlickEdit will next display a file with the same name as the project, in my case GnuWizardTest.cpp.

Select Build > Rebuild or Build > Build to build it. It should build cleanly and the output should be displayed in the Build window at the bottom of the screen.

Now let's try setting a breakpoint. Position the cursor on the cout line, right-click and select "Set breakpoint". A red circle should be displayed in the left margin.

To debug, select Debug > Start. The windows will flash a bit as they are rearranged. The code will be displayed in an editor window, and there will now be a yellow arrow positioned over the red circle on the line with the breakpoint. To exit the debugger, click the red square and you will be back in the editing view.

If any of this did not work as described, please contact product support and they will help you figure out what's wrong.

To create a working project instead of a sample project, repeat these steps and pick the answers appropriate to your project. You do need to start with the GNU C/C++ Wizard or you'll have to do a lot of hand configuring. You may elect to start with an empty project or a project with a main.

If you have files you want to add to your new project, select Project > Project Properties and then select the Files tab. Use Add Files, Add Tree, or Add Wildcard to import your files. Please not that we do not relocate your files. So, if you like to have your source files stored under your project directory, please copy them there first.

To customize the compiler and the debugger:
  • Project > Project Properties, Compile/Link tab--make sure that the correct compiler is selected. If you have multiple GNU compatible compilers installed, there will be a list to choose from.
  • Debug > Debugger Options, Configurations tab--this is where you can configure a different debugger executable. Don't change this until you get everything else working. We have some version dependencies related to GDB.

Hopefully, this will get you up and running. Do let us know if you have any additional questions or problems. I'm really sorry for the difficulties you've experienced. Working with GNU projects is supposed to be very easy. It looks like we may need to refine this somewhat. Once you get this running, I'd appreciate any suggestions you have on how we can make this more obvious to new users.

--Scott

eruisi

  • Community Member
  • Posts: 18
  • Hero Points: 0
Re: How to integrate SE with mingw compiler?
« Reply #5 on: July 28, 2006, 12:29:41 AM »
Thanks for your kindly help! This detailed description solves all problems.
Previously, I didn't create project via GNU Wizard. In stead, I simply created a blank project and added existing source files and Makefile. This is why I cannot debug my program. There must be some automatic settings missed by this way.

Thanks again. I am enjoying coding with this great tool now.
The support is great!
« Last Edit: July 28, 2006, 01:14:08 AM by eruisi »