ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Installation/Configuration Support » MQ build errors

Post new topic  Reply to topic
 MQ build errors « View previous topic :: View next topic » 
Author Message
Felix
PostPosted: Sun Jul 15, 2012 10:51 pm    Post subject: MQ build errors Reply with quote

Newbie

Joined: 18 Jan 2012
Posts: 9
Location: Bangalore

Hi all,

I am getting strange errors when I try to build my project using make file!

Code:

]$ make -f XXX_MQ.mak
g++ -m32 -pthread   -c -o <removed file names>

MQ__****.cpp:26:42: error: imqi.hpp: No such file or directory
MQ.h:23: error: ‘ImqQueue’ does not name a type
MQ.h:28: error: ‘ImqQueueManager’ does not name a type
MQ.h:29: error: ‘ImqChannel’ does not name a type
MQ.h:30: error: ‘ImqBinary’ does not name a type
make: *** [MQ__CMCT.o] Error 1


And the make file has these:
Code:

$(TARGET) : $(PROG) Main.cpp $(INCS)
        g++ $(PROG) -lpthread \
        -o $(TARGET) \
        -fsigned-char -I/opt/mqm/inc -L/opt/mqm/lib \
        -Wl,-rpath=/opt/mqm/lib -Wl,-rpath=/usr/lib -limqc23gl -limqb23gl -lmqic


I can see the imqi.hpp file being present under /opt/mqm/inc folder!

I felt that that these errors are related to MQ configurations, hence posted here.

Thanks in advance,
_________________
-
Felix
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Jul 16, 2012 3:36 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You're specifying the wrong libraries for a -lpthread application.

http://publib.boulder.ibm.com/infocenter/wmqv7/v7r1/index.jsp?topic=%2Fcom.ibm.mq.doc%2Fuc12460_.htm

in the section on System X.
Code:
    g++ -m32 -fsigned-char -o imqsputc_32_r imqsput.cpp
    -IMQ_INSTALLATION_PATH/inc
    -LMQ_INSTALLATION_PATH/lib -Wl,-rpath=MQ_INSTALLATION_PATH/lib
    -LMQ_INSTALLATION_PATH/lib
    -Wl,-rpath=MQ_INSTALLATION_PATH/lib -Wl,-rpath=/usr/lib
    -limqc23gl_r -limqb23gl_r -lmqic_r -lpthread
Back to top
View user's profile Send private message
Felix
PostPosted: Mon Jul 16, 2012 4:48 am    Post subject: Reply with quote

Newbie

Joined: 18 Jan 2012
Posts: 9
Location: Bangalore

Jeff,

I updated my makefile for a threaded application type.
And I still see the same error !!
_________________
-
Felix
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Jul 16, 2012 5:26 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

And you otherwise took steps to resolve
Code:

MQ__****.cpp:26:42: error: imqi.hpp: No such file or directory


?
Back to top
View user's profile Send private message
Felix
PostPosted: Mon Jul 16, 2012 8:56 pm    Post subject: Reply with quote

Newbie

Joined: 18 Jan 2012
Posts: 9
Location: Bangalore

Jeff,

Finally we were able resolve this issue.

The MQ header files were missing in /usr/include directory. And this was causing this error.

My assumption was that
- if we have -I/opt/mqm/inc -L/opt/mqm/lib compiler switch options, that would be sufficient. But we must also have them under /usr/include folder.
- And if that was required, MQ must have taken care of that during installation!

But thank you for your responses, Jeff
_________________
-
Felix
Back to top
View user's profile Send private message
Philip Morten
PostPosted: Wed Jul 18, 2012 7:54 am    Post subject: Reply with quote

Master

Joined: 07 Mar 2002
Posts: 230
Location: Hursley Park

Felix wrote:

... But we must also have them under /usr/include folder.

Can you expand on that please, why must you also have them in /usr/include?
_________________
Philip Morten

The postings on this site are my own and do not necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
Felix
PostPosted: Sun Jul 22, 2012 8:30 pm    Post subject: Reply with quote

Newbie

Joined: 18 Jan 2012
Posts: 9
Location: Bangalore

Philip,

I am not sure if we really must have the header files under /usr/include.
But when the header files were placed under that folder, the error messages were gone.

Do let us know, if there is a different procedure to be followed.
[And also, if it is incorrect to manually copy the headers]
_________________
-
Felix
Back to top
View user's profile Send private message
Philip Morten
PostPosted: Mon Jul 23, 2012 7:03 am    Post subject: Reply with quote

Master

Joined: 07 Mar 2002
Posts: 230
Location: Hursley Park

Felix wrote:
Philip,

I am not sure if we really must have the header files under /usr/include.
But when the header files were placed under that folder, the error messages were gone.

Do let us know, if there is a different procedure to be followed.
[And also, if it is incorrect to manually copy the headers]
The header files are no longer added to /usr/include to allow for the possibility of multiple installations on the same system.

You should investigate why your compile procedures are not finding them from the -I /opt/mqm/inc.
_________________
Philip Morten

The postings on this site are my own and do not necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Installation/Configuration Support » MQ build errors
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.