CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2014

    Makefile options to compile for 64 bit

    Hi All,

    I have called a C function inside C++ code. The .so which gets created is a 32 bit while I am looking for 64 bit . What all options should be mentioned in the Make file to eventually compile and get shared object of ELF64 CLASS ?

    Excerpts from Makefile

    CC = gcc
    CXX = g++
    CFLAGS = -O2 -pipe
    CXXFLAGS = -g -O2
    LIBS = -lsocket -lnsl
    RM = rm -f
    CP = cp
    RMDIR = rmdir
    SHTOOL = $(S)/shtool
    LIBTOOL = $(C)/libtool
    TRUE = true
    POD2MAN = pod2man
    PERL = /usr/bin/perl
    PHP = NA
    PG_CONFIG = /usr/bin/pg_config


  2. #2
    Join Date
    Oct 2006

    Re: Makefile options to compile for 64 bit

    -m64 should be sufficient if you have a multilib (that contains standard libs in both 32/64 bits) gcc installed
    Debugging is twice as hard as writing the code in the first place.
    Therefore, if you write the code as cleverly as possible, you are, by
    definition, not smart enough to debug it.
    - Brian W. Kernighan

    To enhance your chance's of getting an answer be sure to read
    and before posting

    Refresh your memory on formatting tags here

    Get your free MS compiler here

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width