On Mon, Mar 30, 2009 at 7:48 PM, Kermit Mei <[email protected]> wrote:

> I want to add the following program as a part of my project, but I don't
> konw how to manage it in CMake.
>
> I worte the following in my CMakeLists.txt:
>  FIND_LIBRARY(LIBWMM winmm)
>  ADD_EXECUTABLE(aplay WIN32 aplay.c)
>  TARGET_LINK_LIBRARIES(aplay ${LIBWMM})
> But it always told me that "undefined reference to 'playsou...@12' ".
> How can I solve it?


Double check to make sure that winmm (and the MinGW implementation of this
library) has that function in it.  You might also consider asking for help
on a MinGW forum?


> By the way, what's the meaning of -mwindows? Can I also use strip in
> CMake for optimization?


This sounds like a MinGW thing.  If Google doesn't yield the answer you
should check with the MinGW mailing lists.  Also double check with make
VERBOSE=1 to make sure that you're actually passing -lwinmm and it's finding
the library.

It looks like CPack has an option to strip binaries.
http://www.cmake.org/Wiki/CMake:Packaging_With_CPack

-- 
Philip Lowman
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to