Archived

This forum has been archived. Please start a new discussion on GitHub.

Question about #include

Good day, all!

I work in Visual Studio.Net. After making, for example:
slice2cpp.exe example.ice
I receive a two file, example.h and example.cpp
But every time when I change a Slice definition I must manually fix in example.cpp file code
#include <example.h>
to
#include "example.h"
(from global scope include to local).
How it can be fixed without every time changing code manually?

--
Regards,
Alexander

Comments

  • mes
    mes California
    Hi,

    It should never be necessary to modify the generated code. Instead, you should add "/I." to your project's compiler settings to tell the compiler to look in the current subdirectory for include files.

    Take care,
    - Mark
  • bernard
    bernard Jupiter, FL
    Hi Alexander,

    Please have a look at the Visual Studio projects for the demos, in particular at the "Custom Build Step" associated with the .ice files

    Cheers,
    Bernard
  • Ok, thanks.

    It's just need to insert a ".," declaration in Additional Include Directories project settings.