stranger gtk thread issue

sangshuduo posted @ 2008年8月14日 00:01 in GTK with tags GTK linux thread , 1358 阅读

For a new task from my job, I need write a GTK application. It's fresh new to me. Yes, I have some years experience on Window$ application development. I have almost used everything of MFC in the past. I guess most UI frameworks are similar. MVC, window,

msg, archive, etc. But at least cocoa is quite different to MFC in something "work style". Just look at sample code of GTK, it is also something different to MFC. Whatever, a new domain is always interesting.

 

Back to the subject, I wrote a piece of code from scratch. Today, I want to add thread support for more complicated functions.

But I always got a segment fault on g_thread_init(NULL). And I just use a piece of official code from gnome.org it still fails.

int
main (int argc, char *argv[])
{
  GtkWidget *window;

  g_thread_init (NULL);
  gdk_threads_init ();
  gtk_init (&argc, &argv);

  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_widget_show (window);

  gdk_threads_enter ();
  gtk_main ();
  gdk_threads_leave ();

  return 0;
}
 

 

My compile command line is easy too.

 

gcc -o hell hell.c  \
        `pkg-config --cflags --libs gtk+-2.0 gthread`

After many many try and many many failures, I have to look at a large Makefile of another open source software's source code tree. After remove libraries one by one from about thirty libraries, I locate the root cause is --

I need use ghread-2.0 rather than gthread.

Avatar_small
will writer near me 说:
2020年6月23日 04:44

Thank you again for all the knowledge you distribute,Good post. I was very interested in the article, it's quite inspiring I should admit. I like visiting you site since I always come across interesting articles like this one.Great Job, I greatly appreciate that.Do Keep sharing!

Avatar_small
rough interracial se 说:
2020年7月13日 23:03

Thanks for sharing nice information with us. i like your post and all you share with us is uptodate and quite informative. i would like to bookmark the page so i can come here again to read you. as you have done a wonderful job.

Avatar_small
Gordijnen op maat 说:
2020年7月16日 00:14

Thanks for every other informative site. The place else may just I get that kind of information written in such an ideal means? I have a venture that I’m just now operating on, and I have been on the look out for such information.

Avatar_small
Property management 说:
2020年7月16日 08:24

Hi, I find reading this article a joy. It is extremely helpful and interesting and very much looking forward to reading more of your work.

Avatar_small
Electrical contracto 说:
2020年7月16日 08:24

Exceptionally decent blog and articles. I am realy extremely glad to visit your blog. Presently I am discovered which I really need. I check your blog ordinary and attempt to take in something from your blog. Much obliged to you and sitting tight for your new post.

Avatar_small
mobile app developer 说:
2020年7月17日 17:05

Thank you for the great article I did enjoyed reading it, I will be sure to bookmark your blog and definitely will come back from again. I want to encourage that you continue your great job.

Avatar_small
Buy Instagram likes 说:
2020年7月25日 11:31

This is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value of providing a quality resource for free. Buy Instagram likes

Avatar_small
Buy Instagram likes 说:
2020年8月19日 04:40

This particular papers fabulous, and My spouse and i enjoy each of the perform that you have placed into this. I’m sure that you will be making a really useful place. I has been additionally pleased.

Avatar_small
Pak24tv 说:
2020年12月06日 23:31

I am happy to find your distinguished way of writing the post. Now you make it easy for me to understand and implement the concept. Thank you for the post. what is vpn periodic table voided check

Avatar_small
Robinjack 说:
2020年12月28日 02:02

I like what you guys are up too. Such clever work and reporting! Keep up the superb works guys I have incorporated you guys to my blogroll. I think it will improve the value of my website . software project management

Avatar_small
Vape Tips and Guide 说:
2021年1月27日 01:26

This is again a helpful post. I always read your all posts and always wait for your next posts, but i didn't find any bug in this.

Avatar_small
Robinjack 说:
2021年2月17日 19:57

If only my personal content articles appeared as if this particular! That’s a enhance, btw?-I ‘m new to blog publishing as well as reading numerous blogs helps me out with my very own. Any info you could throw my way to help is very appreciated. Thanks for the great info on this particular post! mini drone with camera

Avatar_small
Nairobi raha 说:
2021年2月22日 18:40

What a fantabulous post this has been. Never seen this kind of useful post. I am grateful to you and expect more number of posts like these. Thank you very much. gridsome body class Hey what a brilliant post I have come across and believe me I have been searching out for this similar kind of post for past a week and hardly came across this. Thank you very much and will look for more postings from you. body fitted grid It was wondering if I could use this write-up on my other website, I will link it back to your website though.Great Thanks. crystal body grid Great article Lot's of information to Read...Great Man Keep Posting and update to People..Thanks gridsome body class Thanks For sharing this Superb article.I use this Article to show my assignment in college.it is useful For me Great Work. body fitted grid

Avatar_small
amelia 说:
2021年3月13日 00:08

Somebody Sometimes with visits your online journal frequently and prescribed it I would say to peruse too. The method for composing is brilliant furthermore the substance is first class. A debt of gratitude is in order for that understanding you give the perusers!  Buy 4 AcO DMT

Avatar_small
amelia 说:
2021年3月15日 00:32

I truly like you're composing style, incredible data, thankyou for posting.  wholesale jewelry suppliers

Avatar_small
amelia 说:
2021年3月18日 19:30

I am happy you take pride in what you compose. This makes you stand way out from numerous different scholars that push ineffectively composed substance.  wholesale bags

Avatar_small
amelia 说:
2021年3月18日 19:30

it was a magnificent opportunity to visit this sort of site and I am glad to know. much obliged to you such a great amount for allowing us to have this open door..  wholesale hair accessories

Avatar_small
chalsea 说:
2021年4月15日 01:30

I am happy to find your distinguished way of writing the post. Now you make it easy for me to understand and implement the concept. Thank you for the post. scopes

Avatar_small
chalsea 说:
2021年4月15日 01:30

Hey, I discover perusing this article a delight. It is greatly useful and intriguing and all that much anticipating perusing a greater amount of your work..  heavy jets

Avatar_small
amelia 说:
2021年5月22日 04:13

Great artcile, however it would be better if in future you can share more about this subject. Continue posting. minecraft remoteconnect

Avatar_small
audit automation sof 说:
2021年5月26日 13:31

I am usually to blogging and that i genuinely appreciate your posts. The content has really peaks my interest. I will bookmark your internet site and maintain checking for new information.

Avatar_small
ch 说:
2021年5月29日 04:03

I can set up my new thought from this post. It gives inside and out data. A debt of gratitude is in order for this profitable data for all,..  click here

Avatar_small
ch 说:
2021年6月06日 02:50

This is really an incredible read for me. I have bookmarked it and I am anticipating perusing new articles. Keep doing awesome!.  visit this page

Avatar_small
chalsea 说:
2021年6月07日 04:46

They achieve this by connecting Creators, influencers and brands through an accessible and transparent smart-contract based marketplace. They also provide monetization opportunities for creative content through NFTs and enabling widespread audience exposure and engaging consumers effectively social media marketing

Avatar_small
amelia 说:
2021年6月10日 19:59

I truly adored perusing your web journal. It was extremely all around composed and straightforward. Not at all like different online journals I have perused which are truly not that good.Thanks alot!  click here

Avatar_small
amelia 说:
2021年6月16日 17:45

I discovered your this post while hunting down some related data on site search...Its a decent post..keep posting and upgrade the data.  uv gel polish

Avatar_small
amelia 说:
2021年6月16日 17:45

Nice to be visiting your blog again, it has been months for me. Well this article that i’ve been waited for so long. I need this article to complete my assignment in the college, and it has same topic with your article. Thanks, great share. EYDFA

Avatar_small
amelia 说:
2021年6月16日 17:45

Awesome things you've generally imparted to us. Simply continue composition this sort of posts.The time which was squandered in going for educational cost now it can be utilized for studies.Thanks  ghk-cu

Avatar_small
amelia 说:
2021年6月17日 23:21

I discovered your this post while looking for data about site related examination ... It's a decent post .. continue posting and upgrading data.  Ativan for sale

Avatar_small
amelia 说:
2021年6月22日 19:17

This is such an extraordinary asset, to the point that you are giving and you give it away for nothing. I cherish seeing sites that comprehend the benefit of giving a quality asset to free. It is the old what circumvents comes around schedule.  Wastewater Treatment

Avatar_small
amelia 说:
2021年6月25日 18:23

You make such a variety of extraordinary focuses here that I read your article two or three times. Your perspectives are as per my own particular generally. This is extraordinary substance for your perusers.  بابريكا حلوه

Avatar_small
Baccarat Casino Matc 说:
2021年7月04日 00:44

This has to be one of my favorite posts! And on top of thats its also very helpful topic for newbies. nice one a lot for the information!

Avatar_small
ch 说:
2021年7月05日 18:47

It's suitable time to make a few arrangements for the future and the time has come to be glad. I have perused this post and on the off chance that I might I be able to wish to propose you few intriguing things or exhortation. Maybe you could compose next articles alluding to this article. I craving to peruse considerably more things about it!  kind sneakers

Avatar_small
ch 说:
2021年7月13日 02:16

Incredible data! I as of late went over your site and have been perusing along. I thought I would leave my first remark. I don't comprehend what to say aside from that I have.  mobile mechanic tomball

Avatar_small
ch 说:
2021年8月20日 18:25

Interesting topic for a blog. I have been searching the Internet for fun and came upon your website. Fabulous post. Thanks a ton for sharing your knowledge! It is great to see that some people still put in an effort into managing their websites. I'll be sure to check back again real soon. olejek cbd

Avatar_small
ch 说:
2021年8月21日 01:27

Pleasant to peruse your article! I am anticipating sharing your enterprises and encounters.  PCR test near me

Avatar_small
Robinjack 说:
2021年8月22日 21:57

Well, the article is in reality the greatest on that worthw hile topic. I harmonise with your conclusions and also will certainly thirstily look forward to your approaching updates. Simply saying thanks will certainly not simply just be adequate, for the enormous lucidity in your writing. I can right away grab your rss feed to stay abreast of any updates. Admirable work and much success in your business enterprize! retail sales audit software

Avatar_small
ch 说:
2021年9月05日 00:31

Extremely helpful post. This is my first time i visit here. I discovered such a variety of fascinating stuff in your online journal particularly its exchange. Truly its extraordinary article. Keep it up.  Social Media

Avatar_small
Robinjack 说:
2021年9月06日 20:21

There is noticeably a bundle comprehend this. I suppose you have made specific nice points in functions also. elite auto shipping reviews

Avatar_small
ch 说:
2021年10月05日 23:32

I simply discovered this site and have high trusts in it to proceed. Keep up the considerable work, its elusive great ones. I have added to my top picks. Much thanks to You.  Gynecology

Avatar_small
ch 说:
2021年10月09日 01:18

Incredible data! I as of late went over your site and have been perusing along. I thought I would leave my first remark. I don't comprehend what to say aside from that I have.  lowes employee portal

Avatar_small
ch 说:
2021年10月24日 01:23

Cool stuff you have and you keep redesign every one of us.  escuela en linea

Avatar_small
Robinjack 说:
2021年11月07日 19:29

Hi there, simply was alert to your blog via Google, and found that it’s really informative. I’m going to watch out for brussels. I’ll be grateful if you happen to continue this in future. Numerous other folks will likely be benefited out of your writing. Cheers! deer fence installation

Avatar_small
ch 说:
2021年12月02日 19:04

Fantastic article. Exceptionally fascinating to peruse. I truly love to peruse such a decent article. Much obliged! continue shaking. Instagram Algorithm

Avatar_small
ch 说:
2021年12月15日 04:39

I truly like you're composing style, awesome data, thankyou for posting. RHODIOLA

Avatar_small
ch 说:
2021年12月24日 21:23

Superb article. Extremely fascinating to peruse. I truly love to peruse such a pleasant article. Much obliged! continue shaking. company registration Hong Kong

Avatar_small
ch 说:
2022年1月18日 03:44

It is basic that we read blog entry painstakingly. I am as of now done it and find this post is truly astonishing. computer software program

Avatar_small
ch 说:
2022年1月19日 03:18

Pleasant to peruse your article! I am anticipating sharing your enterprises and encounters. https://www.5g999.co/baccarat

Avatar_small
ch 说:
2022年2月08日 19:50

This is a splendid web journal! I'm extremely content with the remarks!.. dermajem reviews

Avatar_small
ch 说:
2022年2月10日 05:05

Hey what a splendid post I have run over and trust me I have been hunting out down this comparative sort of post for recent week and barely ran over this. Much thanks and will search for more postings from you. Sutiene

Avatar_small
ch 说:
2022年2月14日 04:01

This is a savvy blog. I would not joke about this. You have such a great amount of learning about this issue, thus much enthusiasm. You additionally know how to make individuals rally behind it, clearly from the reactions. https://www.laksjfl.com

Avatar_small
ch 说:
2022年2月14日 04:01

Marvelous and fascinating article. Incredible things you've generally imparted to us. Much obliged. Simply keep making this kind out of post. https://MM88IT.com

Avatar_small
pgslot 说:
2022年2月25日 05:36

This is a popular game for players around the world. Now, the game has reached the standard and guaranteed the quality of members. Your lottery world is no longer a boring special pgslot game. Play a simple Jack pocket PG slot in each system. This is one of the most fragile designs.

Avatar_small
ch 说:
2022年3月18日 05:44

A captivating examination is worth remark. I imagine that it is best to compose additional on this matter, it won't be a forbidden subject however for the most part individuals are insufficient to chat on such themes. To the following. Salud Heavy R

Avatar_small
amelia 说:
2022年5月20日 02:53

I love seeing blog that understand the value of providing a quality resource for free. Frisco Texas Landscaping

Avatar_small
amelia 说:
2022年6月25日 02:00

Extraordinary article Lot's of data to Read...Great Man Keep Posting and upgrade to People..Thanks capture carpet and rug dry cleaner

Avatar_small
amelia 说:
2022年6月28日 21:40

On the off chance that more individuals that compose articles truly fretted about composing incredible substance like you, more perusers would be occupied with their works. Much obliged to you for thinking about your substance. Virtual Training

Avatar_small
amelia 说:
2022年7月03日 18:50

Extremely decent article, I delighted in perusing your post, exceptionally pleasant offer, I need to twit this to my devotees. Much obliged!. corporate office address

Avatar_small
amelia 说:
2022年7月12日 02:49

I adore this online journal!! The glimmer up the top is wonderful!! FinanceHunt UK Equity Release

Avatar_small
amelia 说:
2022年9月01日 01:26

Hello, I have browsed most of your posts. This post is probably where I got the most useful information for my research. Thanks for posting, maybe we can see more on this. Are you aware of any other websites on this subject. https://aka.ms/remoteconnect konto


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter