Link Errors in VisualStudio 2010

44 views
Skip to first unread message

Allen Fisher

unread,
Jan 28, 2013, 3:47:18 PM1/28/13
to winsp...@googlegroups.com
Hi All--

Trying to integrate WinSparkle 0.3 into my Visual C++ application being developed in VisualStudio 2010. I've placed the library on the linker search path, added the #include statement and the 3 calls needed to initialize, check for updates, and cleanup per the instructions. However, I get link errors:

AppMFC.obj : error LNK2019: unresolved external symbol __imp_@win_sparkle_cleanup@0 referenced in function "public: virtual __thiscall FCMyApp::~FCMyApp(void)" (??1FCMyApp@@UAE@XZ)
AppMFC.obj : error LNK2019: unresolved external symbol __imp_@win_sparkle_init@0 referenced in function "public: virtual int __thiscall FCMyApp::InitInstance(void)" (?InitInstance@MyApp@@UAEHXZ)
AppMFC.obj : error LNK2019: unresolved external symbol __imp_@win_sparkle_set_appcast_url@4 referenced in function "public: virtual int __thiscall FCMyApp::InitInstance(void)" (?InitInstance@FCMyApp@@UAEHXZ)

I've had several sets of eyes on this to make sure I've set it up correctly. Any ideas as to what I might be doing incorrectly? I would compile from source, but it seems that the version of WXwidgets being used is not available in the GitHub repository.

Any ideas?

Thanks!

Allen

Václav Slavík

unread,
Jan 29, 2013, 8:11:48 AM1/29/13
to winsp...@googlegroups.com
Hi,

On 28 Jan 2013, at 21:47, Allen Fisher <allen....@gmail.com> wrote:
> However, I get link errors:
>
> AppMFC.obj : error LNK2019: unresolved external symbol __imp_@win_sparkle_cleanup@0 referenced in function "public: virtual __thiscall FCMyApp::~FCMyApp(void)" (??1FCMyApp@@UAE@XZ)

Seems to me that you changed the default calling convention setting, because the import library doesn't use these manglings.

> I would compile from source, but it seems that the version of WXwidgets being used is not available in the GitHub repository.

It is -- as a git submodule. See e.g. http://git-scm.com/book/ch6-6.html on how to use them.

Regards,
Vaclav

Allen Fisher

unread,
Jan 30, 2013, 10:37:37 AM1/30/13
to winsp...@googlegroups.com
Hey Václav--

Seems to me that you changed the default calling convention setting, because the import library doesn't use these manglings. 

That was it. I did not realize that we used __stdcall for our debug builds and __fastcall for release. It's too big of a change for us to switch

For anyone else that may run into this, the options were change the calling convention of the app, rebuild WinSparkle with the calling convention you want, or modify WinSparkle.h to specify that they are supposed to be __cdecl calls. We opted to modify the .h file.

> I would compile from source, but it seems that the version of WXwidgets being used is not available in the GitHub repository. 
It is -- as a git submodule. See e.g. http://git-scm.com/book/ch6-6.html on how to use them. 

Thanks, I figured this out after I posted. I'm still a bit of a GitHub n00b.

Thanks for your help. It's much appreciated.

Allen 

Václav Slavík

unread,
Jan 30, 2013, 10:45:28 AM1/30/13
to winsp...@googlegroups.com

On 30 Jan 2013, at 16:37, Allen Fisher <allen....@gmail.com> wrote:
> We opted to modify the .h file.

...and if you could make that a pull request or send as a patch, it would save me a few minutes of time at least. This is arguably something that should be done in the "official" version too.

Vaclav

Allen Fisher

unread,
Feb 1, 2013, 10:40:26 AM2/1/13
to winsp...@googlegroups.com
I would be happy to.
> --
> You received this message because you are subscribed to the Google Groups "WinSparkle" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to winsparkle+...@googlegroups.com.
> To post to this group, send email to winsp...@googlegroups.com.
> Visit this group at http://groups.google.com/group/winsparkle?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>



--
--
Allen
Reply all
Reply to author
Forward
0 new messages