Compilation error in 64bit Linux due to int64_t

572 views
Skip to first unread message

Saiful Khan

unread,
Dec 20, 2013, 11:11:26 PM12/20/13
to dex...@googlegroups.com
Hello,

My code is working fine in 32bit Ubuntu, however, recently when I have tried to compile it in 64bit Ubuntu 13.10, I am getting some compilation errors.Seems the issue is  due to two different typedefs of int64_t in stdint.h (typedef long int int64_t) and DEX`s common.h (typedef signed long long int64_t;). Could you please suggest what should I do?


Detail error:

In file included from /usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdint.h:9:0,

from /usr/include/c++/4.8/cstdint:41,

from /usr/include/c++/4.8/bits/char_traits.h:376,

from /usr/include/c++/4.8/ios:40,

from /usr/include/c++/4.8/ostream:38,

from /usr/include/c++/4.8/iostream:39,

from MyCode.h

/usr/include/stdint.h:40:19: note: candidates are: typedef long int int64_t

typedef long int int64_t;

^

from MyDEXCode.h

dexcpp-4.8.2/includes/dex/gdb/common.h:124:26: note: typedef long long int dex::gdb::int64_t

typedef signed long long int64_t;


Saiful Khan

unread,
Dec 21, 2013, 5:09:53 PM12/21/13
to dex...@googlegroups.com
Changing the common.h as (mentioned below) solves the compilation issue.

# if __WORDSIZE == 64
typedef long int        int64_t;
# else

typedef signed long long int64_t;
# endif

But now there are some linking issues, though I am now linking with 64bit .so in dexcpp-4.8.2/lib/linux64

undefined reference to `dex::gdb::Graph::SetAttribute(long, int, dex::gdb::Value&)'
undefined reference to `dex::gdb::Graph::FindEdge(int, long, long)'

undefined reference to `dex::gdb::Graph::Neighbors(long, int, dex::gdb::EdgesDirection)'

and many more ...


Saiful Khan

unread,
Dec 21, 2013, 5:27:13 PM12/21/13
to dex...@googlegroups.com
Well, its not an urgent issue as it is working fine in my 32bit system.
Happy Christmas and holidays to all.

-Saiful


On Sat, Dec 21, 2013 at 4:11 AM, Saiful Khan <saifu...@gmail.com> wrote:

dex...@gmail.com

unread,
Jan 2, 2014, 5:39:54 AM1/2/14
to dex...@googlegroups.com
Dear Saiful,

Sorry about the delay, we are short on support due to the holiday season. Hope you had a good Christmas and beginning of the New Year!

We are going to look to the Linux 64bit configuration issue and we'll let you know.

Please accept my apologies for the incoveniences!

Best,

DEXgdb team

c3po.ac

unread,
Jan 8, 2014, 9:06:54 AM1/8/14
to dex...@googlegroups.com

Hi,

I have tried a simple test on ubuntu 13.10 64bits and I don't get the same error.
I get an error saying that int64_t is ambiguous if I create a variable with this type while using the dex::gdb namespace.
But it can be solved just by explicitly using the full type name (dex::gdb::int64_t) in the variable declaration.

Can you please tell us what compilation flags are you using?

Thanks.


El dijous 2 de gener de 2014 11:39:54 UTC+1, dex...@gmail.com va escriure:

Saiful Khan

unread,
May 25, 2014, 7:30:59 AM5/25/14
to spar...@googlegroups.com
Thanks for your reply. Yes the error occurs when I use dex::gdb namespace and can avoid it using  dex::gdb::int64_t . But this adds adding lot of redundant codes, which is difficult given the time and amount of changes I need to do before I start using 64 bit. 

When int64_t is already defined in standard C/C++ lib, redefining it is probably going cause some trouble!  

Thanks and regards,
Saiful


--
You received this message because you are subscribed to the Google Groups "DEXgdb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dexgdb+un...@googlegroups.com.
To post to this group, send email to dex...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages