0

I tried looking around for other posts that might be able to fix this problem but I wasn't able to find one, however if such a post does exist please point me in its direction.

The problem:

Im trying to develop a C static library (.a) in Xcode, then im using a C++ console app to test it. Im currently set up in an Xcode workspace, inside of which is two projects, one for the test app and one for the library. The schema is set to the test app, which under the Build Phases tab is set to link with the library. I have also update the header include paths of the test app to find my library's main header file.

To test that this set up is working, I wrote a void foo() function in my library. Despite this set up, whenever I build the project I get an error stating that foo is an >"undefined symbol".

Is there some part of setting this up that I missed? What am I doing wrong?

Thanks

EDIT:

No im not trying to figure out the logistics behind how it works in theory, im trying to figure out how specifically to set up the Xcode IDE.

MooseTech
  • 1
  • 1
  • Your library is not getting linked to your test app. You need to check the configuration in your IDE, the paths to include and lib folders, etc. – kiner_shah Nov 13 '21 at 07:30
  • Configuring the IDE is what im trying to figure out how to do if the question wasn't closed, I have already checked my include paths. – MooseTech Nov 14 '21 at 21:47
  • You should also check the library paths (paths where .so or .a files are located). – kiner_shah Nov 15 '21 at 05:57

0 Answers0