drawcode / yaml-cpp

Automatically exported from code.google.com/p/yaml-cpp
MIT License
0 stars 0 forks source link

Request for i386/x86_64 build option on Mac OS X #139

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I'm completely new to cmake, so I had to struggle a bit to figure this out for 
myself, but the solution turned out to be pretty trivial.  I'm planning to 
write a Matlab/GNU Octave wrapper of yaml-cpp, so I needed a 64-bit build to 
allow Matlab's libraries to link with yaml-cpp.  By default, I was just getting 
a 32-bit build. I ended up doing the following:

1. On line 130 of yaml-cpp/CMakeLists.txt:
Change "set(CMAKE_OSX_ARCHITECTURES ppc;i386)" to "set(CMAKE_OSX_ARCHITECTURES 
i386;x86_64)"

2. Call cmake with -DAPPLE_UNIVERSAL_BIN=ON

I'm sure there's a better solution, but this did the trick for me.  It would be 
nice if this or some other flag to cmake would specify a i386/x86_64 universal 
build.

What version of the product are you using? On what operating system?
yaml-cpp 0.2.7 on Mac OS X 10.5

Original issue reported on code.google.com by geoff.ad...@gmail.com on 19 Dec 2011 at 8:20

GoogleCodeExporter commented 9 years ago
Good idea. I'll try to add a flag for that.

Original comment by jbe...@gmail.com on 19 Dec 2011 at 9:27

GoogleCodeExporter commented 9 years ago
I know this is an old issue but I'm having a bear of a time getting yaml-cpp to 
link properly on OS X 10.7.  I've build the shared library and even though my 
pet program links and loads just fine I can't get my full project to link 
properly (it is x86_64 specifically).  Is there some trick I'm unaware of to 
compile/link the x86_64 version of the shared library?

I feel quite humbled by the fact that a simple .dylib is driving me this nuts.

Original comment by dbon...@gmail.com on 6 Feb 2013 at 2:16