osx makefile -> xcode project

Discussion in 'Mac Programming' started by topcomer, Dec 19, 2008.

  1. topcomer macrumors newbie

    Joined:
    Dec 19, 2008
    Location:
    italy/germany
    #1
    I was given a project made up of open source libraries, source files and makefiles. Since the makefiles were provided for both unix and osx, the command-line compiling went quite smoothly. I would like now to use xcode (which I never used before) in order to take advantage of its functionalities, but since I didn't write the makefiles, it would be almost impossible for me to create the project files. Is there any tool to automatically generate project files from osx makefiles? if can be of any help, the only gui used by the executable is glutviewer. Thank you in advance for your help!
     
  2. topcomer thread starter macrumors newbie

    Joined:
    Dec 19, 2008
    Location:
    italy/germany
    #2
    I've found out that what I want to do is much easier with eclipse. however I get the following error (never seen before) during compiling:

    Code:
    ld: in libmeshopt.a(100644), not a valid mach-o object file
    I have no idea about its meaning, any help will be appreciated. thanks!
     
  3. wrldwzrd89 macrumors G5

    wrldwzrd89

    Joined:
    Jun 6, 2003
    Location:
    Solon, OH
    #3
    Mach-O is the executable format used by Mac OS X. If the linker (ld) is reporting that a library file can't be linked because it's invalid, the way to fix this is to clean and recompile the whole project again.
     
  4. topcomer thread starter macrumors newbie

    Joined:
    Dec 19, 2008
    Location:
    italy/germany
    #4
    ok thank you. the invalid library file is in a library which I compiled using acgmake outside eclipse. does that mean I have to create new projects for each library and then build each of them in eclipse and not from the command line?
     
  5. wrldwzrd89 macrumors G5

    wrldwzrd89

    Joined:
    Jun 6, 2003
    Location:
    Solon, OH
    #5
    That's what I'd do if I were you, yes.
     
  6. topcomer thread starter macrumors newbie

    Joined:
    Dec 19, 2008
    Location:
    italy/germany
    #6
    following your suggestion, I cleaned and rebuilt, now I get the following:

    Code:
    ld: in libmeshopt.a, archive has no table of contents
    by the way, meshopt is actually the name of the file system I included, NOT of the libraries it depends on (Open Mesh), sorry for the wrong information I gave before.
     
  7. wrldwzrd89 macrumors G5

    wrldwzrd89

    Joined:
    Jun 6, 2003
    Location:
    Solon, OH
    #7
    I think ranlib is the tool you need to use to fix this.
     
  8. topcomer thread starter macrumors newbie

    Joined:
    Dec 19, 2008
    Location:
    italy/germany

Share This Page