Hi,
I am new in igraph and C++ at all and I have a problem with linker. Igraph was installed successfully using Homebrew but when I tried to run the tutorial code tutorial1.c from examples tutorial1 on github I had an error:
ld: Undefined symbols: _igraph_destroy, referenced from: _main in tutorial1-b341c6.o _igraph_diameter, referenced from: _main in tutorial1-b341c6.o _igraph_ecount, referenced from: _main in tutorial1-b341c6.o _igraph_erdos_renyi_game_gnm, referenced from: _main in tutorial1-b341c6.o _igraph_rng_default, referenced from: _main in tutorial1-b341c6.o _igraph_rng_seed, referenced from: _main in tutorial1-b341c6.o _igraph_vcount, referenced from: _main in tutorial1-b341c6.o clang: error: linker command failed with exit code 1 (use -v to see invocation)
I found the topic with similar problem similar problem and I have tried to use solutions from it:
- I have tried to generate both of static and shared libraries
- I have tried to change flags in igraph.pc file (-lc++ to -lstdc++)
Despite my attempts, errors occurred again.
Could anyone tells me what I did wrong?