caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Ker Lutyn <ker527mail@yahoo.com>
To: caml-list@inria.fr
Subject: Mac OSX: calling OCaml from Objective-C in Xcode 2.2
Date: Wed, 23 Nov 2005 20:14:49 -0800 (PST)	[thread overview]
Message-ID: <20051124041449.4429.qmail@web34610.mail.mud.yahoo.com> (raw)

I have a static library "libmylib.a" containing wrapped OCaml code using the
Callback module (the code is compiled with ocamlopt and g++, and the library
includes libasmrun.a):

$ g++ -o foo main.cc libmylib.a

This works fine. Now, when I drop libmylib.a into my Xcode 2.2 project and
build, I get the following error:

/usr/bin/ld: libmylib.a(power.o) has local relocation entries in non-writable
section (__TEXT,__text)
collect2: ld returned 1 exit status

I have Googled for this and the only answer I can find is that -mdynamic-no-pic
flag should not be sent; this flag is controlled by the "Generate
Position-Dependent Code" flag in the "Code Generation" part of the Project
Build Settings. In my case, whether this is set or not makes no difference to
the error.

Does anyone have experience with this error?

ocaml version 3.09.0
gcc 4.0.1
Mac OSX 10.4.3
Xcode 2.2



	
		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com


             reply	other threads:[~2005-11-24  4:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-24  4:14 Ker Lutyn [this message]
2005-11-27  2:23 Ker Lutyn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051124041449.4429.qmail@web34610.mail.mud.yahoo.com \
    --to=ker527mail@yahoo.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).