Online 'DesignCPP' code not compiling - Eclipse indigo

This forum is to discuss the book "C++ design patterns and derivatives pricing."

Online 'DesignCPP' code not compiling - Eclipse indigo

Postby fullofquestions » Tue Jun 05, 2012 4:56 pm

Everyone, I have various experience coding in Java and Perl. A bit of C++ a while back. I got a copy of the book and would like to focus on the examples and not on setting up IDEs and technical stuff at least for the time being. So I've done the following:
1. downloaded the online version of the code to avoid the problems with the code in the CD
2. downloaded Eclipse Indigo with C/C++ language support. I can run a simple 'hello world' program so at the very least I have a linker and compiler working
3. I created a new project using the code contents
4. I added to that project the 'include' folder so that the *.h files are found
5. when I try to compile the 'SimpleMCMain1.cpp' file I get the error:
'there are no arguments to 'fabs' that depend on a template parameter, so a declaration of 'fabs' must be available NewtonRaphson.h /C++ Projects/include line 18 C/C++ Problem'

I would prefer to focus on the code and not on these technical details. Would any of you have any suggestions to get this to work? Altough I'm open to other setups, I think that getting eclipse to work would be great due to the debug tools and such. Furthermore, I think it would be worthwhile because then I could share the exact steps that I took to get this to work and we could have a 'beginner's' set of instructions for those that are starting fresh with C++. It would be great to simply download Eclipse with C/C++ language support, download the code, create a new project, tweak a few things and get this code running.
Posts: 2
Joined: Sun Sep 02, 2007 7:59 pm
Location: East Coast

Re: Online 'DesignCPP' code not compiling - Eclipse indigo

Postby mj » Thu Jun 07, 2012 5:43 am

the code generally has worked straight out of the box in the past.... however, the compilers it was designed for about 10 years old now.

I'd suggest trying it with Visual Studio Express which is also available for free.

I am surprised that SimpleMCMain1.cpp has a dependency on NewtonRaphson
Site Admin
Posts: 1380
Joined: Fri Jul 27, 2007 7:21 am

Return to C++ design patterns and derivatives pricing

Who is online

Users browsing this forum: No registered users and 2 guests