Hi
I have make a Radasm 2 Static library Template
Make a new file "Radasm\cpp\Templates\StaticLib.tpl" and paste this code.
LIB Project
StaticLib
Static library
[*BEGINPRO*]
[*BEGINDEF*]
[MakeDef]
Menu=0,1,1,1,0,0,0,1,0,0,0,0,0,0,0,0
1=4,O,RC /v,1
2=3,O,CL /c /O1 /GA /GB /w /TP /nologo /Fo /I"$I",2
3=9,O,LIB,3
4=0,0,,5
5=rsrc.obj,O,CVTRES,rsrc.res
6=*.obj,O,CL /c /O1 /GA /GB /w /TP /nologo /Fo /I"$I",*.cpp
7=0,0,"$E\OllyDbg",5
[MakeFiles]
0=StaticLib.rap
1=StaticLib.rc
2=StaticLib.cpp
3=StaticLib.obj
4=StaticLib.res
5=StaticLib.exe
6=StaticLib.def
7=StaticLib.dll
8=StaticLib.txt
9=StaticLib.lib
10=StaticLib.mak
11=StaticLib.c
12=StaticLib.com
13=StaticLib.ocx
14=StaticLib.idl
15=StaticLib.tlb
[Resource]
[StringTable]
[Accel]
[VerInf]
[Group]
Group=Added files,Assembly,Resources,Misc,Modules
1=2
2=2
[*ENDDEF*]
[*BEGINTXT*]
StaticLib.cpp
#include "StaticLib.h"
namespace StaticLibFuncs
{
double MyStaticFuncs::FuncA(double a, double b)
{
return a + b; // Replace with your own code
}
double MyStaticFuncs::FuncB(double a, double b)
{
return a - b; // Replace with your own code
}
}
[*ENDTXT*]
[*BEGINTXT*]
StaticLib.h
#ifndef STATICLIBFUNCS_H
#define STATICLIBFUNCS_H
namespace StaticLibFuncs
{
class MyStaticFuncs
{
public:
static double FuncA(double a, double b);
static double FuncB(double a, double b);
};
}
#endif
[*ENDTXT*]
[*ENDPRO*]
Tested with VC98 for VC2010 must you delete this commandlind switch /GB
Greets,