|
From: | Peter Rowat |
Subject: | [XForms] Fwd: missing X11 library? |
Date: | Wed, 18 Nov 2015 11:37:20 -0800 |
Hello Jens and Jon, Thanks for your advice. I’ve tried several different orderings, as you both have suggested, but I still get the same effect: Using this command, when XXX.c is an XForms program NOT using any Xlib calls, compilation is successful, but when XXX.c has Xlib calls such as XDrawLines, compilation fails. (I changed my #include “forms.h” to <forms.h>) Perhaps this is related to the presence of Apple's Xcode app, and I should try the compilation from inside Xcode. I include below the “-v” output in case anyone can see some relevant info that I can’t. Peter ===== gcc -v -Wall -I/usr/local/include -I/opt/X11/include -o trime trime.c -L/usr/local/lib -lforms Apple LLVM version 7.0.0 (clang-700.1.76) Target: x86_64-apple-darwin15.0.0 Thread model: posix "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" -cc1 -triple x86_64-apple-macosx10.11.0 -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name trime.c -mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2 -target-linker-version 253.6 -v -dwarf-column-info -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/7.0.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -I /usr/local/include -I /opt/X11/include -Wall -fdebug-compilation-dir /Users/prowat/XFormsCode -ferror-limit 19 -fmessage-length 154 -stack-protector 1 -mstackrealign -fblocks -fobjc-runtime=macosx-10.11.0 -fencode-extended-block-signature -fmax-type-align=16 -fdiagnostics-show-option -fcolor-diagnostics -o /var/folders/vd/_jgw9cc88xj09k001s729p500000gp/T/trime-c64e11.o -x c trime.c clang -cc1 version 7.0.0 based upon LLVM 3.7.0svn default target x86_64-apple-darwin15.0.0 ignoring nonexistent directory "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/local/include" ignoring nonexistent directory "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/Library/Frameworks" #include "..." search starts here: #include <...> search starts here: /usr/local/include /opt/X11/include /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/7.0.0/include /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks (framework directory) End of search list. "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -dynamic -arch x86_64 -macosx_version_min 10.11.0 -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -o trime -L/usr/local/lib /var/folders/vd/_jgw9cc88xj09k001s729p500000gp/T/trime-c64e11.o -lforms -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/7.0.0/lib/darwin/libclang_rt.osx.a **** FOLLOWING does not appear (obviously) if there are no XLib calls **** Undefined symbols for architecture x86_64: "_XDrawLines", referenced from: _draw_triangle in trime-c64e11.o "_XFillPolygon", referenced from: _draw_triangle in trime-c64e11.o "_XSetForeground", referenced from: _draw_triangle in trime-c64e11.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [trime] Error 1
|
[Prev in Thread] | Current Thread | [Next in Thread] |