Page 1 of 1

Unresolved Externals in static .lib build

Posted: 2008-04-19T02:02:09-07:00
by Cyoh
Hello all. My apologies for my post in the other forum. Right as I finished posting I figured out how to do what I was originally asking, and could not find a delete button to get rid of it. But here is my latest issue.


I compiled all the static libs just fine so now I don't have to use .DLLs. However, when I attempt to compile a simple program I get multiple external errors. The code for this is:

Code: Select all

#include "stdafx.h"
#include <Magick++.h>
#include <iostream>

using namespace Magick;
using namespace std;

int main(int argc, char* argv[])
{
	              //Initializations...
				
				Image image;            
				                      
			return 0;
		
}

and the compiler errors I get are:

Code: Select all

1>Compiling...
1>IMTEST.cpp
1>Linking...
1>IMTEST.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall Magick::Image::~Image(void)" (__imp_??1Image@Magick@@UAE@XZ)
1>IMTEST.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall Magick::Image::Image(void)" (__imp_??0Image@Magick@@QAE@XZ)
1>C:\Practice\IMTEST\Debug\IMTEST.exe : fatal error LNK1120: 2 unresolved externals
1>Build log was saved at "file://c:\Practice\IMTEST\IMTEST\Debug\BuildLog.htm"
1>IMTEST - 3 error(s), 0 warning(s)
I cannot figure out for the life of me why it won't compile. I checked my linking and which dependencies I have and even when I linked ALL the available libraries (anything abbreviated with CORE_RL), including Xext.lib, and X11.lib, it still did not let me compile and finish with the linking process.


Can anyone shed some light on this rather troublesome situation?


Thank you for your time :)