Hello
I installed under mandrake 10.0 Quandlib. But when I make a program at c++ and I compile it I have a error witch I give by attachement. I want to have some indications for to use correctly quantlib: My programm is : #include <ql/quantlib.hpp> #include <iostream> int main (int,char* []){ } Commande compilation is gcc -I"include" -L"lib" test.cpp Thanks error.txt (2K) Download Attachment |
On 03/10/2006 02:53:31 PM, Diallo Amadou wrote:
> Hello > I installed under mandrake 10.0 Quandlib. But when I make a program at > c++ and I compile it I have a error witch I give by attachement. > > Commande compilation is > gcc -I"include" -L"lib" test.cpp I would try g++ -I"include" -L"lib" -lQuantLib test.cpp Luigi ---------------------------------------- Blessed is the man who, having nothing to say, abstains from giving wordy evidence of the fact. -- George Eliot |
In reply to this post by Diallo Amadou
Dear Kind Soul,
I'm pulling my hair at QuantLib-SWIG-0.3.11 compilation failure in cygwin: configure doesn't seem to generate the proper flags for gcc -- jerry@jerryji:/cygdrive/d/QuantLib/source/QuantLib-SWIG-0.3.11 (Mon Mar 13 22:05:40) $ ./configure && make -C Python ... building 'QuantLib._QuantLib' extension gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -D__WIN32__ -DWIN32 -DNDEBUG -D_WINDOW S -DNOMINMAX -ID:\QuantLib\source\QuantLib-0.3.11 -I/usr/include/python2.4 -c QuantLib/quantlib_wrap.cpp -o build/temp.cygwin-1.5.18-i686-2.4/QuantLib/quantlib_wrap.o /GR /FD /Zm250 /MT gcc: /GR: No such file or directory gcc: /FD: No such file or directory gcc: /Zm250: No such file or directory gcc: /MT: No such file or directory cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++ neither for g++ -- jerry@jerryji:/cygdrive/d/QuantLib/source/QuantLib-SWIG-0.3.11 (Mon Mar 13 22:06:26) $ ./configure && make -C Python ... building 'QuantLib._QuantLib' extension g++ -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -D__WIN32__ -DWIN32 -DNDEBUG -D_WINDOW S -DNOMINMAX -ID:\QuantLib\source\QuantLib-0.3.11 -I/usr/include/python2.4 -c QuantLib/quantlib_wrap.cpp -o build/temp.cygwin-1.5.18-i686-2.4/QuantLib/quantlib_wrap.o /GR /FD /Zm250 /MT g++: /GR: No such file or directory g++: /FD: No such file or directory g++: /Zm250: No such file or directory g++: /MT: No such file or directory cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++ I even tried cl (MS VC++8) but just hit another wall -- jerry@jerryji:/cygdrive/d/QuantLib/source/QuantLib-SWIG-0.3.11 (Mon Mar 13 21:58:29) $ ./configure && make -C Python ... building 'QuantLib._QuantLib' extension /cygdrive/c/Program Files/Microsoft Visual Studio 8/VC/BIN/cl.exe -fno-strict-aliasing -DNDEBUG -g -O3 -W all -Wstrict-prototypes -D__WIN32__ -DWIN32 -DNDEBUG -D_WINDOWS -DNOMINMAX -ID:\QuantLib\source\QuantLib- 0.3.11 -I/usr/include/python2.4 -c QuantLib/quantlib_wrap.cpp -o build/temp.cygwin-1.5.18-i686-2.4/QuantLib/quantlib_wrap.o /GR /FD /Zm250 /MT Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.42 for 80x86 Copyright (C) Microsoft Corporation. All rights reserved. cl : Command line error D8021 : invalid numeric argument '/Wstrict-prototypes' error: command '/cygdrive/c/Program Files/Microsoft Visual Studio 8/VC/BIN/cl.exe' failed with exit status 2 make[1]: *** [.build-stamp] Error 1 Any suggestion will be greatly appreciated! -- Jerry |
On 03/13/2006 03:19:49 PM, Jerry Ji wrote:
> I'm pulling my hair at QuantLib-SWIG-0.3.11 compilation failure in > cygwin: configure doesn't > seem to generate the proper flags for gcc -- It seems like setup.py is getting confused. Can you run the following in a Python shell from cygwin and tell me what is returned? >>> import sys >>> print sys.platform Later, Luigi ---------------------------------------- There are two ways to write error-free programs; only the third one works. -- unknown |
Dear Luigi,
Hum... sys.platform in Cygwin returns 'cygwin'. In fact, I have already updated my setup.py to have the compiler settings portion directed to the original 'win32' section (primarily because I had my QuantLib compiled in MS VC and don't think Cygwin gcc would be able to link .lib or .dll successfully) -- [hidden email] (Tue Mar 14 21:05:27) $ vi setup.py ... 76 #if sys.platform == 'win32': 77 if sys.platform == 'cygwin': 78 try: 79 QL_INSTALL_DIR = os.environ['QL_DIR'] 80 except Exception, e: 81 raise 'unable to detect QuantLib installation' 82 include_dirs = [QL_INSTALL_DIR] 83 library_dirs = [os.path.join(QL_INSTALL_DIR, 'lib')] 84 libraries = None My problem was more like how to get rid of the unrecognized/redundant compiler argument Wstrict-prototypes -- cl : Command line error D8021 : invalid numeric argument '/Wstrict-prototypes' Where I couldn't find it anywhere in the package -- [hidden email] (Tue Mar 14 21:03:38) $ grep -r strict-prototypes . [hidden email] (Tue Mar 14 21:04:04) $ Thanks! Jerry Luigi Ballabio wrote:
|
On 03/14/2006 03:18:54 PM, Jerry Ji wrote:
> Hum... sys.platform in Cygwin returns 'cygwin'. In fact, I have > already updated my setup.py to have the compiler settings portion > directed to the original 'win32' section (primarily because I had my > QuantLib compiled in MS VC and don't think Cygwin gcc would be able > to link .lib or .dll successfully) -- I see. But if you compiled QuantLib in VC++, you'll have to use the same compiler for the Python extension as well---and use Python for Windows, not the one coming with cygwin. Cygwin will try to use gcc, so it will need a library compiled with gcc. You'll have to cd to the QuantLib-SWIG/Python directory and run "python setup.py build" from a DOS shell. Luigi ---------------------------------------- A programming language is low-level when its programs require attention to the irrelevant. -- Alan Perlis |
Free forum by Nabble | Edit this page |