Revision 1432

trunk/tests/dll/README.txt (revision 1432)
1
Todo
2
----
3

  
4
[ ] fix "admb -d" for nmake and cl
trunk/tests/dll/example.cpp (revision 1432)
1
#include <iostream>
2

  
3
extern "C" {
4

  
5
void __stdcall __declspec(dllexport) example()
6
{
7
  std::cout << __func__ << ':' << __LINE__ << std::endl;
8
}
9

  
10
};
trunk/tests/dll/Makefile (revision 1432)
1
all: testdll.exe
2

  
3
run:
4
	testdll.exe
5

  
6
testdll.exe: main.obj simple.dll example.dll
7
	$(CXX) -o $@ main.obj simple.dll example.dll
8

  
9
simple.dll: simple.obj
10
	..\..\admb -d $^
11

  
12
simple.obj:
13
	copy ..\..\examples\admb\simple\simple.tpl
14
	copy ..\..\examples\admb\simple\simple.dat
15
	..\..\admb -c -d simple.tpl
16

  
17
main.obj: main.cpp
18
	$(CXX) -c -o $@ $^
19

  
20
example.dll: example.obj
21
	$(CXX) -shared -o $@ $^
22

  
23
example.obj: example.cpp
24
	$(CXX) -c -o $@ $^
25

  
26
clean:
27
	del /Q admodel.cov
28
	del /Q admodel.dep
29
	del /Q admodel.hes
30
	del /Q eigv.rpt
31
	del /Q example.dll
32
	del /Q example.obj
33
	del /Q fmin.log
34
	del /Q main.obj
35
	del /Q simple.bar
36
	del /Q simple.cor
37
	del /Q simple.cpp
38
	del /Q simple.dat
39
	del /Q simple.def
40
	del /Q simple.dll
41
	del /Q simple.eva
42
	del /Q simple.htp
43
	del /Q simple.log
44
	del /Q simple.obj
45
	del /Q simple.par
46
	del /Q simple.std
47
	del /Q simple.tpl
48
	del /Q testdll.exe
49
	del /Q variance
trunk/tests/dll/example.h (revision 1432)
1
extern "C" {
2
  void __stdcall __declspec(dllexport) simple(char** argv);
3
  void __stdcall __declspec(dllexport) example();
4
};
trunk/tests/dll/main.cpp (revision 1432)
1
#include "example.h"
2

  
3
int main(int argc, char** argv)
4
{
5
  example();
6
  simple(argv);
7
  return 0;
8
}
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff