>     I should point out that MSVC++ Express Edition is free.

Didn't know that, interesting ... would have probably saved me a few days, 
on the other hand getting PortMidi to compile under MinGW is sort 
of a community service which I'm glad to help with ..

Anyway, basic instructions are below. Note that this is just only one 
way to get it working, but certainly not the only one. Also the 
solution is not perfect, see below.

Instructions: 

(more detailed instructions at
 http://www.itk.org/Wiki/Eclipse_CDT4_Generator)

- Download and install latest Eclipse CDT (C development Env.)
- install CMake 2.8 (it's currently at Release candidate, tried
  the stable 2.6 but it didn't work)
- Open CMake gui (icon on desktop after installation, or 
  from Start->Programs) and specify 'source directory' as 
  the PortMidi top level source directory (trunk, that you've 
checked out from SVN, or just a plain zipped source release).
- you need to specify a 'build' directory (can name it 'build' or 
any other name). Build dir can be in parallel to the source dir , 
or inside it, there are pros and cons. If inside, you will be to see 
all the 'test' executable, and debug them using Right click on 
e.g. sysex -> Debug As ... but you will not be able to
browse the sources (CMake Eclipse CDT project creator cannot create
 link to the sources, since Eclipse in general apparently 
has trouble creating linked resource to a directory that is 
the parent of the project). You can bypass this by 
just creating a new project just for browsing the sources 
and using the nice IDE features of PortMidi (but you will have 
to build in the original project).

If build dir is in parallel to source dir, CMake Eclipse CDT 
creator will be able to create link to the source dir, and 
you can navigate the source etc, but will not be able to see 
the test executables.

- Specify 'Debug' or 'Release' in CMake gui (field: CMAKE_BUILD_TYPE). 
Problem: this does not work, test executables at least (and 
possibly also DLLs) are created w/o debug symbols as gdb 
complains when you try to invoke it on those executables. 
Fix: manually locate e.g. the 
trunk.portmidi\build\pm_test\CMakeFiles\sysex.dir\flags.make 
file, and add -g at
the beginning of C_FLAGS:
"C_FLAGS = -g .....". Do this for pm_common directory if you want the DLLs 
to have debug info too.

- Specify 'Eclipse CDT4 - Unix Makefiles' as the Cmake generator
- Press Configure and Generate buttons
- in the (previously non-existant) 'build' dir, you should see .project and 
.cproject files
- Open Eclipse and import the build dir as explained in the link above.
- Everything will be built automaticaly
- many functions do not work, for example if you want to re-build, just issue 
Project->Clean which will clean and re-build everything
- you can Right click on the e.g. sysex.exe files and select debug as local 
c/c++ application (GDB debugger, not mingw !), you should have a full debug
session going ..

Anyway I hope that helps, I will soon start to debug my application and would
probably have some questions .... 

Many thanks in advance, and let me know if something is not clear :)

Gal.

_______________________________________________
media_api mailing list
[email protected]
http://lists.create.ucsb.edu/mailman/listinfo/media_api

Reply via email to