Thread 'Unresolved External symbol'

Message boards : Server programs : Unresolved External symbol
Message board moderation

To post messages, you must log in.

AuthorMessage
GR4VE

Send message
Joined: 6 Jun 12
Posts: 4
Kazakhstan
Message 44457 - Posted: 12 Jun 2012, 4:07:29 UTC

Hi. I try compile "hello,world" program for BOINC project on my server. I use Windows 7 x64 Ultimate, Visual Studio 2011 Developer Preview.
Source code:
#include <stdio.h>
#include <conio.h>
#include <boinc_api.h>
#include <boinc_win.h>

int main()
{
boinc_init();
printf("Hello, World!\n");
boinc_finish(1);
return 0;
}
Output:
1>------ Build started: Project: Hello, World!, Configuration: Debug Win32 ------
1>Hello, World.obj : error LNK2019: unresolved external symbol _boinc_init referenced in function _main
1>Hello, World.obj : error LNK2019: unresolved external symbol _boinc_finish referenced in function _main
1>D:\TOP\Grid\Apps\Hello, World!\Debug\Hello, World!.exe : fatal error LNK1120: 2 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

ID: 44457 · Report as offensive
Profileyoyo
Avatar

Send message
Joined: 23 May 06
Posts: 41
Germany
Message 44856 - Posted: 12 Jul 2012, 21:22:13 UTC

You must link the boinc api and boinc lib together with your object file.
yoyo
Germany biggest distributed computing community Rechenkraft.net
ID: 44856 · Report as offensive

Message boards : Server programs : Unresolved External symbol

Copyright © 2024 University of California.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.