News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Compiling GTK+ code

Started by Gamegoofs2, October 28, 2009, 01:09:06 AM

Previous topic - Next topic

Gamegoofs2

How do I link the GTK+ libraries with Code blocks so that I can program with GTK?

MortenMacFly

Quote from: Gamegoofs2 on October 28, 2009, 01:09:06 AM
How do I link the GTK+ libraries with Code blocks so that I can program with GTK?
Go to the project options, linker tab and add the needed libraries. There should also be a GTK project wizard available (under file -> new project) if you've installed the scripted wizard plugin.

More information is not possible as you forgot to state, platform, OS, (C::B/OS) version etc...
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

Gamegoofs2

#2
Oops, sorry. I'm running on Vista and my version of Code blocks is 8.02.

Saturday night I compiled gtk code properly, but when I got on Monday and tried to compile the same code I got errors like the gtk header wasn't there. I used the wizard to set up gtk I thought.

I'll try what you said though. Thanks.

Gamegoofs2

I tried the wizard and the project > build options > Linker neither of them worked.

When I compiled doing the wizard way it compiled but I got this error:
This application has failed to start because libglib-2.0-0.dll was not found. Re-installing the application may fix this problem.

Help please!
Thanks

oBFusCATed

Place the gtk dlls alongside (in the same directory) you executable or in a directory on your PATH (not sure about that this will work)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Gamegoofs2

How come it worked once then and stopped working? How do I get it to work with out placing the .DLLs in the same file?

stahta01

#6
Quote from: Gamegoofs2 on October 30, 2009, 11:48:34 PM
How come it worked once then and stopped working? How do I get it to work with out placing the .DLLs in the same file?

Long Answer: Learn how to program under windows.
Short Answer: Put DLLs in a folder that is in the PATH; NOTE, this method has drawbacks!!

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]