zhaopuming / quickfast

Automatically exported from code.google.com/p/quickfast
Other
1 stars 0 forks source link

`LLONG_MAX' undeclared #91

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

While compiling quickfast_1_3 I am getting `LLONG_MAX' undeclared error. Please 
advise how to define LLONG_MAX.

g++  -fPIC -O -O3 -DUSING_PCH -D_REENTRANT 
-I"/home/akuma111/api/boost/boost_1_39_0/include/boost-1_39" -I"                
                                   /home/akuma111/api/boost/boost_1_39_0/." 
-I"../src" -I"/home/akuma111/myapi/xerces/xerces-c-3.0.1-x86-linux              
                                     -gcc-3.4/include" 
-I"/home/akuma111/api/boost/boost_1_39_0/include" -c -DQUICKFAST_BUILD_DLL -o 
"Common/Dec                                                   imal.o" 
Common/Decimal.cpp
Common/Decimal.cpp: In member function `void
   QuickFAST::Decimal::denormalize(signed char)':
Common/Decimal.cpp:229: `LLONG_MAX' undeclared (first use this function)
Common/Decimal.cpp:229: (Each undeclared identifier is reported only once for
   each function it appears in.)
make[1]: *** [Common/Decimal.o] Error 1
make[1]: Leaving directory `/home/akuma111/myapi/QuickFAST1.3/quickfast_1_3/src'
make: *** [QuickFAST] Error 2

Thanks,
Alok Kumar

Original issue reported on code.google.com by callalok...@gmail.com on 19 Jul 2011 at 11:24

GoogleCodeExporter commented 9 years ago
LLONG_MAX is defined in the standard C/C++ header file limits.h.   It should be 
included indirectly by one of the includes in Common/QuickFASTPch.h, but if not 
you can try adding #include <limits.h> to that file.   Let me know if that 
fixes the problem and I'll make the change in the source code repository.

Dale

Original comment by dale.wil...@gmail.com on 19 Jul 2011 at 2:09

GoogleCodeExporter commented 9 years ago
I tried to add #include <limits.h> in Common/QuickFASTPch.h but still the same 
error. Looks like some how this macro is not getting defined. I checked 
limits.h file and LLONG_MAX in defined in this header.

Common/Decimal.cpp: In member function `void
   QuickFAST::Decimal::denormalize(signed char)':
Common/Decimal.cpp:229: `LLONG_MAX' undeclared (first use this function)
Common/Decimal.cpp:229: (Each undeclared identifier is reported only once for
   each function it appears in.)
make[1]: *** [Common/Decimal.o] Error 1
make[1]: Leaving directory `/home/akuma111/myapi/QuickFAST1.3/quickfast_1_3/src'
make: *** [QuickFAST] Error 2

Alok

Original comment by callalok...@gmail.com on 20 Jul 2011 at 4:22

GoogleCodeExporter commented 9 years ago
For time being I have defined LLONG_MAX in Common/QuickFASTPch.h and now 
compilation seems to be successful but getting below linking error

/usr/bin/ld: cannot find -lboost_thread
collect2: ld returned 1 exit status
make[1]: *** [../lib/libQuickFAST.so] Error 1
make[1]: Leaving directory `/home/akuma111/myapi/QuickFAST1.3/quickfast_1_3/src'
make: *** [QuickFAST] Error 2
bash-2.05b$

LD_LIBRARY_PATH is correctly point to my boost lib. Please can you advise if 
need to export any lib name related stuffs just like we do for XERCES_LIBNAME?

Alok

Original comment by callalok...@gmail.com on 20 Jul 2011 at 6:07

GoogleCodeExporter commented 9 years ago
Please open a new issue when you encounter a new problem.

I'm closing this issue because LLONG_MAX is defined in the standard header 
file, and I am not seeing this problem on any of our test builds.

Check your environment.

Original comment by dale.wil...@gmail.com on 28 Sep 2011 at 8:49

GoogleCodeExporter commented 9 years ago
Per 
http://en.wikipedia.org/wiki/C_data_types#Interface_to_the_properties_of_the_bas
ic_types, LLONG_MAX was introduced in C99, so using a strictly C89 compiler 
will have this problem.  One of the most obvious examples of lack of C99 
support is the Microsoft compiler 
[http://www.infoq.com/news/2012/05/vs_c99_support/].

Original comment by jeff.science@gmail.com on 31 Dec 2012 at 9:45