473,386 Members | 1,962 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

error LNK2019

9
Hello,
I have the following problem. I keep getting these linker errors, although I included all the header files and provided the right settings for the project.
I use the C++ compiler in .NET framework.

Here are the linker erros:

NetworkAnalyzer error LNK2019: unresolved external symbol "class nbPacketDecoder * __cdecl nbGetPacketDecoder(int,char *,int)" referenced in function "public: __thiscall CCaptureWindow::CCaptureWindow(class wxWindow *,struct _capsettings *)"

NetworkAnalyzer error LNK2019: unresolved external symbol "class nbPDMLReader * __cdecl nbGetPDMLReader(char *,char *,int)" referenced in function "public: int __thiscall CCaptureWindow::LoadPDMLBuffer(class wxString)"

The project settings are:


  • in C/C++ settings
    • General: Additional Include Directories: ../nbDevPack/NetBee/Include
    • Preprocessor: WIN32;_DEBUG;__WXDEBUG__;__WXMSW__;_WINDOWS;NOPCH; _CRTDBG_MAP_ALLOC;STRICT;_WINSOCKAPI_;WPCAP;HAVE_R EMOTE
  • in Linker settings:
    • General: Additional Libraries Directories ../nbDevPack/NetBee/Lib
    • Input: Ignore specific library: MSVCRTD.lib
In ../nbDevPack/NetBee/Include, I have all the header files I need(this an external open source library I downloaded from the internet).
However, it seems it isn't capable to find those functions even if they are defined in the headers from ../NetBee/Include.
The library itself is packed as a .lib file and as a .exp file in the directory /NettBee/Lib

The .cpp files are built with C/C++ Build Tool and the header files with the Custom Build Tool provided by the .NET framework.

Please help. Thank you,

Adina
Mar 11 '07 #1
3 2588
adina
9
Hello,
I have the following problem. I keep getting these linker errors, although I included all the header files and provided the right settings for the project.
I use the C++ compiler in .NET framework.

Here are the linker erros:

NetworkAnalyzer error LNK2019: unresolved external symbol "class nbPacketDecoder * __cdecl nbGetPacketDecoder(int,char *,int)" referenced in function "public: __thiscall CCaptureWindow::CCaptureWindow(class wxWindow *,struct _capsettings *)"

NetworkAnalyzer error LNK2019: unresolved external symbol "class nbPDMLReader * __cdecl nbGetPDMLReader(char *,char *,int)" referenced in function "public: int __thiscall CCaptureWindow::LoadPDMLBuffer(class wxString)"

The project settings are:
in C/C++ settings

General: Additional Include Directories: ../nbDevPack/NetBee/Include
Preprocessor:
WIN32;_DEBUG;__WXDEBUG__;__WXMSW__;
_WINDOWS;NOPCH;_CRTDBG_MAP_ALLOC;STRICT;
_WINSOCKAPI_;WPCAP;HAVE_REMOTE

in Linker settings:


General
: Additional Libraries Directories ../nbDevPack/NetBee/Lib
Input: Ignore specific library: MSVCRTD.lib

In ../nbDevPack/NetBee/Include, I have all the header files I need(this an external open source library I downloaded from the internet).

However, it seems it isn't capable to find those functions even if they are defined in the headers from ../NetBee/Include.
The library itself is packed as a .lib file and as a .exp file in the directory /NettBee/Lib

The .cpp files are built with C/C++ Build Tool and the header files with the Custom Build Tool provided by the .NET framework.

Please help. Thank you,

Adina
Mar 11 '07 #2
vermarajeev
180 100+
There is no problem with including header files. By seeing the statements above I guess the library is not linked.

Did you make your application dependent on that library??? Right clik on your application then clik on Project dependencies. Check your library in the check box provided.

Check the path of the library properly.

If doesnt work please provide some more details about how you have been proceeding.
Mar 12 '07 #3
adina
9
Hello,
It works thank you. I found out that there is another way to do this, besides changing the Additional Dependencies. I'll post this in case someone out there might need it.
The idea is to add the following line:
#pragma comment(lib, "libname.lib") where the "libname" is the name of the library in the lib folder which the application requires.
I have tried to add this line in my header where I have data members of a class that require this library and in my .cpp file where I actually use those functions that triggered the LNK2019 error. I worked both ways.
Still, I've read it's better to put this line in the .cpp file since it gets compiled only once.

Thanks again,
Adina
Mar 14 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Vishal Saxena | last post by:
Hi, I am new to this news group, hope to get prompt solution from you, gurus of VC. Well i had a project developed in VC++ 6.0, it uses Adobe Plugin Development SDK, I am trying to upgrade my...
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...
0
by: Usman | last post by:
Hi I've a COM compiled in visual studio 6 that is internally using zlib library (an opensource library for compression). I've no problem compiling that code. But when I moved to visual...
1
by: developer | last post by:
Hi All I have made a .NET project. the files included are borland c++ files that i am migrate to VC++ .NET I am using Microsoft Visual C++ .NET 2003. the compilation goes through properly,...
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: Jonas Schneider | last post by:
Heya, donīt know if you know BOINC: itīs a system for distributed computing, therefore distributing work to many computers and creating a little super-computer, see also their homepage:...
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...
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.