Sucessfull Compilation but Build Fails with FATAL Error Please help

V

Vishal Saxena

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 project to VC++.NET,

below is the code snipplet from the project

#if WIN_PLATFORM // WIN ONLY
#include <afxwin.h>
extern "C" {
#include "ASCalls.h"
#include "AVCalls.h"
#include "PDCalls.h"
#include "CosCalls.h"
#include "PICrypt.h"
#include "PIMain.h"
};


After this declaration i am using the code below

int GetSignatureStatus(const PDDoc& thePDDoc, // [in]: The parent PDDocconst
PDAnnot& thePDAnnot) // [in]: The annotation to check
{
int intSignedStatus = 0;
DURING
const CosObj cosPDAnnot = PDAnnotGetCosObj(thePDAnnot);
const ASInt32 intPreFlags = PDDocGetFlags(thePDDoc);
// Ensure valid PDAnnot
if (!CosObjEqual(cosPDAnnot, CosNewNull()))
{
const CosObj cosString = CosDictGet(cosPDAnnot,
ASAtomFromString("Contents"));
// Ensure valid CosString
if (!CosObjEqual(cosString, CosNewNull()) && CosString ==
CosObjGetType(cosString))
{
ASInt32 numBytes = 0;
const char* pchData = CosStringValue(cosString, &numBytes);
win_btoken BToken;
.........
.........
.........
.........
}

My code gets compiled with 0 error 0 warnings in VC++.NET IDE, But when i
try to build the solution in VC++.NET it says
1. PrudForm error LNK2019: unresolved external symbol _btoken_destroy
referenced in function "public: __thiscall btoken::~btoken(void)"
(??1btoken@@QAE@XZ)
2. PrudForm error LNK2019: unresolved external symbol _btoken_is_captured
referenced in function "public: int __thiscall
btoken::is_captured(void)const " (?is_captured@btoken@@QBEHXZ)
3. PrudForm error LNK2019: unresolved external symbol
_btoken_verify_document referenced in function "public: int __thiscall
btoken::verify_document(class doc_integrity const &)const "
(?verify_document@btoken@@QBEHABVdoc_integrity@@@Z)
4. PrudForm error LNK2019: unresolved external symbol _doc_integrity_create
referenced in function "public: __thiscall
doc_integrity::doc_integrity(void)" (??0doc_integrity@@QAE@XZ)
5. PrudForm error LNK2019: unresolved external symbol _doc_integrity_destroy
referenced in function "public: __thiscall
doc_integrity::~doc_integrity(void)" (??1doc_integrity@@QAE@XZ)
6. PrudForm error LNK2019: unresolved external symbol
_doc_integrity_traverse referenced in function "public: int __thiscall
doc_integrity::traverse(char const *)" (?traverse@doc_integrity@@QAEHPBD@Z)
7. PrudForm fatal error LNK1120: 7 unresolved externals

when i double click the error description in the Task List it takes me to a
resource file which has following code
//Microsoft Developer Studio generated resource script.
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
////////////////////////////////////////////////////////////////////////////
/
// Generated from the TEXTINCLUDE 2 resource.
#include "afxres.h"
////////////////////////////////////////////////////////////////////////////
/
#undef APSTUDIO_READONLY_SYMBOLS
////////////////////////////////////////////////////////////////////////////
/
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
#ifndef _MAC
////////////////////////////////////////////////////////////////////////////
/
// Version
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,1
PRODUCTVERSION 1,0,0,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "Prudential\0"
VALUE "FileDescription", "PrudForm\0"
VALUE "FileVersion", "1, 0, 0, 1\0"
VALUE "InternalName", "PrudForm\0"
VALUE "LegalCopyright", "Copyright © 2000\0"
VALUE "OriginalFilename", "PrudForm.api\0"
VALUE "ProductName", "PrudForm\0"
VALUE "ProductVersion", "1, 0, 0, 1\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#endif // !_MAC
#ifdef APSTUDIO_INVOKED
////////////////////////////////////////////////////////////////////////////
/
// TEXTINCLUDE
1 TEXTINCLUDE DISCARDABLE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
#endif // English (U.S.) resources
////////////////////////////////////////////////////////////////////////////
/
#ifndef APSTUDIO_INVOKED
////////////////////////////////////////////////////////////////////////////
/
// Generated from the TEXTINCLUDE 3 resource.
////////////////////////////////////////////////////////////////////////////
/
#endif // not APSTUDIO_INVOKED

I dont know what weird is going on, please help

Thanks in advance,

Regards,
Vishal
 
C

Carl Daniel [VC++ MVP]

Vishal said:
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 project to VC++.NET,

below is the code snipplet from the project

#if WIN_PLATFORM // WIN ONLY
#include <afxwin.h>
extern "C" {
#include "ASCalls.h"
#include "AVCalls.h"
#include "PDCalls.h"
#include "CosCalls.h"
#include "PICrypt.h"
#include "PIMain.h"
};


After this declaration i am using the code below

int GetSignatureStatus(const PDDoc& thePDDoc, // [in]: The parent
PDDocconst PDAnnot& thePDAnnot) // [in]: The annotation to check
{
int intSignedStatus = 0;
DURING
const CosObj cosPDAnnot = PDAnnotGetCosObj(thePDAnnot);
const ASInt32 intPreFlags = PDDocGetFlags(thePDDoc);
// Ensure valid PDAnnot
if (!CosObjEqual(cosPDAnnot, CosNewNull()))
{
const CosObj cosString = CosDictGet(cosPDAnnot,
ASAtomFromString("Contents"));
// Ensure valid CosString
if (!CosObjEqual(cosString, CosNewNull()) && CosString ==
CosObjGetType(cosString))
{
ASInt32 numBytes = 0;
const char* pchData = CosStringValue(cosString,
&numBytes); win_btoken BToken;
.........
.........
.........
.........
}

My code gets compiled with 0 error 0 warnings in VC++.NET IDE, But
when i try to build the solution in VC++.NET it says
1. PrudForm error LNK2019: unresolved external symbol _btoken_destroy
referenced in function "public: __thiscall btoken::~btoken(void)"
(??1btoken@@QAE@XZ)

It looks like you're missing a library, or perhaps linking with a library
that was not compiled with VC7{.1}. Where should 'btoken_destroy' be coming
from?

-cd
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top