Solved

cmqc.h compile errored in CodeGear 2009

Posted on 2008-10-29
5
2,018 Views
Last Modified: 2013-11-17
Hello,

I use C++ API for Websphere MQ v6 to manipulate message in a queue. I have included all the necessary header files in my C++ project. I use CodeGear 2009 C++ builder as my development IDE.

below are the error messages i received when the code is compiled:

[BCC32 Error] cmqc.h(2287): E2257 , expected
[BCC32 Error] cmqc.h(2288): E2238 Multiple declaration for '_int64'
[BCC32 Error] cmqc.h(2287): E2344 Earlier declaration of '_int64'
[BCC32 Error] cmqc.h(2288): E2257 , expected
[BCC32 Error] cmqc.h(2294): E2257 , expected
[BCC32 Error] cmqc.h(2295): E2257 , expected
[BCC32 Error] cmqc.h(2301): E2257 , expected
[BCC32 Error] cmqc.h(2302): E2257 , expected

Kindly give me some hints of what cause the problem.


Thanks,
mrpc_cambodia
/* ***************************************************************** */
/*                                                                   */
/* Module Name: msgExits.cpp                                         */
/*                                                                   */
/* Descriptive Name: WDI Adapter / WDI Server sample exits           */
/*                                                                   */
/* Release Level: Version 3, Release 2, Modification Level 1         */
/*                                                                   */
/* Licensed Materials -                                              */
/*   Property of IBM 5655-G99 (c) Copyright IBM Corp. 1989, 2006     */
/*                                                                   */
/* Function: Illustrates the function signature for the Adapter API  */
/* Change Activity:                                                  */
/* Date     PTR/DCR#   Name/ID  Description                          */
/* ======== ========== ======== =====================================*/
/* 02/28/05 P8010301   lwhitak    Create module                      */
/* ======== ========== ======== =====================================*/
 
#include <stdio.h>
#include <string.h>
 
#include "imqi.hpp"     /* WMQ definitions in Cpp */
 
#include "diapi.h"      /* WDI interface objects */
#include "msgExits.h"   /* WDIAdapter constants and protptypes */
 
 
/* ***************************************************************** */
/* ***************************************************************** */
extern "C" __declspec(dllexport) BOOL msgTrigger(const MQTMC2 *triggerMsg, void *pvExitContext)
{
    ImqQueueManager *QM = (ImqQueueManager*)pvExitContext;
    
    printf("Executing exit msgTrigger.  Queue Manager:%s\n",
        (char*)QM->name());
    fflush(stdout);
    
    return(FALSE);   /* do not terminate */
}
 
 
/* ***************************************************************** */
/* ***************************************************************** */
extern "C" __declspec(dllexport) BOOL msgArrival(void *pvExitContext, char *sessionID)
{
    ImqMessage *imsgIn = (ImqMessage *)pvExitContext;
    
    printf("Executing exit msgArrival.  Message forrmat: %s\n",
        (char*)imsgIn->format());
    fflush(stdout);
    
    return(FALSE);   /* do not terminate */
}
 
 
/* ***************************************************************** */
/* ***************************************************************** */
extern "C" __declspec(dllexport) int msgTransform(void *pvExitContext, long rc, long ccbrc, long ccberc)
{
    CSyncTranslator *cTr = (CSyncTranslator*)pvExitContext;
 
    char *pcPrtfile;
    long lCharcnt;
 
    cTr->GetFileName(&pcPrtfile, "PRTFILE", &lCharcnt);
 
    printf("Executing exit msgTransform.  RC: %d ERC:%d\n", ccbrc, ccberc);
    printf("\t%ld characters written to print file (%s)\n", 
        lCharcnt, pcPrtfile);
    fflush(stdout);
    
    if (ccbrc > 8 || (ccbrc == 8 && ccberc > 12)) {
        /* rollback resources and process next message */
        return(CONTINUE);
    }
    else {
        /* commit all work for any condition code 8 or less */
        return(SYNC_CONTINUE);
    }
}
 
 
/* ***************************************************************** */
/* ***************************************************************** */
extern "C" __declspec(dllexport) BOOL msgTerminate(void *pvExitContext)
{
   printf("Executing exit msgTerminate.\n");
   fflush(stdout);
   return(TRUE);
}

Open in new window

0
Comment
Question by:mrpc_cambodia
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 5

Expert Comment

by:lgacs
ID: 22839327
The line 2287 in include file contains:
 typedef _int64 MQINT64;

Investigate, how your environment defined "_int64" type.
Also check whether the 32 vs 64 bit setting for your compiler is correct ?
0
 

Author Comment

by:mrpc_cambodia
ID: 22839443
This problem is resolved once i change from _int64 to __int64.

but now i run into another problem:

[ILINK32 Error] Error: Unresolved external 'ImqStr::~ImqStr()' referenced from D:\RAD STUDIO\PROJECTS\MSGEXITS\DEBUG\MSGEXITS.OBJ
[ILINK32 Error] Error: Unresolved external 'ImqItm::~ImqItm()' referenced from D:\RAD STUDIO\PROJECTS\MSGEXITS\DEBUG\MSGEXITS.OBJ
[ILINK32 Error] Error: Unresolved external 'ImqErr::~ImqErr()' referenced from D:\RAD STUDIO\PROJECTS\MSGEXITS\DEBUG\MSGEXITS.OBJ
[ILINK32 Error] Error: Unresolved external 'ImqObj::name()' referenced from D:\RAD STUDIO\PROJECTS\MSGEXITS\DEBUG\MSGEXITS.OBJ
[ILINK32 Error] Error: Unresolved external 'ImqMsg::format() const' referenced from D:\RAD STUDIO\PROJECTS\MSGEXITS\DEBUG\MSGEXITS.OBJ
[ILINK32 Error] Error: Unresolved external 'CSyncTranslator::GetFileName(char * *, char *, long *)' referenced from D:\RAD STUDIO\PROJECTS\MSGEXITS\DEBUG\MSGEXITS.OBJ

I know it need to configure my ide to reference a library somewhere. but i dont what library do i need to fix this error?


Thanks,

mrpc_cambodia
0
 
LVL 5

Expert Comment

by:lgacs
ID: 22840969
0
 
LVL 16

Accepted Solution

by:
George Tokas earned 125 total points
ID: 23046322
>>I have included all the necessary header files in my C++ project
You didn't....
The library file(s) with the code for those errors aren't included....
Check the link from the previous post...

George Tokas.
0
 

Author Closing Comment

by:mrpc_cambodia
ID: 31511547
Thanks, You're right I have to include the header and the lib file to compile successfully.

mrpc_cambodia
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today companies are subjected to more-and-more data, and it won't stop any time soon.  But there are obvious opportunities for reducing data, particularly data duplicated among companies.
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question