[ADMB Users] Including a header file
Arni Magnusson
arnima at hafro.is
Fri Oct 28 09:44:10 PDT 2011
Hi Héctor,
I believe the proper C++ syntax is
#include "admodel.h"
with quotes, because this is a header file that is not part of the
compiler.
On the other hand, iostream does come with the compiler, so the proper C++
syntax is:
#include <iostream>
Actually I don't think you need to include iostream in ADMB models,
because it's already included by default (see include/fvar.hpp). So you
can either just delete the <iostream.h> or replace it with <iostream>.
Arni
On Fri, 28 Oct 2011, Héctor D. Cordo wrote:
> I installed
> <http://code.google.com/p/admb-project/downloads/detail?name=admb-ide-450-1.
> exe&can=2&q=admb-ide> admb-ide-450-1.exe (2011-02-17) and have a problem
> with include iostream.h
>
> In my template I write:
>
> GLOBALS_SECTION
> #include <admodel.h>
> #include <iostream.h>
>
> When try to compile the tpl I get this message:
>
> Abcata30.cpp:2:24: fatal error: iostream.h: No such file or directory
>
> Compilation termined
>
> Error: could no create abcata30.obj
>
> I looked into the directory C:\ADMB\gcc450\include\ and the file
> iostream.h is not there.
>
> Could you help me about this?
>
> Thanks, regards
>
> Hector D. Cordo
>
> INIDEP, Mar del Plata, Argentina
>
More information about the Users
mailing list