Author Topic: How to use Shared Library in CodeBlocks?  (Read 5958 times)

rubiktubik

  • Guest
How to use Shared Library in CodeBlocks?
« on: August 12, 2009, 07:45:42 pm »
Hi,

I want to write Clutter Application(http://en.wikipedia.org/wiki/Clutter_(toolkit) ) with CodeBlocks.
I am downloaded and compiled the source of clutter and get a "libclutter-glx-1.0.so"

What should i do to use the library in CodeBlocks?

What i have done:
  • included the library in the linker config of CodeBlocks
  • then tried to use it with: #include "clutter/clutter.h"
  • But the Compiler shows: /home/michi/C-C++/Clutter/main.c|2|Fehler: clutter/clutter.h: No such file or directory|


Can someone help?


Regards
rubiktubik

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: How to use Shared Library in CodeBlocks?
« Reply #1 on: August 12, 2009, 08:31:56 pm »
  • included the library in the linker config of CodeBlocks
  • then tried to use it with: #include "clutter/clutter.h"
  • But the Compiler shows: /home/michi/C-C++/Clutter/main.c|2|Fehler: clutter/clutter.h: No such file or directory|

Add the path to the clutter lib to the compiler's directory, too.

Besides: This is likely to become a general programming question. Be careful as this thread might get locked as it would violate our forum rules. I suggest you take a book about C++ basics including the description of how a compiler/linker works and read.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ