Yes, it can generate the application based on i386, but it is failed based on ppc.
ld: warning in /Developer/SDKs/MacOSX10.5.sdk/usr/local/lib/libpcsclite.1.0.0.dylib, file is not of required architecture
Undefined symbols:
"_g_rgSCardT1Pci", referenced from:
_g_rgSCardT1Pci$non_lazy_ptr in tdstest.o
"_SCardListReaders", referenced from:
_main in tdstest.o
_main in tdstest.o
"_SCardStatus", referenced from:
_main in tdstest.o
"_SCardDisconnect", referenced from:
_main in tdstest.o
_main in tdstest.o
"_g_rgSCardT0Pci", referenced from:
_g_rgSCardT0Pci$non_lazy_ptr in tdstest.o
"_SCardSetAttrib", referenced from:
_main in tdstest.o
"_pcsc_stringify_error", referenced from:
_test_rv in tdstest.o
_test_rv in tdstest.o
_test_rv in tdstest.o
_main in tdstest.o
"_SCardReleaseContext", referenced from:
_test_rv in tdstest.o
_main in tdstest.o
_main in tdstest.o
"_SCardControl", referenced from:
_main in tdstest.o
"_SCardTransmit", referenced from:
_main in tdstest.o
"_SCardEstablishContext", referenced from:
_main in tdstest.o
"_SCardGetAttrib", referenced from:
_main in tdstest.o
_main in tdstest.o
_main in tdstest.o
_main in tdstest.o
_main in tdstest.o
"_SCardGetStatusChange", referenced from:
_main in tdstest.o
_main in tdstest.o
"_SCardConnect", referenced from:
_main in tdstest.o
"_SCardReconnect", referenced from:
_main in tdstest.o
"_SCardListReaderGroups", referenced from:
_main in tdstest.o
_main in tdstest.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
So it indicate the file architecture is not right, whether Xcode can not generate the Universal Binary by linking the dynamic library which is only support the i386 architecture?
----- Original Message ----
From: Stefan Werner <email@hidden>
To: Wang Yongqing <email@hidden>
Cc: Chris Espinosa <email@hidden>; xcode-users <email@hidden>
Sent: Friday, June 27, 2008 1:36:10 PM
Subject: Re: How to use dynamic library in the Xcode
Hi,
On Jun 27, 2008, at 7:20 AM, Wang Yongqing wrote:
> Yes, I set the Other Linker Flags to "/usr/local/lib"
> and Header Search Paths is "/usr/local/include/"
> Library Search Paths is "/usr/local/lib"
>
> I have added the /usr/local/lib/libpcsclite.1.0.0.dylib into my
> project.
Remove "/usr/local/lib" from the other linker flags, then it should
hopefully work. Other linker flags are passed directly to ld, and ld
interprets a file path as a file to link against (even if it is, like
in your case, a directory).
-Stefan