Go Back   ZeroC Forums > Bug Reports

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 11-01-2004
dragzhb dragzhb is offline
Registered User
 
 
Join Date: Jul 2004
Posts: 63
Send a message via Yahoo to dragzhb
-->
include/IceUtil/Config.h:196: error: `INT64_MIN' was not declared in this scope

Hi :
I found a bug in include/IceUtil/Config.h:196, it's not always occured, but few time will occured. the error is :

In file included from ../../include/IceUtil/Exception.h:13,
from Exception.cpp:10:
../../include/IceUtil/Config.h:196: error: `INT64_MIN' was not declared in this scope
../../include/IceUtil/Config.h:197: error: `INT64_MAX' was not declared in this scope

if I define as following , it's will okay.

#ifndef INT64_MIN
#define INT64_MIN (-(9223372036854775807 ## L)-1)
#endif

#ifndef INT64_MAX
#define INT64_MAX ((9223372036854775807 ## L))
#endif
Reply With Quote
  #2 (permalink)  
Old 11-02-2004
marc's Avatar
marc marc is offline
ZeroC Staff
 
Name: Marc Laukien
Organization: ZeroC, Inc.
Project: The Internet Communications Engine
 
Join Date: Feb 2003
Location: Florida
Posts: 1,771
Which compiler is this? I've never seen this error before with any of our supported compilers. In any case, I guess it's a good idea to add these macros, just in case some compiler doesn't define INT64_MIN and INT64_MAX.
Reply With Quote
  #3 (permalink)  
Old 11-02-2004
dragzhb dragzhb is offline
Registered User
 
 
Join Date: Jul 2004
Posts: 63
Send a message via Yahoo to dragzhb
-->
gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-thread
s=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --host=i386-redhat-linux
Thread model: posix
gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-20)

I think it isn't relation of compiler, for exmaple , when I include <phonelist.h>, it's okay, but when I include <phonelistI.h> , it will occur this error. I think the bug is in this:

# ifndef __STDC_LIMIT_MACROS
# define __STDC_LIMIT_MACROS
# endif
# include <stdint.h>
#endif
Reply With Quote
  #4 (permalink)  
Old 11-03-2004
michi's Avatar
michi michi is offline
ZeroC Staff
 
Name: Michi Henning
Organization: ZeroC
Project: Ice
 
Join Date: Feb 2003
Location: Brisbane, Australia
Posts: 889
Quote:
Originally posted by dragzhb
I think it isn't relation of compiler, for exmaple , when I include <phonelist.h>, it's okay, but when I include <phonelistI.h> , it will occur this error.
That is strange. Presumably, phonelistI.h includes phonelist.h?

Quote:
I think the bug is in this:

# ifndef __STDC_LIMIT_MACROS
# define __STDC_LIMIT_MACROS
# endif
# include <stdint.h>
#endif
Could you post a concrete source file that shows the problem? I'm reluctant to mess with Config.h unless it's really necessary. I'd like to understand what is happening properly first.

Cheers,

Michi.
Reply With Quote
  #5 (permalink)  
Old 11-04-2004
dragzhb dragzhb is offline
Registered User
 
 
Join Date: Jul 2004
Posts: 63
Send a message via Yahoo to dragzhb
-->
yes , phonelistI.h includes phonelist.h.
I am feeling strange too. I including phonelist.h is okay , but my company colleague including phonelist.h and with ACE, it will occur this error.

I don't know why ? the source code is very simple . it use slice2cpp to create, I think I don't need to pass source up.

the repeat steps:

create a ice file like this :

#ifndef _DBENGINE_ICE
#define _DBENGINE_ICE

//#include <contentdata.ice>

module pnote
{
sequence<byte> ContentList;

exception ShutDownError
{
string reason;
};

/* DCS 0 - english; 8 - unicode */
struct DBEngineData
{
long ID;
//string PhoneNo;
//short GroupID;
//short RuleID;
bool ContentFlag;
//short ContentID;
short DCS;
ContentList Content;
};

interface DBEngineHome
{
["ami", "amd"] nonmutating DBEngineData find(long ID,string strPhoneNo) throws ShutDownError;
};

};

#endif _DBENGINE_ICE

the use following command to create file.

dbengineI.cpp:$(top_srcdir)/slice/dbengine.ice
slice2cpp --impl $(ICE_FLAGS) $(top_srcdir)/slice/dbengine.ice --output-dir $(top_srcdir)/src/web

Note:
It's not always occur this error , but have few time.
Reply With Quote
  #6 (permalink)  
Old 11-15-2004
michi's Avatar
michi michi is offline
ZeroC Staff
 
Name: Michi Henning
Organization: ZeroC
Project: Ice
 
Join Date: Feb 2003
Location: Brisbane, Australia
Posts: 889
I had another look, and I can't find anything wrong with our code. I suspect that one of the ACE headers is messing with the symbol definitions.
I'd rather leave things as they are at the moment, in the absence of a clear idea of what is actually happening. If you can reproduce this reliably in a small, self-contained example, that would be great -- it would allow us at least to figure exactly why you are getting this problem.

Cheers,

Michi.
Reply With Quote
  #7 (permalink)  
Old 11-15-2004
dragzhb dragzhb is offline
Registered User
 
 
Join Date: Jul 2004
Posts: 63
Send a message via Yahoo to dragzhb
-->
I suspect that one of the ACE headers is messing with the symbol definitions.
I tihnk so too .
But I can't reproduce this reliably in a small, self-contained example, beacuse this problem found by my colleague and he has used many package that I don't know.

I found this problem too, but I can't reproduce it now. If I found it too, I will upload it.

But I think it's very simple to add this MICRO and it don't effect other file and it looks like more portable.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
set config properties w/o config file dkey Help Center 3 05-08-2005 05:27 AM
a little bug in include/IceUtil/Config.h damingyipai Bug Reports 1 03-25-2005 10:43 AM
slice2freeze generating include path is error dragzhb Bug Reports 2 09-12-2004 09:55 PM
IceUtil::wstringToString link error? _orchid_ Help Center 4 12-01-2003 02:24 AM
icepackregistry --Ice.Config=config catalin Help Center 1 10-28-2003 04:38 PM


All times are GMT -4. The time now is 07:18 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.