473,466 Members | 1,363 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

LNK2019 unresolved external symbol

hello, im new to vc and .net, I'm trying to build the following console
application with vs2003, but I get a linker error:

error LNK2019: unresolved external symbol _CorBindToRuntimeEx@24 referenced
in function _main

I have sdk 1.1 installed and I have already verified the vc++ directories
for the presence of $(FrameworkSDKDir)lib, $(FrameworkSDKDir)include what
else could I check ?

thanks
code:

#include "stdafx.h"
#include "mscoree.h"
int _tmain(int argc, _TCHAR* argv[])
{
ICorRuntimeHost *runtime=NULL;
HRESULT hr = CorBindToRuntimeEx(
L"v1.1.4322",
L"svr",
STARTUP_CONCURRENT_GC | STARTUP_LOADER_OPTIMIZATION_MULTI_DOMAIN_HOST |
STARTUP_LOADER_SAFEMODE,
CLSID_CorRuntimeHost,
IID_ICorRuntimeHost,
(void**)&runtime);
return 0;
}

Nov 17 '05 #1
1 2313
ok solved by myself, i just had to add the Mscoree.lib to linker :))

"Spartaco" <ve*******@gmail.com> wrote in message
news:7t*********************@twister1.libero.it...
hello, im new to vc and .net, I'm trying to build the following console
application with vs2003, but I get a linker error:

error LNK2019: unresolved external symbol _CorBindToRuntimeEx@24
referenced
in function _main

I have sdk 1.1 installed and I have already verified the vc++ directories
for the presence of $(FrameworkSDKDir)lib, $(FrameworkSDKDir)include what
else could I check ?

thanks
code:

#include "stdafx.h"
#include "mscoree.h"
int _tmain(int argc, _TCHAR* argv[])
{
ICorRuntimeHost *runtime=NULL;
HRESULT hr = CorBindToRuntimeEx(
L"v1.1.4322",
L"svr",
STARTUP_CONCURRENT_GC | STARTUP_LOADER_OPTIMIZATION_MULTI_DOMAIN_HOST |
STARTUP_LOADER_SAFEMODE,
CLSID_CorRuntimeHost,
IID_ICorRuntimeHost,
(void**)&runtime);
return 0;
}

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Bil Muh | last post by:
Hello Developers, I use VC++ .NET v2003. By using Windows Forms .NET, I am developing an application which will work with TCP/IP functions. I can Build my application in Debug Mode normally, but,...
3
by: YAN KANG / SU | last post by:
Hi, All I am migrating to Studio .NET 2003 from Studio 6.0 and Studio .NET 2002. When I compiled my code, which is compilable both in VC++ 6.0 and Studio .NET 2002, I have an error LNK2019 as the...
2
by: hazizpour | last post by:
Hello I hope I am in the correct newsgroup, if not please let me know. I am trying to build a sample for using a certain library ( IFC mapping to C++ classes, see www.cstb.fr) with MS Visual...
2
by: rangalo | last post by:
Hi All, I have succeeded in compiling a massive project, originally from vc6 to VS .Net 2005. Now, while linking I am having loads of linker errors with the above code. LNK20019 and LNK2001....
2
by: f rom | last post by:
----- Forwarded Message ---- From: Josiah Carlson <jcarlson@uci.edu> To: f rom <etaoinbe@yahoo.com>; wxpython-users@lists.wxwidgets.org Sent: Monday, December 4, 2006 10:03:28 PM Subject: Re: ...
1
by: girays | last post by:
I have a template class which name is EntityRepository and when I compile this class I get no error. But when I use this class in a main method I get LNK2019 linking error. std::map object is used...
4
by: jk2l | last post by:
Error 10 error LNK2019: unresolved external symbol __imp__glBindTexture@8 referenced in function "public: void __thiscall GLTexture::Use(void)" (?Use@GLTexture@@QAEXXZ) GLTexture.obj Error 11 error...
1
by: eraserwars | last post by:
I have been googeling every possible solution, but I cannot seem to fix LNK2019. My code is below, but I just cannot understand how anything related to LNK2019 from Microsoft's help center applies...
1
by: eraserwars | last post by:
My compiler keeps saying LNK2019, and my teacher says to look for spelling error. He says that most likely what is happening is that a spelling error is messing my program up. I searched, and I did...
2
by: hjazz | last post by:
Hi all, I'm new to VS, and I'm using Visual Studio .NET 2003. I'm trying to write a program which uses pcap libraries. However, I keep getting the following errors: error LNK2019: unresolved...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.