PortMidi expects strings to be of type char *, but I think the Windows winmm library, which includes the MIDI functions, comes in different flavors including ASCII and multi-byte. I think if you get the ASCII version, MIDIINCAPS will be defined differently and be type compatible. In Visual C++, the character/string type is a property of the project. I don't know about QtCreator.
It's probably a design error that device and interface names are 8-bit characters in PortMidi, although I'm not sure what's the "right" way to do it: always convert to Unicode? always convert to wchar_t? defer to the local system MIDI API types? use macros to allow single-byte or multi-byte versions? I'd be happy to include a QtCreator project file in the distribution. I moved to CMake to avoid the impossible task of maintaining lots of project files (now Visual C++ and Xcode projects are built, well almost, by CMake), but I'll release whatever you can send as long as there is a readme.txt file to explain what it is and why. -Roger On 9/2/10 4:45 PM, Richard Starfield wrote: > I created a C++ library project in QtCreator, added all the portmidi sources > and include paths, but compiling gives the following error: > > In function 'pm_winmm_general_inputs' (line 182 pm_winmm.c): > passing argument 2 of 'pm_add_device' from incompatible pointer type > expected 'char *' but argument is of type 'WCHAR *' > > - in addition to similar type conflicts in other places. How can I fix this? > > Secondly, are there any plans to include a QtCreator project file with the > portmidi distribution? Both Qt and portmidi are crossplatform so it seems > like a logical combination. Could I contribute my project file if I get it > working on Windows? > > > > _______________________________________________ > media_api mailing list > [email protected] > http://lists.create.ucsb.edu/mailman/listinfo/media_api > _______________________________________________ media_api mailing list [email protected] http://lists.create.ucsb.edu/mailman/listinfo/media_api
