Microsoft Visual studio Linker problem

View: New views
3 Messages — Rating Filter:   Alert me  

Microsoft Visual studio Linker problem

by Daemon-10 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi everyone, i am new in this list and also in gtkmm. So i face some problems....
I download the gtkmm , and i installed it carefully, following exactly the instructions in this. Also i tried this. However, when i try to compile it with Glib::thread_init(); in main , i get the following linker error 1>Threads.obj : error LNK2019: unresolved external symbol _g_thread_init referenced in function "void __cdecl Glib::thread_init(struct _GThreadFunctions *)" (?thread_init@Glib@@YAXPAU_GThreadFunctions@@@Z)
1>C:\Users\Konstantinos\Documents\Visual Studio 2008\Projects\Glib Thread\Debug\Glib Thread.exe : fatal error LNK1120: 1 unresolved externals. Can anyone help me?


_______________________________________________
gtkmm-list mailing list
gtkmm-list@...
http://mail.gnome.org/mailman/listinfo/gtkmm-list

Re: Microsoft Visual studio Linker problem

by Armin Burgmeier :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sat, 2009-06-27 at 14:35 +0300, Daemon wrote:

> Hi everyone, i am new in this list and also in gtkmm. So i face some
> problems....
> I download the gtkmm , and i installed it carefully, following exactly
> the instructions in this. Also i tried this. However, when i try to
> compile it with Glib::thread_init(); in main , i get the following
> linker error 1>Threads.obj : error LNK2019: unresolved external symbol
> _g_thread_init referenced in function "void __cdecl
> Glib::thread_init(struct _GThreadFunctions
> *)" (?thread_init@Glib@@YAXPAU_GThreadFunctions@@@Z)
> 1>C:\Users\Konstantinos\Documents\Visual Studio 2008\Projects\Glib
> Thread\Debug\Glib Thread.exe : fatal error LNK1120: 1 unresolved
> externals. Can anyone help me?

I think you need to add gthread-2.0.lib to the libraries to link
against.

Maybe the property sheets should do this already - I don't think there
is any overhead if linking against it without needing it.

Armin


_______________________________________________
gtkmm-list mailing list
gtkmm-list@...
http://mail.gnome.org/mailman/listinfo/gtkmm-list

Parent Message unknown Re: Microsoft Visual studio Linker problem

by Armin Burgmeier :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sun, 2009-06-28 at 17:01 +0300, Kostas Bekiaris wrote:
> I put this lib file in the same directory with the source files...in
> order to be sure tha property sheets doesn't include it...again the
> same error...

I don't understand you here. You should add the gthread-2.0.lib to the
libraries your application links against, in the Visual Studio project
options. This has nothing to do with moving library files around.

> On Sun, Jun 28, 2009 at 3:16 PM, Armin Burgmeier <armin@...>
> wrote:
>        
>         On Sat, 2009-06-27 at 14:35 +0300, Daemon wrote:
>         > Hi everyone, i am new in this list and also in gtkmm. So i
>         face some
>         > problems....
>         > I download the gtkmm , and i installed it carefully,
>         following exactly
>         > the instructions in this. Also i tried this. However, when i
>         try to
>         > compile it with Glib::thread_init(); in main , i get the
>         following
>         > linker error 1>Threads.obj : error LNK2019: unresolved
>         external symbol
>         > _g_thread_init referenced in function "void __cdecl
>         > Glib::thread_init(struct _GThreadFunctions
>         > *)" (?thread_init@Glib@@YAXPAU_GThreadFunctions@@@Z)
>         > 1>C:\Users\Konstantinos\Documents\Visual Studio 2008
>         \Projects\Glib
>         > Thread\Debug\Glib Thread.exe : fatal error LNK1120: 1
>         unresolved
>         > externals. Can anyone help me?
>        
>        
>         I think you need to add gthread-2.0.lib to the libraries to
>         link
>         against.
>        
>         Maybe the property sheets should do this already - I don't
>         think there
>         is any overhead if linking against it without needing it.
>        
>         Armin
>        
>        
>
>
>
>
> --
> Greetings, Daemon!

Armin

_______________________________________________
gtkmm-list mailing list
gtkmm-list@...
http://mail.gnome.org/mailman/listinfo/gtkmm-list