Trouble linking on macOS
i-am-the-slime opened this issue · comments
Maybe you can help me figure this out:
I compile with these arguments:
make \
CXXFLAGS=" \
-fmax-errors=1 \
-I/usr/include/python2.7 \
-I/Developer/Panda3D/include \
-I/usr/local/Cellar/freetype/2.9.1/include/freetype2" \
LDFLAGS=" \
-L/Developer/Panda3D/lib \
-lp3framework \
-lpanda \
-lpandafx \
-lpandaexpress \
-lp3dtoolconfig \
-lp3dtool \
-lp3pystub \
-lp3direct \
-pthread \
-lpthread"
I receive this output https://gist.github.com/i-am-the-slime/8e34436d69b5024503f4061df69a7e62
Which complains about Undefined symbols for architecture x86_64
. I am confused which headers are not there for 64 bits.
I actually get the same problem when forcing the architecture to i386.
ld: warning: The i386 architecture is deprecated for macOS (remove from the Xcode build setting: ARCHS)
Undefined symbols for architecture i386:
Okay, I finally managed. I compiled panda3d myself.
This left me with the following make command:
make \ 10:54:13
CXXFLAGS=" \
-fmax-errors=1 \
-I/usr/include/python2.7 \
-I/Users/mark/code/panda3d/built/include \
-I/usr/local/Cellar/freetype/2.9.1/include/freetype2" \
LDFLAGS=" \
-L/Users/mark/code/panda3d/built/lib \
-lp3framework \
-lpanda \
-lpandafx \
-lpandaexpress \
-lp3dtoolconfig \
-lp3dtool \
-lp3pystub \
-lp3direct \
-pthread \
-lpthread"
Then there were complaints about the shared libraries not being found.
My radical solution is to the lib
folder from the self-built panda3d to output
.
After that:
dyld: Library not loaded: @loader_path/../Frameworks/Cg.framework/Cg
So on to install that bad-boy from here.
Finally I needed to also copy the etc
folder over from panda3d due to
No graphics pipe is available!
Your Config.prc file must name at least one valid panda display
library via load-display or aux-display.
And then...