creating dll for a cilk++ file

creating dll for a cilk++ file

hello 

i tried to create a dll for simple cilk++ file in vs2008 

the code is

the header file is

#pragma once

#include "stdio.h"
#pragma once

class myclass
{
public:
void hello();
};

the body is

#include "header.h"

void hello()
{
printf("hello world\n");
}

int cilk_main()
{
cilk_spawn hello();
cilk_spawn hello();
cilk_sync;
return 0;
}

i am trying to create dll for above file using this code which is in another file

#include "C:\Users\admin\Documents\Visual Studio 2008\Projects\cilkhelloworld\cilkhelloworld\header.h"
#include "C:\Users\admin\Documents\Visual Studio 2008\Projects\cilkhelloworld\cilkhelloworld\body.cilk"

extern "C" __declspec(dllexport) void hello1()
{
hello();
}

but i am getting this errors

1>------ Build started: Project: CilkDll, Configuration: Debug Win32 ------
1>Compiling...
1>main.cpp
1>c:\users\admin\documents\visual studio 2008\projects\cilkhelloworld\cilkhelloworld\body.cilk(10) : error C2065: 'cilk_spawn' : undeclared identifier
1>c:\users\admin\documents\visual studio 2008\projects\cilkhelloworld\cilkhelloworld\body.cilk(10) : error C2146: syntax error : missing ';' before identifier 'hello'
1>c:\users\admin\documents\visual studio 2008\projects\cilkhelloworld\cilkhelloworld\body.cilk(11) : error C2065: 'cilk_spawn' : undeclared identifier
1>c:\users\admin\documents\visual studio 2008\projects\cilkhelloworld\cilkhelloworld\body.cilk(11) : error C2146: syntax error : missing ';' before identifier 'hello'
1>c:\users\admin\documents\visual studio 2008\projects\cilkhelloworld\cilkhelloworld\body.cilk(12) : error C2065: 'cilk_sync' : undeclared identifier
1>Build log was saved at "file://c:\Users\admin\Documents\Visual Studio 2008\Projects\CilkDll\CilkDll\Debug\BuildLog.htm"
1>CilkDll - 5 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

any one can help me to create dll

thanks in advance

1 post / 0 new
For more complete information about compiler optimizations, see our Optimization Notice.