Thread: makefile C with IBM MQ doesn't recognize MQ structures

  1. #16
    Registered User
    Join Date
    Apr 2017
    Posts
    51
    Quote Originally Posted by Salem View Post
    Paste your latest version of this line of make output.
    /usr/bin/gcc -m64 -DMQ_SEND /home/avalanche/oleg/src/ctm_mq_con_ex.o -o /home/avalanche/oleg/bin/ctm_mq_con_ex -LP-L/opt/mqm/lib -lmqm -lmqmcs -lmqmzse -lnsl -ldl
    Have you fixed that -LP-L nonsense?

    Next, try this
    file /opt/mqm/lib/libmqm.so

    For example, I get something like
    $ file /usr/lib/attica_kde.so
    /usr/lib/attica_kde.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked


    Make sure you get the actual file in case the named file is just a symbolic link to somewhere else.
    Now I got this:

    Code:
    /usr/bin/gcc -m64 -DMQ_SEND  /home/avalanche/oleg/src/ctm_mq_con_ex.o -o  /home/avalanche/oleg/bin/ctm_mq_con_ex -LP/opt/mqm/lib64   /opt/mqm/lib/libmqm.so -lmqm -lmqmcs -lmqmzse -lnsl -ldl
    /opt/mqm/lib/libmqm.so: could not read symbols: File in wrong format
    Did I understand you correctly?

    Thanks

  2. #17
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    Why do you keep putting a "P" in the path, when the linker path option is simply -L ?

    > -LP/opt/mqm/lib64 /opt/mqm/lib/libmqm.so
    I mean, if you just said -L/opt/mqm/lib64 you wouldn't need the absolute path to the .so file (which you got wrong anyway if this is supposed to be 64 bit).

    It's like you're randomly pressing keys without thinking about what you're doing.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #18
    Registered User
    Join Date
    Apr 2017
    Posts
    51
    Thanks a lot, it works

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. doesn't recognize stdafx.h
    By GiantFurby in forum C++ Programming
    Replies: 4
    Last Post: 03-24-2009, 10:42 AM
  2. compiler doesn't recognize my friend
    By pheres in forum C++ Programming
    Replies: 6
    Last Post: 12-05-2008, 11:10 AM
  3. notepad doesn't recognize new line character
    By sp2 in forum C Programming
    Replies: 11
    Last Post: 04-30-2008, 10:55 AM
  4. Replies: 4
    Last Post: 02-27-2008, 03:10 PM
  5. Client doesn't recognize '+'!
    By hyaku_ in forum Networking/Device Communication
    Replies: 9
    Last Post: 01-18-2005, 02:19 PM

Tags for this Thread