Author Topic: How to use CB with GTK3 on Windows 10  (Read 12482 times)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: How to use CB with GTK3 on Windows 10
« Reply #15 on: May 05, 2018, 07:51:30 pm »
The wizard does NOT work for using the MSys2 mingw GCC compiler.

I would just save this project as a template and use the Template option in C::B.

The other questions should be answered by the Wiki and FAQs.
http://wiki.codeblocks.org/index.php/FAQ

If you do not know if the option should be added to the Compiler Global Settings or to the project settings; pick the project settings.

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

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: How to use CB with GTK3 on Windows 10
« Reply #16 on: May 05, 2018, 08:15:03 pm »
We should add support for the msys compiler with autodetection
and also in the scripts if msys is selected we simply can add the libraries, without search path and so on, because this is always the same and can be added to the compiler options...
We could even call pacman automatically in the wizard script if the package is not installed...

I don't think that this is hard to do? Msys is definitively the future on windows... pacman is a bless....

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: How to use CB with GTK3 on Windows 10
« Reply #17 on: May 05, 2018, 09:45:16 pm »
We should add support for the msys compiler with autodetection

Edit: I was hoping the Compiler code had changed enough that the changes was just in XML files.

Too hard for me to do; the last time I tried this one of the Devs said no because they did not like the way I did it.
I agree that my method was not very good.

If I figure out a better way; I might try to create a patch.

Tim S.
« Last Edit: May 05, 2018, 09:56:21 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: How to use CB with GTK3 on Windows 10
« Reply #18 on: May 05, 2018, 10:11:39 pm »
and also in the scripts if msys is selected we simply can add the libraries, without search path and so on, because this is always the same and can be added to the compiler options...

Creating an GTK2 project now; after I get the project to work, I will look at the C::B GTK wizard.

Edit: C::B Wizard just need very minor fix for GTK2; so, I do that fix and then see how to add GTK3 support.
Edit2: I plan to test GTK2/3 under Linux and then see if it works the Wizard code has several sections commented out for Linux.

Tim S.
« Last Edit: May 05, 2018, 10:51:19 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline arkkimede

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: How to use CB with GTK3 on Windows 10
« Reply #19 on: May 06, 2018, 01:11:49 am »
Quote
The wizard does NOT work for using the MSys2 mingw GCC compiler.

I would just save this project as a template and use the Template option in C::B.

The other questions should be answered by the Wiki and FAQs.
http://wiki.codeblocks.org/index.php/FAQ

If you do not know if the option should be added to the Compiler Global Settings or to the project settings; pick the project settings.

Tim S.

I tried to add library and path to search and for the function related to cairo I solved but for
pixbuf = gdk_pixbuf_new_from_file(filename, &error);
no!.
I report the error and the search dir and library for link in 3 different msg for the limits of the attachement
« Last Edit: May 06, 2018, 01:16:53 am by arkkimede »

Offline arkkimede

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: How to use CB with GTK3 on Windows 10
« Reply #20 on: May 06, 2018, 01:15:02 am »
pictures

Offline arkkimede

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: How to use CB with GTK3 on Windows 10
« Reply #21 on: May 06, 2018, 01:15:48 am »
Pictures link options

Offline arkkimede

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: How to use CB with GTK3 on Windows 10
« Reply #22 on: May 06, 2018, 01:16:28 am »
pictures search dirs

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: How to use CB with GTK3 on Windows 10
« Reply #23 on: May 06, 2018, 02:10:38 am »
Please post a build log in code tags.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: How to use CB with GTK3 on Windows 10
« Reply #24 on: May 06, 2018, 02:15:02 am »
You are not adding libraries in the normal Code::Blocks manner.

Quote
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.

From http://wiki.codeblocks.org/index.php/FAQ-Compiling_(general)#Q:_I_would_like_to_compile_a_project_using_some_non-standard_libraries._How_can_I_indicate_to_CodeBlocks_that_these_libraries_and_include_files_exist.3F

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

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline arkkimede

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: How to use CB with GTK3 on Windows 10 (Solved)
« Reply #26 on: May 07, 2018, 07:00:22 pm »
Now I'm finally able to compile and run a complete app with GTK3 on Windows 10 using C::B.

The solution is to put in the linker setting, other link options
`pkg-config --libs gtk+-3.0`

Thank you in any case for the support and the time that you have spent for me.