Re: [CMake] works when I build using XCode, but not with CMake makefile

2016-09-12 Thread Cotton Candy
Thanks. I checked the link (it is a softlink) and the target of the link exists with a file size of 4.2 Mb. Aaron On Fri, Sep 9, 2016 at 4:36 PM, wrote: > > > - On Sep 7, 2016, at 12:52 PM, Cotton Candy < > cottoncandyco...@gmail.com> wrote: > > Here is the output

Re: [CMake] works when I build using XCode, but not with CMake makefile

2016-09-09 Thread clinton
- On Sep 7, 2016, at 12:52 PM, Cotton Candy wrote: > Here is the output from otool -L on skedmo-solver that you requested: > skedmo-solver: > libmysqlclient.18.dylib (compatibility version 18.0.0, current version 18.0.0) > /usr/lib/libSystem.B.dylib

Re: [CMake] works when I build using XCode, but not with CMake makefile

2016-09-07 Thread Cotton Candy
Here is the output from otool -L on skedmo-solver that you requested: skedmo-solver: libmysqlclient.18.dylib (compatibility version 18.0.0, current version 18.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1) /usr/lib/libz.1.dylib (compatibility

Re: [CMake] works when I build using XCode, but not with CMake makefile

2016-09-07 Thread clinton
It may help to include the output of "otool -L" on skedmo-solver, /usr/lib/libmysqlclient.18.dylib and /Applications/MAMP/Library/lib/libmysqlclient.18.dylib. And it may also help to see if there is a difference in the otool output in the Xcode vs makefile scenario. Also, it may help to

Re: [CMake] works when I build using XCode, but not with CMake makefile

2016-09-07 Thread Cotton Candy
Hi Peter, I attach my CMakeLists.txt file as well as the FindMySQL.cmake finder that I used, in case these help. I still get the same error when I run the executable: dyld: Library not loaded: libmysqlclient.18.dylib Referenced from: /Users/schurger/tmp/test_CMake2/./skedmo-solver Reason:

Re: [CMake] works when I build using XCode, but not with CMake makefile

2016-09-07 Thread Peter Steinbach
Hi Mr Candy (I am still getting a heck out of cottoncandycoder, sorry :D ) 1) the way you do it, is not really the way cmake should be used AFAIK. > In my CMakeLists.txt file I included: > set( CMAKE_CXX_FLAGS "-L/Applications/MAMP/Library/lib -lmysqlclient > -lpthread -lz" ) > set(

Re: [CMake] works when I build using XCode, but not with CMake makefile

2016-09-06 Thread Cotton Candy
Peter, In XCode I have this list of "settings" that includes "Other Linker Flags" that I have set to "-lmysqlclient -lpthread -lm -lz" and "Other C++ Flags" that I have set to "-L/Applications/MAMP/Library/lib -lmysqlclient -lpthread -lz" Maybe these explain why things work when I build with

Re: [CMake] works when I build using XCode, but not with CMake makefile

2016-09-06 Thread Peter Steinbach
Aaron, it's about the way that you compile your binary and link libmysqlclient into it. I guess (@all: please correct me if I am wrong) as I don't know how you use cmake to build your libraries/binaries, that you don't set the rpath of libmysqlclient inside your binary. Doing so will ensure

Re: [CMake] works when I build using XCode, but not with CMake makefile

2016-09-06 Thread Peter Steinbach
Hi Mr. Cotton ;), is the location of libmysqlclient* available through DYLD_LIBRARY_PATH at runtime of your code? Best, P On 09/06/2016 10:56 AM, Cotton Candy wrote: Hi, I have a project that I originally coded up using XCode. It builds and runs just fine using XCode. Now I have tried to set

[CMake] works when I build using XCode, but not with CMake makefile

2016-09-06 Thread Cotton Candy
Hi, I have a project that I originally coded up using XCode. It builds and runs just fine using XCode. Now I have tried to set up the same project using CMake to generate a makefile. The project builds 100% without any errors using 'make', but the resulting code doesn't work. I get error: dyld: