Hi, I'm trying to get this:
//C.h
#ifndef C_H
#define C_H
#include "c.h"
class C
{
public:
C();
int function(int, int);
};
#endif
which is defined in this:
//c.cpp
#include "c.h"
C::C()
{
}
int C::function(int a, int b)
{
return a * b;
}
to work in this:
//crp.cpp
#include <iostream>
#include "c.h"
void main(vo...
This is a Windows Console application (actually a service) that a previous guy built 4 years ago and is installed and running. I now need to make some changes but can't even build the current version! Here is the build output:
--------------------Configuration: MyApp - Win32 Debug--------------------
Compiling resources...
Compiling...
...
I want to use libgadu (library of instant messaging protocol) under Visual Studio 2008.
I have downloaded libgadu http://toxygen.net/libgadu/files/libgadu-1.8.2.tar.gz and under cygwin I've compiled it - ./configure , make , make install.
File libgadu.h which appeard in include folder I copied to another folder which is marked in VS as I...
Hi, I'm writing some code where I defined the following base class.
class Chorus{
public:
//Destructor
virtual ~Chorus();
//callback function
virtual int callback( void *outputBuffer, void *notUsed, unsigned int
nBufferFrames, double streamTime, RtAudioStreamStatus status, void *userData );
virtual void ...
I have a class like
class K {
static int a;
static int b;
}
I would like to create a shared library (dll) containing this class K. In a cpp file compliled in the library I call
int K::a = 0;
int K::b = 0;
to instantiate the static variables. The dll does compile without errors, but when I use the library, I get the unresolved e...
I am working on wrapping a large number of .h and .lib files from native C++ to Managed C++ for eventual use as a referenced .dll in C#.
I have the .lib files linked in and everything has been going smoothly so far. Upon wrapping the latest .h file, I hit a snag when 2 functions came back with the link error:
error LNK2019: unresolved...
I'm trying to build a wrapper library with VC++'s compiler.
ErlDriver.c
#define __WIN32__
#define DLL_EXPORT __declspec(dllexport)
#include "erl_driver.h"
DLL_EXPORT int _driver_output(ErlDrvPort port, char *buf, int len) {
return driver_output(port, buf, len);
}
build.bat
cl /I%ERL_DRIVER_H% /LD /MD ErlDriver.c
When I attem...
Why doesn't this C-program compile and what does the err messages mean:
#include <stdio.h>
int main() {
char op = ' ';
char cont = ' ';
int tal1 = 0;
int tal2 = 0;
int result;
int ok = 1;
printf("Welcome\n");
do {
printf("Which one (+ - * /)? ");
scanf("%c", &op); fflush(stdin);
printf("Nu...
I am writing an immutable binary search tree in c++. My terminating nodes are represented by a singleton empty node. My compiler (visual c++) seems to be having trouble resolving the protected static member that holds my singleton. I get the following error:
error LNK2001: unresolved external symbol "protected: static class boost::sh...
Hey
I'm getting an unresolved symbol error at linking in my proj. Im linking to an external library, and yes i have set up the configuration correctly, but when in Debug it outputs the following error for every class in the external library:
error LNK2001: unresolved external symbol __CAP_EXIT_Function
The proj uses the same runtime ...
Here's some simplified code to demonstrate the problem I have.
I have a template function for which I only wish to compile certain fixed instantiations.
The function declarations are:
// *** template.h ***
int square (int x);
double square (double x);
The definitions are:
// *** template.cpp ***
#include "template.h"
// (template ...
Hello,
I am getting a linking error, and I'm not sure what its referring to.
Here is the error
1>Main.obj : error LNK2019: unresolved external symbol "public: void __thiscall BinaryHeap,class std::allocator > >,class Comp,class std::allocator > > >::insert(class Item,class std::allocator > > const &)" (?insert@?$BinaryHeap@V?$Ite...
I'm working with Borland C++Builder 6 and 2010, and am having this problem. However, the difference here is that i'm using a FORM compiled inside the package, so, take the example above, but in addition I'm including a form class, like TForm2:
class TForm2 : public TForm
{
__published: // IDE-managed Components
TButton *Button1;...
It's late at night here and I'm going crazy trying to solve a linker error.
If I have the following abstract interface:
class IArpPacketBuilder
{
public:
IArpPacketBuilder(const DslPortId& aPortId);
virtual ~IArpPacketBuilder();
// Other abstract (pure virtual methods) here...
};
and I instantiate it like this:
class D...
Each of these classes are in separate dll modules:
class Base
{
public:
virtual void foo();
void bar();
};
class Derived : public Base
{
public:
// override Base::foo()
void foo();
};
In Other.cpp:
#include "Derived.h"
The module that contains Derived links with Base.lib (not shown are the export/import directives). The m...
Using Visual Studio 10 C++, I'm having weird link error. For some reason references to a global object won't link to that global object. It is telling me a symbol is undefined yet when I have it view the .cod file the symbol is right there plain as day.
The error:
FTShell.lib(ftcommodule.obj) : error LNK2001: unresolved external symbol...
Hi all,
I've facing this problem when trying to use boost::thread:
unresolved external symbols:
public: __thiscall boost::thread::~thread(void)
public: __thiscall boost::thread::thread(void)
Does anyone have any idea?
...
Hi,
I have a set of global variables and a method in a cpp file.
int a;
int b;
int c;
void DoStuff()
{
}
in the header file I have declared them explicitly with the extern keyword. My problem is when I include the header file in another C++ file, I can't use the external variables and the method. It's giving a linker error sayin...
I am trying to download and build the 'WIC Image Viewer usign Direct2D' from here, but when I build my solution, I am slapped with 56 errors that look like:
Error 1 error LNK2019: unresolved external symbol _imp_CoUninitialize@0 referenced in function _wWinMain@16 WICViewerD2D.obj
Error 2 error LNK2019: unresolved external ...
Consider the following:
In X.h:
class X
{
X();
virtual ~X();
};
X.cpp:
#include "X.h"
X::X()
{}
Try to build this (I'm using a .dll target to avoid an error on the missing main, and I'm using Visual Studio 2010):
Error 1 error LNK2001: unresolved external symbol "private: virtual __thiscall X::~X(void)" (??1X@@EAE@XZ...