Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

unknown pragma

Status
Not open for further replies.

Myqns

Programmer
Jul 28, 2004
23
GB
Hello all,

I am trying to compile a code in Microsoft Visual C++ v 6.0. The code was earlier compiled using Visualage for C++ v 3.5 without errors.

I am getting the follwoing error messages. I don't know to rectify them. I almost forgot c++. Please help.

Error Messages:

c:\projects\mq\mq\mqchexit.h(4) : warning C4068: unknown pragma
c:\projects\channelexit\mqchexit.c(50) : warning C4236: nonstandard extension used : '__export' is an obsolete keyword, see documentation for __declspec(dllexport)
c:\projects\channelexit\mqchexit.c(118) : warning C4236: nonstandard extension used : '__export' is an obsolete keyword, see documentation for __declspec(dllexport)

Header file:
Code:
#pragma library("mqchexit.lib")
#include <stddef.h>
#include "mqsec.h"
extern void MQENTRY ChannelExit( PMQVOID channelExitParms,
PMQVOID channelDef,
PMQLONG dataLength,
PMQLONG agBufLength,
PMQVOID agBuf,
PMQLONG exitBufLength,
PMQPTR exitBufAddr );
In my .c file, the definition of ChannelExit is as below:
Code:
void __export MQENTRY ChannelExit( PMQVOID channelExitParms,
PMQVOID channelDef,PMQLONG dataLength,PMQLONG agBufLength,
PMQVOID agBuf,PMQLONG exitBufLength,PMQPTR exitBufAddr );
I get the following error messages when I am trying to build an executable.

Linking...
MQCHEXIT.OBJ : error LNK2001: unresolved external symbol _R_VerifyFinal
MQCHEXIT.OBJ : error LNK2001: unresolved external symbol _R_VerifyUpdate
MQCHEXIT.OBJ : error LNK2001: unresolved external symbol _R_VerifyInit
MQCHEXIT.OBJ : error LNK2001: unresolved external symbol _R_RandomFinal
MQCHEXIT.OBJ : error LNK2001: unresolved external symbol _R_SealFinal
MQCHEXIT.OBJ : error LNK2001: unresolved external symbol _R_SealUpdate
MQCHEXIT.OBJ : error LNK2001: unresolved external symbol _R_SealInit
MQCHEXIT.OBJ : error LNK2001: unresolved external symbol _R_SignBlock
MQCHEXIT.OBJ : error LNK2001: unresolved external symbol _R_memset
MQCHEXIT.OBJ : error LNK2001: unresolved external symbol _R_RandomCreate
MQCHEXIT.OBJ : error LNK2001: unresolved external symbol _R_VerifyBlockSignature
MQCHEXIT.OBJ : error LNK2001: unresolved external symbol _R_OpenFinal
MQCHEXIT.OBJ : error LNK2001: unresolved external symbol _R_OpenUpdate
MQCHEXIT.OBJ : error LNK2001: unresolved external symbol _R_OpenInit
MQCHEXIT.OBJ : error LNK2001: unresolved external symbol _R_GenerateBytes
MQCHEXIT.OBJ : error LNK2001: unresolved external symbol _gethostname@8
MQCHEXIT.OBJ : error LNK2001: unresolved external symbol _WSAStartup@8
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/MQCHEXIT.exe : fatal error LNK1120: 18 unresolved externals
Error executing link.exe.

Thanks for your help.



 
Try this instead of your #pragma library


#pragma comment( lib,"mqchexit.lib")

Not sure if it is what you need, but it looks like the "library" may be your issue.

Matt
 
I included wsock32.lib and couple for errors vanished. Now looks like it is not finding the rsaeuro.h which is included in one of the header files as shown below. This rsaeuro is a third party file for authentiaction. I downloaded the rsaeuro and installed on my local machine. I gave the path to the rsaeuro.h in the include files. But there are no libraries available as such. Anyone knows what to do?

Code:
#ifndef _MQSEC_H_
#define _MQSEC_H_
#include "cmqc.h"
#include "rsaeuro.h" /* include rsaeuro function header file */
#define TRUE 1
#define FALSE 0
...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top