Closed boonier closed 1 year ago
On the command line you would probably add something like -I/path/to/nfd/install
to your project. I'm not sure about xcode, but there's probably an equivalent place you can put the installation path.
Okay thanks, I put them in ~/includes and the search path picks them up. (I had to change <nfd.h>
-> "nfd.h"
in the nfd.hhp
)
Now when building, I get these errors:
Not sure why they are prefixed with an underscore. Is it an issue with the static library; is it somehow not compiled for arm64 silicon?
Sorry, still learning this stuff!
I think the underscores are just the way name mangling works for C++ functions on your platform.
I think the undefined symbols might be prefixed with an underscore due to the name mangling conventions for arm64 silicon. The problem is probably that you didn't pass the nfd static/shared library to the linker when linking your binary. You need to add libnfd.a (or whatever your library is named) to the linker libraries list.
Thanks, yeah I think it's the name mangling as you say.
I thought I had linked it properly :
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_UTType", referenced from:
objc-class-ref in libnfd.a(nfd_cocoa.m.o)
"_UTTypeData", referenced from:
_AddFilterListToDialog in libnfd.a(nfd_cocoa.m.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
So the errors seem to derive from nfd_cocoa.m (for e.g. AddFilterListToDialog)
Might it be that I overlooked this stuff? https://github.com/btzy/nativefiledialog-extended#macos
I did over look that stuff. Seems to be compiling and working now :)
Hi there
I'm trying to add this library to my project in xcode, but I seem to be stuck on including the header files.
I've compile the static library, and linked to it. The examples are all working well too.
However, from the
nfd.h
header is included as<nfd.h>
fromnfd.hpp
which suggests that it's a system wide header, right? I get this innfd.hpp
:Have I missed a step in installing it in the right location?
Many thanks