Re: 1st Time User: My Code Never Works

Posted by rob.philipp on
URL: http://quantlib.414.s1.nabble.com/1st-Time-User-My-Code-Never-Works-tp7557p7561.html

Are you able to located the library "QuantLib-vc80-mt-gd.lib" manually? Check the name of the library the "QuantLib" project is producing. If it has a different name, make sure that it is in the Library search path, and that the library is listed as a dependency. If both of those are set properly, tell Visual Studio to ignore the "QuantLib-vc80-mt-gd.lib" library. If "QuantLib-vc80-mt-gd.lib" is the name of the library produced by the "QuantLib" project, then make sure that it is in the library search path.


Robert Philipp
Synapse Financial Engineering
703.623.4063 (mobile)
703.573.0119 (fax)

[hidden email]
www.synapsefe.com

On 8/6/2010 1:48 AM, Dima wrote:
Don't give up. Its working, but something is not right yet. Another 
thing I can think of is: You've compiled
QuantLib in a different Visual Studio version than the one you're 
calling it in. Why don't you go to the
QuantLib\lib folder and tell us which files you have there?



james shaw schrieb:
  
Dima,
 
Thank you very much.
 
I tried all different mode and it dosen't work. Frustrated!
 
James

On Sun, Aug 1, 2010 at 11:54 AM, Dima <[hidden email] 
[hidden email]> wrote:

    Very likely that you build the project in debug mode and you try
    to run it in release mode. Or the other way round

    2010/7/30 james hirschorn <[hidden email]
    [hidden email]>

        Did you set the Additional Library Directories in the project
        properties? You could also try including ql/auto_link.hpp.

        ------------------------------------------------------------------------
        *From:* james shaw <[hidden email]
        [hidden email]>
        *To:* [hidden email]
        [hidden email]
        *Sent:* Fri, July 30, 2010 11:12:09 AM
        *Subject:* [Quantlib-users] 1st Time User: My Code Never Works

        It is my 1st time working on Quantlib. I created a very simple
        program as below. I used MS Visual Stutio C++. The program
        dosen't work. Can anyone help?
         
        Many thanks.
         
        Ming
         
        ************************************************************************************************************

        #include

        <ql/quantlib.hpp>

        #include

        <boost/timer.hpp>

        #include

        <iostream>

        #include

        <iomanip>

        using

        namespace QuantLib;

         

        #if

        defined(QL_ENABLE_SESSIONS)

        namespace QuantLib {

        Integer sessionId() { return 0; }

        }

        #endif

        int

        main(int, char* [])

        {

        Calendar celendar = TARGET() ;

        Date todaysDate(26, July, 2010) ;

        return 0;

        }

        ***********************************************************************************************

        Error is

        **********************************************************************************************

        Error 1 fatal error LNK1104: cannot open file
        'QuantLib-vc80-mt-gd.lib' QLibTest01 
        ***********************************************************************************************



        ------------------------------------------------------------------------------
        The Palm PDK Hot Apps Program offers developers who use the
        Plug-In Development Kit to bring their C/C++ apps to Palm for
        a share
        of $1 Million in cash or HP Products. Visit us here for more
        details:
        http://p.sf.net/sfu/dev2dev-palm
        _______________________________________________
        QuantLib-users mailing list
        [hidden email]
        [hidden email]
        https://lists.sourceforge.net/lists/listinfo/quantlib-users



    

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users

  

------------------------------------------------------------------------------
This SF.net email is sponsored by

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users