• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to use dynamic library in the Xcode
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to use dynamic library in the Xcode


  • Subject: Re: How to use dynamic library in the Xcode
  • From: Wang Yongqing <email@hidden>
  • Date: Thu, 26 Jun 2008 22:57:30 -0700 (PDT)

Hi,

Yes, it can generate the application based on i386, but it is failed based on ppc. 

The type of the dynamic library is

apple:lib apple$ file libpcsclite.1.0.0.dylib 
libpcsclite.1.0.0.dylib: Mach-O dynamically linked shared library i386

The error information is 

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?


::yongqing



----- 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

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: How to use dynamic library in the Xcode
      • From: Chris Espinosa <email@hidden>
  • Prev by Date: Re: Error for FSReadFork
  • Next by Date: Re: How to use dynamic library in the Xcode
  • Previous by thread: Re: How to use dynamic library in the Xcode
  • Next by thread: Re: How to use dynamic library in the Xcode
  • Index(es):
    • Date
    • Thread