Re: [CMake] INSTALL TARGETS modifies files on some platforms.
Magnus Sirwiö wrote: Hi, I have notices strange behavior when using the INSTALL rule with the TARGETS signature as shown below: It is normal behavior. install strips and relinks your executables before install. This removes useless data like debugging symbols, making your executables smaller. -- Gonzalo Garramuño [EMAIL PROTECTED] AMD4400 - ASUS48N-E GeForce7300GT Kubuntu Edgy ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] How to redirect output (.o file generattion) in specific directory
Hi All, If anybody could guide me about, How to redirect .o files in user defined directory? I am setting CMAKE_CURRENT_SOURCE_DIR to ../obj but it is generating targets in ~/src/*.o Can anybody enlighten? Thanks regards amit __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] How to redirect output (.o file generattion) in specific directory
2007/11/12, Amit C. Kr. Saluja [EMAIL PROTECTED]: Hi All, If anybody could guide me about, How to redirect .o files in user defined directory? I am setting CMAKE_CURRENT_SOURCE_DIR to ../obj but it is generating targets in ~/src/*.o You cannot change CMAKE_CURRENT_SOURCE_DIR Can anybody enlighten? If you want to separate your sources files from generated files (be it .o or lib or executable) you'd better use out-of-source build which is well supported by cmake mkdir /path/to/build_tree cd /path/to/build_tree cmake /path/to/source/tree You must remove CMakeCache.txt and other CMakeFiles/ from your source tree first. You may change the generation location of EXECUTABLE and LIBRARY by setting: EXECUTABLE_OUTPUT_PATH LIBRARY_OUTPUT_PATH see more on http://www.cmake.org/Wiki/CMake_Useful_Variables -- Erk ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] How to redirect output (.o file generattion) in specific directory
Eric, Thanks for this info! EXECUTABLE_OUTPUT_PATH LIBRARY_OUTPUT_PATH These are global CMake variables. If we change it then the EXECUTABLE LIBRARY path of all the exe and libs changes but not for .os The.os are still generated in CMakeFiles/ directory. Can CMAKE_CURRENT_BINARY_DIR could do something? regards Amit --- Eric Noulard [EMAIL PROTECTED] wrote: 2007/11/12, Amit C. Kr. Saluja [EMAIL PROTECTED]: Hi All, If anybody could guide me about, How to redirect .o files in user defined directory? I am setting CMAKE_CURRENT_SOURCE_DIR to ../obj but it is generating targets in ~/src/*.o You cannot change CMAKE_CURRENT_SOURCE_DIR Can anybody enlighten? If you want to separate your sources files from generated files (be it .o or lib or executable) you'd better use out-of-source build which is well supported by cmake mkdir /path/to/build_tree cd /path/to/build_tree cmake /path/to/source/tree You must remove CMakeCache.txt and other CMakeFiles/ from your source tree first. You may change the generation location of EXECUTABLE and LIBRARY by setting: EXECUTABLE_OUTPUT_PATH LIBRARY_OUTPUT_PATH see more on http://www.cmake.org/Wiki/CMake_Useful_Variables -- Erk ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] gettext support and qtlinguist
Hi, someone knows if there's some module to support the gettext functions and pot generation? someone know know to generate the qm files from ts in a qt program using cmake or must I have to use custom target? Regards, Leo ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] gettext support and qtlinguist
Leopold Palomo-Avellaneda wrote: Hi, someone knows if there's some module to support the gettext functions and pot generation? cmake2.5 (SVN) has a FindGettext.cmake. You can use the module with 2.4.7, too. -- Gonzalo Garramuño [EMAIL PROTECTED] AMD4400 - ASUS48N-E GeForce7300GT Kubuntu Edgy ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] Link question
Hi all, Is there a way in cmake to link (in linux) to a .so lib wich is not prefix by lib. So link to a lib without the -lmyLib Thanks begin:vcard fn;quoted-printable:Xavier Larrod=C3=A9 n;quoted-printable:Larrod=C3=A9;Xavier org:IRISA ;E119 Orange title:Projet GVT tel;work:+33 2 99 84 73 28 version:2.1 end:vcard ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Link question
Quoting Xavier Larrode [EMAIL PROTECTED]: Hi all, Is there a way in cmake to link (in linux) to a .so lib wich is not prefix by lib. So link to a lib without the -lmyLib Thanks Have you tried with SET_TARGET_PROPERTIES? -- Pau Garcia i Quiles http://www.elpauer.org (Due to my workload, I may need 10 days to answer) ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] Not getting the CXX/CC I requested with v 2.4.5
Hi, I'm experiencing some weirdness trying to configure on a cray. I do the following: env CXX=g++ CC=gcc ./bootstrap configure seems to report that it's using g++ to do the checks. However, when I do a make, it's using a different compiler. make [ 0%] Building CXX object Source/kwsys/CMakeFiles/cmsys.dir/Directory.o /opt/xt-pe/2.0.26quadcore1/bin/snos64/CC: INFO: linux target is being used /tmp/work/pugmire/visit-cnl/visit-loginnode/cmake-2.4.5/Source/kwsys/Directory.cxx, line 214: error: a value of type dirent64 * cannot be used to initialize an entity of type dirent * for (dirent* d = readdir(dir); d; d = readdir(dir) ) ^ /tmp/work/pugmire/visit-cnl/visit-loginnode/cmake-2.4.5/Source/kwsys/Directory.cxx, line 214: error: a value of type dirent64 * cannot be assigned to an entity of type dirent * for (dirent* d = readdir(dir); d; d = readdir(dir) ) ^ /tmp/work/pugmire/visit-cnl/visit-loginnode/cmake-2.4.5/Source/kwsys/Directory.cxx, line 233: error: a value of type dirent64 * cannot be used to initialize an entity of type dirent * for (dirent* d = readdir(dir); d; d = readdir(dir) ) ^ /tmp/work/pugmire/visit-cnl/visit-loginnode/cmake-2.4.5/Source/kwsys/Directory.cxx, line 233: error: a value of type dirent64 * cannot be assigned to an entity of type dirent * for (dirent* d = readdir(dir); d; d = readdir(dir) ) ^ 4 errors detected in the compilation of /tmp/work/pugmire/visit-cnl/visit-loginnode/cmake-2.4.5/Source/kwsys/Directory.cxx. I'm new to cmake, so I'm not sure where to begin looking. However, grepping around, I see that the file Source/kwsys/CMakefiles/cmsys.dir/build.make is referencing the wrong compiler: /opt/xt-pe/2.0.26quadcore1/bin/snos64/CC $(CXX_FLAGS) -o Source/kwsys/CMakeFiles/cmsys.dir/Directory.o -c /tmp/work/pugmire/visit-cnl/visit-loginnode/cmake-2.4.5/Source/kwsys/Directory.cxx and I'm not sure what is generating this line. Anyone seen this before? Any ideas on how to fix this? Thanks, Dave ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] gettext support and qtlinguist
A Dilluns 12 Novembre 2007, Gonzalo Garramuño va escriure: Leopold Palomo-Avellaneda wrote: Hi, someone knows if there's some module to support the gettext functions and pot generation? cmake2.5 (SVN) has a FindGettext.cmake. You can use the module with 2.4.7, too. cmake2.5 cvs, not svn, no? and dou you know if someone is using it? an example? Regards, Leo ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] gettext support and qtlinguist
Leopold Palomo-Avellaneda wrote: cmake2.5 cvs, not svn, no? Yes, right. and dou you know if someone is using it? an example? I've used it. It is pretty much self explanatory if you read the file. FIND_PACKAGE( Gettext ) GETTEXT_CREATE_TRANSLATIONS ( potFile [ALL] pofile1 ... pofileN ) -- Gonzalo Garramuño [EMAIL PROTECTED] AMD4400 - ASUS48N-E GeForce7300GT Kubuntu Edgy ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] gettext support and qtlinguist
A Dilluns 12 Novembre 2007, Gonzalo Garramuño va escriure: Leopold Palomo-Avellaneda wrote: cmake2.5 cvs, not svn, no? Yes, right. and dou you know if someone is using it? an example? I've used it. It is pretty much self explanatory if you read the file. FIND_PACKAGE( Gettext ) GETTEXT_CREATE_TRANSLATIONS ( potFile [ALL] pofile1 ... pofileN ) ok, thanks. Leo ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CMAKE_SYSTEM_PROCESSOR question
On Friday 09 November 2007, Félix C. Morency wrote: Hi, I'm using ${CMAKE_SYSTEM_PROCESSOR} in my cmake configure script but when I call the script with CTest (ctest -S ...), it complains that this variable is empty. Is there any way to override this ? The variable from the cmake files are not automatically available in the ctest scripts. ctest reads some config files when it starts, maybe you can use configure_file() to write that value in one of these files. Alex ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Link question
On Monday 12 November 2007, Xavier Larrode wrote: Hi all, Is there a way in cmake to link (in linux) to a .so lib wich is not prefix by lib. So link to a lib without the -lmyLib To a library which is already installed on the system ? I think this doesn't work, the linker won't find the file mylib.so if you (or cmake) say -lmylib. Alex ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] Linking Libraries
I've created a project (Farsight) that has this top-level CMakeLists file (segment shown). The subdirs also have theirs. The cpp files in /seg use VTK libraries. I have found that the project compiles using MS Visual Studio, but not using g++. To get g++ to work I added this to the CMakeLists shown below: LINK_LIBRARIES( VTKCommon VTKIO VTKFiltering ) I understand this to be an old command that is no longer necessary, and I don't want to have it in this CMakeLists file because I don't need to know what each module (subdir) requires for libraries. # Snippet of Top-Level CMakeLists.txt SUBDIRS( wrap ) # here we instruct CMake to build Farsight executable from all # source files and place it in the bin folder ADD_EXECUTABLE( Farsight ${FARSIGHT_SRCS} ) # last thing we have to do is to tell CMake what libraries our executable needs, # luckily FIND_PACKAGE prepared QT_LIBRARIES variable for us: TARGET_LINK_LIBRARIES( Farsight ) # The CMakeLists.txt in \wrap # SET( MY_WRAPPERS_SRCS itkimage2qimage.cpp qimage2itkimage.cpp vtkLSMReader.cxx ) SET( MY_WRAPPERS_HDRS qimage2itkimage.h vtkLSMReader.h vtkBXDProcessingWin32Header.h ) ADD_LIBRARY( fswrappers ${MY_WRAPPERS_SRCS} ${MY_WRAPPERS_HDRS} ) TARGET_LINK_LIBRARIES( fswrappers ${QT_LIBRARIES} VTKCommon VTKFiltering ) ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Add include files
On Sunday 11 November 2007, Yinon Ehrlich wrote: Hi, * I'm new to CMake, trying to convert our existing GNU Makefiles to CMake. * I have a GCC compilation line that uses GCC's -include direction The argument to -include is a file which will be included, right ? (Instead of having multiple identical #include lines within the source code.) == Does anyone has an idea how can I implement this feature with CMake ? You could do it using ADD_DEFINITIONS(-include ...) but I would suggest you actually include that file everywhere (using -include *might* make the cmake dependency scanning miss some dependencies) Alex ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Linking Libraries
On Nov 12, 2007 12:32 PM, [EMAIL PROTECTED] wrote: I've created a project (Farsight) that has this top-level CMakeLists file (segment shown). The subdirs also have theirs. The cpp files in /seg use VTK libraries. I have found that the project compiles using MS Visual Studio, but not using g++. To get g++ to work I added this to the CMakeLists shown below: LINK_LIBRARIES( VTKCommon VTKIO VTKFiltering ) I understand this to be an old command that is no longer necessary, and I don't want to have it in this CMakeLists file because I don't need to know what each module (subdir) requires for libraries. So why don't you just add VTKCommon VTKIO VTKFiltering to the appropriate TARGET_LINK_LIBRARIES commands? Cheers, Brandon Van Every # Snippet of Top-Level CMakeLists.txt SUBDIRS( wrap ) # here we instruct CMake to build Farsight executable from all # source files and place it in the bin folder ADD_EXECUTABLE( Farsight ${FARSIGHT_SRCS} ) # last thing we have to do is to tell CMake what libraries our executable needs, # luckily FIND_PACKAGE prepared QT_LIBRARIES variable for us: TARGET_LINK_LIBRARIES( Farsight ) # The CMakeLists.txt in \wrap # SET( MY_WRAPPERS_SRCS itkimage2qimage.cpp qimage2itkimage.cpp vtkLSMReader.cxx ) SET( MY_WRAPPERS_HDRS qimage2itkimage.h vtkLSMReader.h vtkBXDProcessingWin32Header.h ) ADD_LIBRARY( fswrappers ${MY_WRAPPERS_SRCS} ${MY_WRAPPERS_HDRS} ) TARGET_LINK_LIBRARIES( fswrappers ${QT_LIBRARIES} VTKCommon VTKFiltering ) ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Windows Mobile II
On Monday 12 November 2007, Alexander Adam wrote: Hi, Not sure if this mail made it to the list so here's my try again -- Have you seen the posts from Artur Wisz, should have the subject cmake 2.5 with windows mobile ? I didn't get any more replies, so this is stuck somehow. You probably need a Platform/WindowsMobile.cmake file, and a modified WindowsMobile-cl.cmake (instead of Windows-cl.cmake). Let me know how far you get. It won't be possible to build host- and target-stuff in the same build tree. Alex ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Cmake on Leopard wtih Xcode2.5
Thats good info thank you, Chris On 11/11/07, Mike Jackson [EMAIL PROTECTED] wrote: Just adding some more information: http://lists.apple.com/archives/xcode-users/2007/Oct/msg00690.html and also http://developer.apple.com/releasenotes/DeveloperTools/RN-XcodePrevious/index.html#//apple_ref/doc/uid/TP40001436-DontLinkElementID_3 there is a command line tool called xcode-select that can be used to determine the path to the currently selected version of Xcode, BUT this is ONLY installed with Xcode 3.0. Apple does support the environment variable DEVELOPER_DIR for some things but I have not determined if this is supported by Xcode 2.5. I think some additions to the Darwin.cmake module to take into account some of these items may have to be performed. The big thing here is that if you install ONLY Xcode 2.5 on LEOPARD, then you have to use something like '/Xcode2.5/usr/bin/make' to invoke 'make' or put /Xcode2.5/usr/bin/ on your PATH variable first, as you have already done. Hope some of this helps. -- Mike Jackson imikejackson gmail * com On Nov 11, 2007, at 1:12 PM, Mike Jackson wrote: Here is some more information gleaned from the Xcode 2.5 release notes. When installed on OS X 10.4 (Tiger), Xcode 2.5 continues to be installed in /Developer and other places as usual. I am assuming CMake should continue to run just fine and find the frameworks just fine also. On OS X 10.5 Leopard, the DEFAULT installation location for Xcode 2.5is /Xcode2.5 and all frameworks, binaries and support files are located _within_ this Directory. So things like 'make' and autotools type stuff is located in /Xcode2.5/usr/bin. This would be a good default for CMake to look for things in. Although the user has the choice of changing the installation directory. I am going to ask in the Xcode-users mailing list about some way to detect _where_ the user has things installed. I also thought there was a command line tool to switch between Xcode versions but I am not finding anything about it in the release notes. -- Mike Jackson imikejackson gmail * com On Nov 11, 2007, at 12:33 PM, Mike Jackson wrote: This is because Apple now supports loading the developer tools where ever you want them instead of always in /Developer. This is going to play havoc with Cmake because I am assuming CMake is hard coded to look in /Developer for the dev tools. I wonder if there is an environment variable that can be set to indicate where the dev tools are installed. CMake could then use that environment variable to figure out which Dev tools you want to use. Apple did this because they also now support multiple versions of the Dev tools on a single system. For instance, in Leopard (OS X 10.5) you can have both Xcode 3.0 and Xcode 2.5 installed. Is there anything in the release notes in Xcode 2.5 about setting environment variables for each version of Xcode? -- Mike Jackson Senior Research Engineer Innovative Management Technology Services On Nov 10, 2007, at 4:43 PM, Chris Garrett wrote: Hi, I just started using Leopard with Xcode2.5. I do not have Xcode3.0installed yet. When running cmake on Leopard I found I had to do the following: 1. Make /Xcode2.5/usr/bin first on the path 2. Edit CMakeCache.txt file and change the following: CMAKE_C_FLAGS:STRING=-isysroot /Xcode2.5/SDKs/MacOSX10.4u.sdk CMAKE_CXX_FLAGS:STRING=-isysroot /Xcode2.5/SDKs/MacOSX10.4u.sdk CMAKE_OSX_SYSROOT:STRING=/Xcode2.5/SDKs/MacOSX10.4u.sdk I also had to change any references to /System/Library/Frameworks/* to /Xcode2.5/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/* Is this the correct way to use Xcode2.5 on Leopard with Cmake? Thanks, Chris ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Link question
Alexander Neundorf wrote: On Monday 12 November 2007, Xavier Larrode wrote: Hi all, Is there a way in cmake to link (in linux) to a .so lib wich is not prefix by lib. So link to a lib without the -lmyLib To a library which is already installed on the system ? I think this doesn't work, the linker won't find the file mylib.so if you (or cmake) say -lmylib. Try using the full path and name of the lib you'd like to add in the TARGET_LINK_LIBRARIES command. I've done this before with external libraries, and I think at least one of them may not have had the lib prefix. If that doesn't work, try SET_TARGET_PROPERTIES with the LINK_FLAGS you want. Juan Alex ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake -- Juan Sanchez [EMAIL PROTECTED] 800-538-8450 Ext. 54395 512-602-4395 ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Not getting the CXX/CC I requested with v 2.4.5
On 2007-11-12 09:59-0500 Pugmire, Dave wrote: Hi, I'm experiencing some weirdness trying to configure on a cray. I do the following: env CXX=g++ CC=gcc ./bootstrap configure seems to report that it's using g++ to do the checks. However, when I do a make, it's using a different compiler. My experience (on Linux) is setting environment variables to select your compilers and associated flags just works. However, there are some caveats. You must set the environment variables _before_ cmake is invoked _in an empty build tree_. If you did that exactly, and make still uses the wrong set of compilers, then there may be some CMake bug for the compiler specification on the Cray platform. But usually such questions are generated by someone who specified the environment variables after cmake was invoked or who ran cmake in a dirty build tree. Alan __ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); PLplot scientific plotting software package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __ Linux-powered Science __ ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Not getting the CXX/CC I requested with v 2.4.5
Alan W. Irwin wrote: On 2007-11-12 09:59-0500 Pugmire, Dave wrote: Hi, I'm experiencing some weirdness trying to configure on a cray. I do the following: env CXX=g++ CC=gcc ./bootstrap configure seems to report that it's using g++ to do the checks. However, when I do a make, it's using a different compiler. Most likely the build tree has already been configured once with a different compiler. Remove the CMakeCache.txt file, and the CMakeFiles directory, or if you are doing an out of source build, remove the entire build tree. -Bill ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] Linking boost python with mingw
Hi guys and girls, I'm new to this wonderful CMake thingy and I'm having some problems linking to boost.python. My setup on windows xp: mingw 5.1.3 (with gcc 3.4.5) boost1.34.1 python 2.5 I compiled boost as per instructions with mingw without any problems. With some simple code using boost/python I can compile without errors, but when ld tries linking I get undefined reference to '_imp errors. In my CMakeLists file I have TARGET_LINK_LIBRARIES(${EXE_NAME} ${BOOST_PYTHON_LIB} ${PYTHON_LIBRARIES} ) With the BOOST_PYTHON_LIB pointing directly to C:/Boost/lib/libboost_python-mgw34-1_34_1.a Removing code using boost.python stuff and just using the normal python lib compiles and links fine. What am I doing wrong? I've tried every version of the boost_python lib by the way, -mt, -s, -d, and combinations thereof. Which one should I use, is there a way to chose the correct library automatically, the FindBoost.cmakeinclude doesn't seem to do it. And what exactly is the -s library for? I though lib*.a files were already static? If anyone out there has gotten boost.python to work with mingw please let me in on your secrets. Any suggestions are welcome... Have a nice day, cputter ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Linking boost python with mingw
Quoting Christiaan Putter [EMAIL PROTECTED]: Are you using a mingw-compiled Python? In case you are using a VC++-compiled version of Python (which is the one you download from python.org), have you created import libraries for MinGW? Hi guys and girls, I'm new to this wonderful CMake thingy and I'm having some problems linking to boost.python. My setup on windows xp: mingw 5.1.3 (with gcc 3.4.5) boost1.34.1 python 2.5 I compiled boost as per instructions with mingw without any problems. With some simple code using boost/python I can compile without errors, but when ld tries linking I get undefined reference to '_imp errors. In my CMakeLists file I have TARGET_LINK_LIBRARIES(${EXE_NAME} ${BOOST_PYTHON_LIB} ${PYTHON_LIBRARIES} ) With the BOOST_PYTHON_LIB pointing directly to C:/Boost/lib/libboost_python-mgw34-1_34_1.a Removing code using boost.python stuff and just using the normal python lib compiles and links fine. What am I doing wrong? I've tried every version of the boost_python lib by the way, -mt, -s, -d, and combinations thereof. Which one should I use, is there a way to chose the correct library automatically, the FindBoost.cmakeinclude doesn't seem to do it. And what exactly is the -s library for? I though lib*.a files were already static? If anyone out there has gotten boost.python to work with mingw please let me in on your secrets. Any suggestions are welcome... Have a nice day, cputter -- Pau Garcia i Quiles http://www.elpauer.org (Due to my workload, I may need 10 days to answer) ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Linking boost python with mingw
Quoting Christiaan Putter [EMAIL PROTECTED]: (Returning this to the mailing list, as you mistakenly replied to me in private) Hi Pau, Thanks for the swift reply. From the boost website page on building boost there's a section on Mingw, quoting: If you are using a version of Python prior to 2.4.1 with a MinGW prior to 3.0.0 (with binutils-2.13.90-20030111-1), you will need to create a MinGW-compatible version of the Python library; the one shipped with Python will only work with a Microsoft-compatible linker... The mingw site says something similar. I assumed this meant that using an up to date version of python (2.5) and mingw meant it should work 'out of the box'. No, it means Python sources since 2.4 do not need to be patched to build with MinGW: http://www.mingw.org/MinGWiki/index.php/Python extensions I forgot to mention though that I'm embedding pyhton into c++, so compiling a normal c++ executable. Also, like I said, compiling and linking something using only the python25 lib works. I'm getting errors when linking to my boost.python libs. Most probably your problem is due to different call conventions being used (__stdcall and __cdecl). Read about that here: http://www.geocities.com/yongweiwu/stdcall.htm Either you build Python with MinGW, then try to link and make sure you are providing all the libraries you need, or you try to create your own import libraries for VC++-compiled Python. I'd go for the former, as it will be easier. In case someone else is following this thread that wants to extend python: If you're compiling python code with mingw you'll have to tell it to use mingw ie. something like: python setup.py build --compiler=mingw32 There's a nice tutorial at http://boodebr.org/main/python/build-windows-extensions I don't know if this is applicable to embedding too. I have never embedded Python in an application and hardly programmed anything in Python ever. I'm a Ruby guy. Am I correct in assuming this Pau? On 12/11/2007, Pau Garcia i Quiles [EMAIL PROTECTED] wrote: Quoting Christiaan Putter [EMAIL PROTECTED]: Are you using a mingw-compiled Python? In case you are using a VC++-compiled version of Python (which is the one you download from python.org), have you created import libraries for MinGW? Hi guys and girls, I'm new to this wonderful CMake thingy and I'm having some problems linking to boost.python. My setup on windows xp: mingw 5.1.3 (with gcc 3.4.5) boost1.34.1 python 2.5 I compiled boost as per instructions with mingw without any problems. With some simple code using boost/python I can compile without errors, but when ld tries linking I get undefined reference to '_imp errors. In my CMakeLists file I have TARGET_LINK_LIBRARIES(${EXE_NAME} ${BOOST_PYTHON_LIB} ${PYTHON_LIBRARIES} ) With the BOOST_PYTHON_LIB pointing directly to C:/Boost/lib/libboost_python-mgw34-1_34_1.a Removing code using boost.python stuff and just using the normal python lib compiles and links fine. What am I doing wrong? I've tried every version of the boost_python lib by the way, -mt, -s, -d, and combinations thereof. Which one should I use, is there a way to chose the correct library automatically, the FindBoost.cmakeinclude doesn't seem to do it. And what exactly is the -s library for? I though lib*.a files were already static? If anyone out there has gotten boost.python to work with mingw please let me in on your secrets. Any suggestions are welcome... Have a nice day, cputter -- Pau Garcia i Quiles http://www.elpauer.org (Due to my workload, I may need 10 days to answer) ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake -- Pau Garcia i Quiles http://www.elpauer.org (Due to my workload, I may need 10 days to answer) ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Linking boost python with mingw
Thanks Pau, I'll build Python with mingw and give it a try. I'll let you guys know how that worked out... Have a nice evening. On 13/11/2007, Pau Garcia i Quiles [EMAIL PROTECTED] wrote: Quoting Christiaan Putter [EMAIL PROTECTED]: (Returning this to the mailing list, as you mistakenly replied to me in private) Hi Pau, Thanks for the swift reply. From the boost website page on building boost there's a section on Mingw, quoting: If you are using a version of Python prior to 2.4.1 with a MinGW prior to 3.0.0 (with binutils-2.13.90-20030111-1), you will need to create a MinGW-compatible version of the Python library; the one shipped with Python will only work with a Microsoft-compatible linker... The mingw site says something similar. I assumed this meant that using an up to date version of python (2.5) and mingw meant it should work 'out of the box'. No, it means Python sources since 2.4 do not need to be patched to build with MinGW: http://www.mingw.org/MinGWiki/index.php/Python extensions I forgot to mention though that I'm embedding pyhton into c++, so compiling a normal c++ executable. Also, like I said, compiling and linking something using only the python25 lib works. I'm getting errors when linking to my boost.python libs. Most probably your problem is due to different call conventions being used (__stdcall and __cdecl). Read about that here: http://www.geocities.com/yongweiwu/stdcall.htm Either you build Python with MinGW, then try to link and make sure you are providing all the libraries you need, or you try to create your own import libraries for VC++-compiled Python. I'd go for the former, as it will be easier. In case someone else is following this thread that wants to extend python: If you're compiling python code with mingw you'll have to tell it to use mingw ie. something like: python setup.py build --compiler=mingw32 There's a nice tutorial at http://boodebr.org/main/python/build-windows-extensions I don't know if this is applicable to embedding too. I have never embedded Python in an application and hardly programmed anything in Python ever. I'm a Ruby guy. Am I correct in assuming this Pau? On 12/11/2007, Pau Garcia i Quiles [EMAIL PROTECTED] wrote: Quoting Christiaan Putter [EMAIL PROTECTED]: Are you using a mingw-compiled Python? In case you are using a VC++-compiled version of Python (which is the one you download from python.org), have you created import libraries for MinGW? Hi guys and girls, I'm new to this wonderful CMake thingy and I'm having some problems linking to boost.python. My setup on windows xp: mingw 5.1.3 (with gcc 3.4.5) boost1.34.1 python 2.5 I compiled boost as per instructions with mingw without any problems. With some simple code using boost/python I can compile without errors, but when ld tries linking I get undefined reference to '_imp errors. In my CMakeLists file I have TARGET_LINK_LIBRARIES(${EXE_NAME} ${BOOST_PYTHON_LIB} ${PYTHON_LIBRARIES} ) With the BOOST_PYTHON_LIB pointing directly to C:/Boost/lib/libboost_python-mgw34-1_34_1.a Removing code using boost.python stuff and just using the normal python lib compiles and links fine. What am I doing wrong? I've tried every version of the boost_python lib by the way, -mt, -s, -d, and combinations thereof. Which one should I use, is there a way to chose the correct library automatically, the FindBoost.cmakeinclude doesn't seem to do it. And what exactly is the -s library for? I though lib*.a files were already static? If anyone out there has gotten boost.python to work with mingw please let me in on your secrets. Any suggestions are welcome... Have a nice day, cputter -- Pau Garcia i Quiles http://www.elpauer.org (Due to my workload, I may need 10 days to answer) ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake -- Pau Garcia i Quiles http://www.elpauer.org (Due to my workload, I may need 10 days to answer) ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake