Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Nov 3, 2012, 04:49 PM   #1
e-r-a-n
macrumors member
 
Join Date: Jan 2012
Issues with XCode & CGAL

as part of my current project, I need to use the cgal library.
therefore, i installed macports and used a command line to install the cgal files.
i have under /opt/local/include/cgal/ a bunch of headers and some lib files under /opt/local/lib/

i took a demo main.cpp, with just includes of some headers and a short main with "hello" print line.
i added the include/cgal and local/lib/ as build path headers in my project settings under xcode:
http://i47.tinypic.com/16iuzhg.jpg

afterwards i compiled the code from an example, but removed the main to a simple print, just to see if i can compile it successfuly, so i used this code:
http://i48.tinypic.com/2ca5xw.jpg

it seems the build settings did help, but i still got this:
http://i49.tinypic.com/ipp1ro.jpg

Im not sure what i did wrong and how to treat this issue.
e-r-a-n is offline   0 Reply With Quote
Old Nov 5, 2012, 11:37 AM   #2
misee
macrumors member
 
Join Date: Jul 2010
I tried to recreate your problem and found that making the header search path non-recursive resolves those errors. To do that, just double click the search path in Xcode and choose non-recursive.
misee is offline   0 Reply With Quote
Old Nov 5, 2012, 12:35 PM   #3
e-r-a-n
Thread Starter
macrumors member
 
Join Date: Jan 2012
Thank you for the effort
however, i tried again and changed, it surely helped but i still havent got too much further.
this is the new deal:

i highly appreciate your help

one more question, assuming my problems are over and it all compiles fine,
is it possible to use the executable under windows somehow?
so that i'll develop under osx but be able to use it also on windows?
Im asking because its a part of a project which is intended to run under windows.
but because installing cgal under windows was a major problem for me, i tried it on my home mac computer
Attached Thumbnails
Click image for larger version

Name:	Screen Shot 2012-11-05 at 8.32.35 PM.png
Views:	61
Size:	252.8 KB
ID:	375237  
e-r-a-n is offline   0 Reply With Quote
Old Nov 5, 2012, 02:16 PM   #4
misee
macrumors member
 
Join Date: Jul 2010
Min_sphere_of_spheres_d_traits_3.h appears to rely on some types declared in other headers, that's why you are getting the errors. If you include Min_sphere_of_spheres_d.h before Min_sphere_of_spheres_d_traits_3.h it should work.
Quote:
one more question, assuming my problems are over and it all compiles fine,
is it possible to use the executable under windows somehow?
so that i'll develop under osx but be able to use it also on windows?
As long as you use only libraries and functions that are available for windows as well, there should be no problems. You will however have to recompile it for windows.
misee is offline   0 Reply With Quote
Old Nov 5, 2012, 11:15 PM   #5
e-r-a-n
Thread Starter
macrumors member
 
Join Date: Jan 2012
first of all, thank you. it does work now... i didnt know there're dependencies for min sphere of spheres 3d.

second, When you say "recompile it again for windows", do you mean i need to compile it in a windows environment, or can i do it under xcode but with different settings?
can you explain a bit more?
i only wish to use the cgal library together with some basic iostream functionality
programming under osx is very new to me, as i have my apple machine for about two-three weeks

Last edited by e-r-a-n; Nov 6, 2012 at 12:13 AM.
e-r-a-n is offline   0 Reply With Quote
Old Nov 6, 2012, 02:11 AM   #6
misee
macrumors member
 
Join Date: Jul 2010
The easiest way is probably recompiling it in a windows environment using Visual Studio (at least that's what the CGAL manual says). You can try searching google for cross compilation to create a windows executable on your mac, but since I've never done that, I have no idea how difficult that will be.
misee is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Command line tools & Xcode 5 & Mavericks ka-spot OS X Mavericks (10.9) 1 Oct 24, 2013 09:35 AM
Binary & Xcode americanGTA iPhone/iPad Programming 24 Aug 17, 2013 11:54 AM
XCode asking for password to Build & Debug BadWolf13 Mac Programming 5 Nov 14, 2012 06:45 PM
Quite a few issues in Xcode 4.5.1. moonman239 iPhone/iPad Programming 10 Oct 23, 2012 06:55 PM
Problems switching views iOS & xcode Lonewolff iPhone/iPad Programming 2 Aug 27, 2012 09:04 AM

Forum Jump

All times are GMT -5. The time now is 06:33 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC