[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] C igraph compilation problem on Lion

From: Wu Degang
Subject: Re: [igraph] C igraph compilation problem on Lion
Date: Mon, 14 Nov 2011 20:07:16 +0800
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:8.0) Gecko/20111105 Thunderbird/8.0


Building target: test2
Invoking: GCC C Linker
gcc -L/opt/local/lib -o "test2"  ./src/test2.o
ld: library not found for -l/opt/local/lib/libigraph.a
Do you have a file named /opt/local/lib/libigraph.a? It might be the case
that you only have the dynamic library, which is named
/opt/local/lib/libigraph.so or libigraph.dylib.

If you do have libigraph.a in /opt/local/lib, check whether it's built for
i386 or x86_64 (use "file /opt/local/lib/libigraph.a" to figure it out). If
it's the i386 version, add "-arch i386" to the compiler flags to make sure
that your executable is also built for i386.

-- T.

Yes. I have that exact file.
"file" gave the following output:
~ wudegang$ file /opt/local/lib/libigraph.a
/opt/local/lib/libigraph.a: current ar archive random library

While I still cannot build the program using -l/opt/local/lib/libigraph.a, I can build it using just -ligraph option.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]