This is a very basic problem that's frustrating me at the moment. Let's say within a single solution, I have two projects. Let's call the first project SimpleMath. It has one header file "Add.h" which has
int add(int i, int j)
and the implementation "Add.cpp" which has
int add(int i, int j) {
return i+j;
}
Now let's say in a sec...
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 am writing a .NET assembly using C++/CLI (version 9.0), and I would like to use the PIMPL idiom to avoid putting unnecessary stuff in my public header. Unfortunately, when I try to forward declare a class, and then use a tracking handle to it, I get Linker warning 4248:
warning LNK4248: unresolved typeref token (0100000E) for 'MyN...
Well, here's a nice obscure one. I'm trying to compile the latest open transport tycoon source in Visual Studio 2005. (It's a C++ app that uses zlib, dx8 and a few other fairly common libraries).
I get a few linker errors to do with the freetype dependencies:
Error 1 error LNK2001: unresolved external symbol @FT_Done_Face@4 fontcache...
So I'm trying to build a small 3D engine as an exercise on VC++ 8.0. I have a MathLib static lib and a Render static lib that is being linked by my TestBed exe. Right now Render has two classes: Color and DXManager3D. Color includes my Vector.h from MathLib just fine, no problems.
The second I try to include Vector.h in DXManager3D it ...
I am getting this linker error when trying to compile the c++ project for the VSS SDK
Error 1 error LNK2019: unresolved external symbol "long __stdcall ShouldBlockRevert(wchar_t const *,bool *)" (?ShouldBlockRevert@@YGJPB_WPA_N@Z) referenced in function "public: void __thiscall VssClient::RevertToSnapshot(struct _GUID)" (?RevertToSnap...
I've been trying to compile a Borland C++ Builder 6 project, but linker dies with exact following error:
[Linker Fatal Error] Fatal: Unable to open file '.OBJ'
Strange thing about it is that it doesn't give any file name except the extension. It looks like an internal bug, though googling for it didn't give any results. Has anyone enc...
I'm getting linkage errors of the following type:
Festival.obj : error LNK2019:
unresolved external symbol "public:
void __thiscall Tree::add(class Price &)"
(?add@?$Tree@VPrice@@@@QAEXAAVPrice@@@Z)
referenced in function
__catch$?AddBand@Festival@@QAE?AW4StatusType@@HHH@Z$0
I used to think it has to do with try-catch me...
I'm probably doing something wrong, being a newbie. Could you please help me out?
I've written a simple Hello World program in C called hello.c, and ran the following command:
gcc -S hello.c
That produced hello.s. Then I used that file with GNU assembler, as:
as hello.s
Which produced a non-executable a.out, which still needs to b...
When I try to run Java application, I receive the following error:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no ocijdbc9 in java.library.path
I don't have a file "ocijdbc9.*" on my PC, but I have "ocijdbc10.dll" in %ORACLE_HOME%\bin.
%ORACLE_HOME% is correctly specified, so I think the problem is that the application...
I am trying to use Lua on the iphone.
On Mac OSX, in a normal Cocoa application (not iPhone), I used the following code:
lua_State* l;
l = lua_open();
luaL_openlibs(l);
luaL_loadstring(l, "print(\"hi from LUA\");");
lua_pcall(l, 0, 0, 0);
I downloaded Lua 5.1.4 from lua.org/ftp and I compiled it for Mac OSX.
In the Xcode project, I h...
I am trying to use inline member functions of a particular class. For example the function declaration and implementation without inlining is as such:
in the header file:
int GetTplLSize();
in the .cpp file:
int NeedleUSsim::GetTplLSize()
{
return sampleDim[1];
}
For some reason if I put the "inline" keyword in either one of t...
Hey Folks i am trying to compile this C++ program:
#include <stdio.h>
#include <string.h>
#include <sys/stat.h>
#include <stdlib.h>
#include <Windows.h>
#include "Validate.h"
JNIEXPORT jstring JNICALL Java_Validate_takeInfo(JNIEnv *env, jobject obj,
jstring domain, jstring id, jstring idca, jstring password)
{
const c...
I have a atl com project that was compiling fine in VC6 which gives the following linker errors when compiled in VS2008.
error LNK2005: "void * __cdecl
operator new(unsigned int)"
(??2@YAPAXI@Z) already defined in
libcmt.lib(new.obj) File: uafxcw.lib
There are three more similar errors for delete, new[] and delete[].
I che...
I compiled the following code as a shared library using g++ -shared ...:
class Foo {
public:
Foo() {}
virtual ~Foo() = 0;
virtual int Bar() = 0;
};
class TestFoo : public Foo {
public:
int Bar() { return 0; }
};
extern "C" {
Foo* foo;
void init() {
// Runtime error: undefined symbol: _ZN3FooD2Ev
foo = new TestFoo()...
Hello,
First of all, excuse me for my poor knowledge on C++. I am a real Beginner!
I am trying to compile one C++ code on MS VS2005. I am getting a linker error as follows for below piece of code:-
In one function(some class method) definition, it has code for memory allocation like:
CDecoderUnit *du = new CDecoderUnit(); //<<error i...
I'm mostly new to Visual Studio, so I apologize if this is a basic problem. I have a solution which contains a number of projects. In project A, I have a pre-existing set of files that I added a new class to. Project B uses the functionality coded in that new class in Project A. Project A is built first, and a .lib file is generated,...
I'm maintaining a c#.Net (vs2005) library, let's call it fooLib, developed by a coworker. Now management has decided that we should change it's name to, say, barLib.
So I have renamed it, changed some of the metadata (copyright info, etc), registered it in gac, removed the reference and added it again in each project which uses it, and ...
So I've got a Visual studio 2005 solution that contains a C# project (test driver - creates exe) and 7 C++ Projects (dll's).
This solution builds fine up to this point.
I have DevPartner studio 8.2 installed. I am trying to generate test coverage on the entire solution which requires me to instrument native c++ code during builds. when...
I'm having trouble linking a shared library using gcc 3.2.3 with binutils 2.18. When I try to link the library I get the following error:
.gnu.linkonce.t_... referenced in section .rodata: defined in discarded section .gnu.linkonce.t...
I've done a fair amount of googling on this and most places seem to indicate it is a regression intr...