Author Topic: Using GTk-3 library from an ordinary c file  (Read 123 times)

Offline Willy

  • Single posting newcomer
  • *
  • Posts: 1
Using GTk-3 library from an ordinary c file
« on: January 30, 2020, 05:56:34 pm »
Hello everyone, I've followed the tutorial on: https://www.youtube.com/watch?v=ffgbsHZeluI
to create new GTK 3 project building with mingw. And it worked successfully for me.
Now I can create&build&run a GTK-3 project on codeblocks without an error.

But, i want to use that library without creating a gtk3 project because I'm considering to use also other libraries such as OpenCV ... in a single executable.

So which settings actually I should make that make every single c file work on Codeblocks can also build with GTK3 library?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6753
    • My Best Post
Re: Using GTk-3 library from an ordinary c file
« Reply #1 on: January 30, 2020, 07:30:49 pm »
For your project :
- Right click on the project then select Build options
- Select the directories tab
- Add the required paths for compiler and linker.
- Add your specific libraries in the linker tab.
- Pay attention to project settings and target settings.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org