Changes between Version 16 and Version 17 of pm-howdoi


Ignore:
Timestamp:
Aug 15, 2008 3:42:14 PM (11 years ago)
Author:
kingaj
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • pm-howdoi

    v16 v17  
    2424A: Here is what I have done so far.  It is a long list, so I (kingaj) am writing it here.  Please feel free to edit:
    2525
    26   1. Install JRE 5.0
    27   1. Install Eclipse Classic 3.4 and Eclipse IDE for C/C++ Developers (you may not need the first one).
    28   1. Start Eclipse and choose a workspace location.  It is a good idea not to have spaces in directory names.
    29   1. Go through the "C/C++ Getting started" exercises, all the way through to "debugging".  You will find that some Cygwin libraries and exe's are missing along the way.  These are in /usr/bin.  I had to open a Cygwin window, copy them to /cygdrive/c, and in Windows move them over to C:\WINDOWS. (I didn't have any luck putting c:\cygwin\usr\bin into the PATH variable...Windows just doesn't seem to see any files in that directory -- is it a symbolic link?)
    30   1. Use the Eclipse Software Update tool to install Subclipse.
    31   1. Create the subversion repository (eg. https://projects.coin-or.org/svn/Smi) in the Subclipse view.
    32   1. Checkout the project (eg. trunk) as a "normal project" into a directory in your Eclipse workspace.
    33   1. Obtain the fixed version of make 3.81 (see https://projects.coin-or.org/BuildTools/wiki/current-issues for this issue) to get past the "multiple targets" bug.
    34   1. Open a Cygwin window, cd to the checkout directory, and run configure/make/make test/make install as usual.
    35   1. Create a C++ Project for your library or executable.  Choose "Makefile Project", and uncheck "default location".  Browse to the location of the project root (for example, trunk/Smi).  Be sure that Cygwin GCC is selected as the toolchain.
    36   1. Right click the project and create Make targets ("all" and "test" are good choices) and try to build.  This worked the first time for me (surprise!).
    37   1. From here on, the CDT Help documentation works pretty well.  For example, to automate the build settings, open project "properties" and edit the C/C++ Build property page to fine tune the automated build behavior.
    38   1. I had some problems with one of my projects Smi/examples not finding include directories.  After much putzing around I discovered that the generated Makefile had somehow gotten the wrong paths for COININCDIR and COINLIBDIR.  I'm not sure what the path issue is, but the lesson is to look at the Makefile first.  All the settings for the CDT project are generated from the Makefile.
     26  1. Downloads and Install
     27     a. Install Cygwin.
     28        i. Obtain the fixed version of Cygwin make 3.81 to get past the "multiple targets" bug. See https://projects.coin-or.org/BuildTools/wiki/current-issues for this issue.
     29        i. Put the directory <cygwin_root>/bin into your Windows PATH environment variable.
     30     a. Install JDK 5.0 or 6.0.
     31     a. Install Eclipse IDE for C/C++ Developers.
    3932
    40 A final note.  The CDT project perspective looks very good.  All the classes and methods are displayed correctly. CDT has matured greatly since I last looked a few years ago, and it looks like it could be a fine replacement for MSVC++ for Coin development -- especially since now the CDT picks up all project information directly from the Makefiles. 
    41  
     33   1. Set up Eclipse
     34     a. Start Eclipse and choose a workspace location.  It is a good idea not to have spaces in directory names.
     35     a. Open up the Help documentation and get familiarized with Eclipse.
     36     a. Use the Eclipse Software Update tool to install Subclipse.
     37     a. Go through the "C/C++ Getting started" exercises, all the way through to "debugging".
     38        i.  If you find that some Cygwin libraries or exe's are missing you may have to copy them to a location in your Windows PATH.
    4239
     40  1. Set up Coin
     41     a. Create the subversion repository (eg. https://projects.coin-or.org/svn/Smi) in the Subclipse view.
     42     a. Checkout your project (eg. trunk) as a "normal project" into a directory in your Eclipse workspace.
     43     a. Open a Cygwin window, cd to the checkout directory, and run configure/make/make test/make install as usual.
     44
     45  1. Create a C++ Project for your library. 
     46     a. Choose "Makefile Project".
     47     a. Uncheck "default location" and browse to the location of the project root (for example, trunk/Smi).
     48     a. Right click the project and create Make targets ("all" and "test" are good choices) and try to build.  This worked the first time for me (surprise!).
     49
     50  1. Create a C++ Project for an example.
     51     a. Choose "Executable".  This will be a CDT "Managed Makefile" project. 
     52     a. Uncheck "default location" and browse to the location of the project root (for example, trunk/Smi/examples).
     53     a. Right click the project and select "Properties->C/C++ Build->Settings". In here you can add includes for the C++ Compiler and libraries for the Linker.
     54       i. If there are multiple main programs in this directory it will complain.  Just delete the ones you don't need for now.  In your next release you can reorganize your examples into subdirectories.
     55
     56A final note.  The CDT project perspective looks very good.  CDT has matured greatly since I last looked a few years ago, and it looks like it could be a fine replacement for MSVC++ for Coin development -- especially since now the CDT picks up all project information directly from Makefiles, so there is no need to maintain separate project files. 
     57
     58One minor annoyance that takes some getting used to, is that the Eclipse "environment" is inherited from Windows and not from Cygwin.  The CDT locates and binds symbols to some of the Cygwin things you need, like g++, gdb, make, but not all