Copying Projects and Files

Member
Posts: 281
Joined: 2009.04
Post: #1
Wasn't sure where to post, but here goes:


I wanted to copy my FPS, so created a new .xcodeproject. I dragged all the files necessary from the old to the new, then added frameworks, etc, etc. There's one error that bugs me though:

Code:
Undefined symbols:
  "_SOIL_load_OGL_texture", referenced from:
      _setMeshMaterialProperties in SimpleObjLoader.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
          "_SOIL_load_OGL_texture", referenced from:
              _setMeshMaterialProperties in SimpleObjLoader.o
        ld: symbol(s) not found
        collect2: ld returned 1 exit status
Build failed (1 error)

I added the SOIL.h and SimpleOBJLoader.h, not editng either!

I think this is the XcodeProject

~ Bring a Pen ~
Quote this message in a reply
Moderator
Posts: 3,570
Joined: 2003.06
Post: #2
mikey Wrote:I think this is the XcodeProject

That's just world.c, not the project.

Anyway, when you see "ld: symbol(s) not found" that almost always means you didn't include the relevant library/framework into your project. Unless the library or framework is installed in a proper location on the system like <stdlib> or similar you'll have to drag the library itself into your project so Xcode knows where it's at -- the .h file(s) are not enough; you'll need the .a file(s) as well.

When I make a copy of my projects I just hold down option and drag the project folder next to it to duplicate the whole project folder, not just the xcode project file itself.
Quote this message in a reply
Member
Posts: 227
Joined: 2008.08
Post: #3
In the case of SOIL, the .c files need to be included, along with the .h
(if you aren't using a .a or .dylib)

You probably knew that, but that seems to be the problem.
Quote this message in a reply
Member
Posts: 281
Joined: 2009.04
Post: #4
Quote:You probably knew that
Why thankyou, but I didn't. Slipped my mind completely. Thankyou lots.

~ Bring a Pen ~
Quote this message in a reply
Moderator
Posts: 3,570
Joined: 2003.06
Post: #5
Mikey is using the SOIL .a so he doesn't need the c files for it.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Noob: Copying Classes hangt5 3 3,372 Mar 9, 2005 12:52 PM
Last Post: codemattic
  copying picts frac707 4 3,318 Feb 26, 2005 01:28 PM
Last Post: frac707