Errors on OSX

I am on OSX and running Netbeans as my IDE when I build my code I get this error

1
2
3
 Undefined symbols for architecture x86_64:
  "_CFArrayGetValueAtIndex", referenced from:
      _mz_crypt_sign in libminizip.a(mz_crypt_apple.c.o)


I think this is OS specific and not related to code per se. What can I do to resolve this?
So, looking through the cmake file, I see this.
1
2
3
4
5
6
7
8
9
10
11
    if(APPLE AND NOT MZ_BRG)
        message(STATUS "Using CoreFoundation Framework")
        find_library(COREFOUNDATION_LIBRARY CoreFoundation)
        target_link_libraries(${PROJECT_NAME} ${COREFOUNDATION_LIBRARY})
        message(STATUS "Using Security Framework")
        find_library(SECURITY_LIBRARY Security)
        target_link_libraries(${PROJECT_NAME} ${SECURITY_LIBRARY})
        set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS "-Wl,-F/Library/Frameworks")
    else()
        target_link_libraries(${PROJECT_NAME} ${LIBBSD_LIBRARIES})
endif()


Did you see "Using CoreFoundation Framework" and "Using Security Framework" when you ran cmake?

Is that your only issue?
Because it seems a little odd that it would compile without any warnings at all (like missing headers), only to fail at link time.
I didn't run cmake - I build it in Netbeans, and it could possibly be that I need to add an additional C++ linker to make it work, I just do not know.

There are additional errors, I thinking, resolve one by one, but I can show you full error list if that will make it easier.

https://defuse.ca/b/5ZboQoLwt3wTWglDhiWHHn
Last edited on
Huh?

You're using cmake here.
http://www.cplusplus.com/forum/beginner/250655/

Well it looks like you let NetBeans invent a makefile for you, instead of using the previously supplied cmake project.

I guess it missed out all the Apple framework linking stuff, since you never told it about that.

TBH, just tell NetBeans you have a custom makefile and point it towards your cmake file.
In my post there I had downloaded a GitHub repo and was trying to build it to use the header files in my project (a seperate project).

The cmake file that is used in my other post, that would be specific to the GitHub project I downloaded, right?

I'm all about telling Netbeans I have a custom makefile and pointing it to the GitHub one if that will resolve this cluster of a mess I'm in. How would I do that?
Sorry I can't help more. I have neither OSX or NetBeans to compare with.
I appreciate the help. I think I have narrowed it down to my specific MacBook but how to resolve is something I have yet to be able to figure out.
Topic archived. No new replies allowed.