Hottest Free Downloads - DownloadPipe.com Over 197,000 downloads! Bookmark Now!
DownloadPipe.com - New Downloads Every Minute
 SEARCH:
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Xcode and dynamic linking, willing to pay $$ for good advice

 
   Mac (Home) -> Programmer Help RSS
Next:  newbie with xcode - Am *VERY* disappointed...  
Author Message
connell

External


Since: May 03, 2006
Posts: 5



(Msg. 1) Posted: Tue Apr 25, 2006 2:02 pm
Post subject: Xcode and dynamic linking, willing to pay $$ for good advice
Archived from groups: comp>sys>mac>programmer>help (more info?)

Hello. I am an experienced programmer (www.chc-3.com) but have run into
a problem I need help with. I am programming on my new Mac Mini after
many years on Wintel. I am using the latest OS X and Xcode versions. I
am trying to compile/link a small program that dynamically links to an
installed product (Lotus Notes). My code compiles just fine, but I
don't know how to get it to link. I don't think I need a Notes expert
(I am one) -- I need a Mac development expert who knows Xcode well. I
can send some $$ or a gift to someone who can talk me through this.

Chuck Connell
www.chc-3.com
Woburn, MA
781-939-0505
Back to top
Login to vote
Patrick Machielse

External


Since: Jun 28, 2005
Posts: 92



(Msg. 2) Posted: Tue Apr 25, 2006 11:48 pm
Post subject: Re: Xcode and dynamic linking, willing to pay $$ for good advice [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

<connell.RemoveThis@chc-3.com> wrote:

> I am trying to compile/link a small program that dynamically links to an
> installed product (Lotus Notes). My code compiles just fine, but I don't
> know how to get it to link.

Chuck,

Sounds like the compiler can find the appropriate header files, but the
linker can't locate the .dylib. There are (at least) two ways to make
Xcode link to a library:

- Project -> Add to Project, and point to the lib
- In the build settings, edit the linker flags: -L/path/to/lib

Did you try this?

What errors do you see in the build window (shift-command-b, make sure
you see _all_ panes, some are hidden by default!).

patrick
Back to top
Login to vote
connell

External


Since: May 03, 2006
Posts: 5



(Msg. 3) Posted: Wed Apr 26, 2006 8:24 am
Post subject: Re: Xcode and dynamic linking, willing to pay $$ for good advice [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Thanks Patrick,

The error is "not a Mach-O file" when I add the file that I *think* is
the correct file to the project. It is not named .dylib but rather has
no extension. It is possible I am linking with the wrong file, or that
there is no dynamic library at all to link with. Notes API programming
to the Mac has been supported for years (although little used) so I
want to think that it is possible to do this link.

Chuck
Back to top
Login to vote
connell

External


Since: May 03, 2006
Posts: 5



(Msg. 4) Posted: Wed Apr 26, 2006 11:25 am
Post subject: Re: Xcode and dynamic linking, willing to pay $$ for good advice [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Yes, I did the first of these (add to project)

Chuck
Back to top
Login to vote
Patrick Machielse

External


Since: Jun 28, 2005
Posts: 92



(Msg. 5) Posted: Wed Apr 26, 2006 8:45 pm
Post subject: Re: Xcode and dynamic linking, willing to pay $$ for good advice [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

<connell.TakeThisOut@chc-3.com> wrote:

> The error is "not a Mach-O file" when I add the file that I *think* is
> the correct file to the project. It is not named .dylib but rather has
> no extension. It is possible I am linking with the wrong file, or that
> there is no dynamic library at all to link with.

I think the problem could be that the library you are linking to is an
old style Mac binary in the CFM format, and not an OS X native Mach-O
binary.

I'm not an expert on this subject, but I believe that Xcode can only
create Mach-O binaries. For PowerPC targets, it is possible to link to
CFM libraries. Since you are working on an Intel mini (I believe), it is
probably not possible to link to the the CFM binary, since CFM cannot
contain i386 code. You may be able to build a working Mach-O PPC only
binary that will work in Rosetta.

Maybe someone more versed in CFM can provide a more authorative
answer...

patrick
Back to top
Login to vote
connell

External


Since: May 03, 2006
Posts: 5



(Msg. 6) Posted: Thu Apr 27, 2006 9:59 am
Post subject: Re: Xcode and dynamic linking, willing to pay $$ for good advice [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Thanks Patrick. I may pay for a support call to Apple about this.

Chuck
Back to top
Login to vote
Patrick Machielse

External


Since: Jun 28, 2005
Posts: 92



(Msg. 7) Posted: Thu Apr 27, 2006 8:09 pm
Post subject: Re: Xcode and dynamic linking, willing to pay $$ for good advice [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

<connell.TakeThisOut@chc-3.com> wrote:

> Thanks Patrick. I may pay for a support call to Apple about this.

Either that or call IBM, depending on where the problem lies.

You might also find an answer on the Apple Develper mailing lists:

<http://lists.apple.com/>

patrick
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Linking a Cocoa Framework with a C++ dynamic library - Hi, I'd like to build a cocoa framework which links with a dynamic c++ library. To explore the intricacies of this task I wanted to create a very simple test project. I started a new xcode project based on the Cocoa Framework template. I then created a...

Linking problem - I have a simple static library, and a directory containing a test program (on Mac OS X). The make run is as follows: make libfoo.a cc -W -Wall -O2 -c -o messagebuffer.o messagebuffer.c libtool -static -o libfoo.a messagebuffer.o cd test; make test cc -...

Linking a directory of static libraries - Hello folks, for a project I need to link in a rather large directory of static libraries. My question is, what is the best solution to do this? For now, I manually add -l entries in the "Other Linker Flags" field in the build options, but thi...

New Programer looking for advice on a Project - Hi all, I am a novice programer (Pascal and Basic in HS). I am interested in creating a card game that is a variationof canasta. I know noone will make a this game for the mac so If i want it I will need to make it. The first qauestion is what..

Advice for multiple windows design - I'm thinking of a design, where the main window uses an NSTableView. Each row in that would respond to a doubleclick action to present another window, also using NSTableView, to provide further detail from the parent's windows row. And finally..
       Mac (Home) -> Programmer Help All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum
Categories:
 Windows Forums
 Game Forums
 Linux Forums
  Mac Forums
 PDA Forums
 Mobile Forums
  Top  |  Store  |  RSS Feeds RSS  |  Data Feeds  |  Advertise  |  Submit  |  Bookmark  |  Newsletter  |  Contact