Ask a Question related to Mac Programming, Design and Development.
-
Mark Bee #1
Cocoa Project + GMP Problem...
Hello all,
I have installed GMP version 4.1.2, a mathematics computing library,
whereby I can do arbitrary length integer, float, etc. calculations.
I first tested it with a simple C program:
<code>
#include <stdio.h>
#include <gmp.h>
main() {
char c[200];
mpz_t pi;
mpz_init_set_str(pi, "3141592653589793238462643383279502884",
10);
mpz_get_str(c, 10, pi);
printf("%s\n", c);
}
</code>
This code simply initialises a variable called pi to pi's value, and
prints it out again. The thing is, is that this worked fine. Note that
I had to compile it using the -lgmp flag, as said in the documentation.
When I tried to use GMP in a Cocoa project, I compiled the project, and
the Build pane gives me an error in the Linking phase:
Warning prebinding disable because of undefined symbols
Undefined symbols: ___gmpz_get_str ___gmpz_init_set_str
Build failed (1 error, 1 warning)
Why is this happening? I have also edited the active target, and in the
Build settings I added '-lgmp', (without the quotes), in the 'Other C
Compiler Flags' field.
What have I done wrong?
Thanks in advance,
Mark Bee.
Mark Bee Guest
-
MacOSX project menu problem
Hi again, Second post in one day - eek. In my application I have a custom menu system so that I can keep control over them but this is causing... -
RubyCocoa problem: No such file to load -- osx/objc/cocoa
Hi, I'm trying to get RubyCocoa to work with ruby 1.8.0 on MacOS 10.2.8. I followed Simon's advice and unchecked libruby-static.a in the... -
Cocoa: problem dragging PDF image rep into Keynote slide
I have a Cocoa app in which I'm having trouble dragging PDF image reps from NSImageViews (and other NSView subclasses) into Keynote slides. I... -
MAC problem with my PC project
I wrote yesterday about the problem with a project I created that is part of a web page that some people could not see. I found out later one of... -
New Web Project problem
I am unable to create a new asp.net web application from VS.Net on a remote server (i.e. not localhost). I have created a project folder on the... -
matt neuburg #2
Re: Cocoa Project + GMP Problem...
In <1fzuwac.1m4ll281j5nh1cN%markbee@anon.com.au> Mark Bee wrote:
I don't think it's important. You can the turn the warning off in your> OK, I managed to fix that error, but then I get this warning:
>
> Warning prebinding disabled because dependent library:
> /usr/local/lib/libgmp.3.dylib is not prebound
>
> What does this mean? Is it important?
project's target by telling it not to be interested in prebinding.
Alternatively you can try to prebind the library with update_prebinding.
m.
--
matt neuburg, phd = [email]matt@tidbits.com[/email], [url]http://www.tidbits.com/matt[/url]
REALbasic: The Definitive Guide! 2nd edition!
[url]http://www.amazon.com/exec/obidos/ASIN/0596001770/somethingsbymatt[/url]
Subscribe to TidBITS. It's free and smart.
matt neuburg Guest
-
Mark Bee #3
Re: Cocoa Project + GMP Problem...
> I don't think it's important. You can the turn the warning off in your
It seems that the compiled app doesn't start up on the other Mac I'm> project's target by telling it not to be interested in prebinding.
> Alternatively you can try to prebind the library with update_prebinding.
running here, (GMP not installed - and won't be), and it works fine on
the one that I'm working on it, on. On the other Mac, it bounces in the
Dock, but then disappears all by itself, (like an app that has quit) --
no warnings, error messages, nothing -- it simply quits. No windows are
displayed, etc...
This update_prebinding thing. How do I use it? I know it's a UNIX
utility run from the command line, but how do I use it? I've read the
man file, but it doesn't really make much sense to me. I don't even
know where it's been installed on my system. (Apparently the gmp.h file
is in the directory:
../../usr/local/include
The .info files are in:
../../usr/local/info
And the files:
libgmp.3.3.2.dylib, libgmp.3.dylib, libgmp.a, libgmp.dylib,
libgmp.la are in:
../../usr/local/lib
etc...
Finally, what I've done in the Cocoa project, is simply typed
#include <gmp.h>
in the class file header I'm using GMP in. Would it be better if I
simply dragged the gmp-4.1.2/ folder into the 'Groups & Files' list in
Pb, and changed #include <gmp.h> to #include "gmp-4.1.2/gmp.h"?
Thanks for the answers to my many questions. :-)
Thanks in advance,
Mark Bee.
Mark Bee Guest
-
matt neuburg #4
Re: Cocoa Project + GMP Problem...
In <1fzw0ku.1603o041tydq8sN%markbee@anon.com.au> Mark Bee wrote:
If you don't get any, ask on Apple's Project Builder Users mailing list.> Thanks for the answers to my many questions.
m.
--
matt neuburg, phd = [email]matt@tidbits.com[/email], [url]http://www.tidbits.com/matt[/url]
REALbasic: The Definitive Guide! 2nd edition!
[url]http://www.amazon.com/exec/obidos/ASIN/0596001770/somethingsbymatt[/url]
Subscribe to TidBITS. It's free and smart.
matt neuburg Guest



Reply With Quote

