提交 976611e8 创建 作者: 赵鹏翀's avatar 赵鹏翀

init template

上级
/Debug
/Release
#ifndef EXPORTFUNS_H
#define EXPORTFUNS_H
#ifdef __cplusplus
extern "C" {
#endif
#ifdef SHARED_MODULE
#define DLL_EXPORT __declspec(dllexport)
#else
#define DLL_EXPORT __declspec(dllimport)
#endif
int DLL_EXPORT SampleFunSum(int a, int b);
#ifdef __cplusplus
}
#endif
#endif
<?xml version="1.0" encoding="gb2312"?>
<ASMProject Version="1.00" Name="Lab014" TemplatePath="console(c)\Project" ProjectID="79a9c940-2f43-42b9-8bfc-90be0876e490" IsSubmitWork="0">
<Configurations>
<Configuration Name="Debug" DebuggerFlavor="0">
<Tool Name="PreBuildEventTool"/>
<Tool Name="CustomBuildTool"/>
<Tool Name="GCCCompilerTool" PreprocessorDefinitions="_DEBUG" GenerateDebugInformation="-1" LanguageStandard="c99"/>
<Tool Name="PreLinkEventTool"/>
<Tool Name="GCCLinkerTool" AdditionalLibraries="library"/>
<Tool Name="PostBuildEventTool"/>
</Configuration>
<Configuration Name="Release" DebuggerFlavor="0">
<Tool Name="PreBuildEventTool"/>
<Tool Name="CustomBuildTool"/>
<Tool Name="GCCCompilerTool" PreprocessorDefinitions="NDEBUG" LanguageStandard="c99"/>
<Tool Name="PreLinkEventTool"/>
<Tool Name="GCCLinkerTool" StripDebugInfo="-1"/>
<Tool Name="PostBuildEventTool"/>
</Configuration>
</Configurations>
<Files>
<Filter Name="ͷļ" Filter="h;hpp;hxx">
<File RelativePath=".\console.h">
</File>
<File RelativePath=".\ExportFuns.h">
</File>
</Filter>
<Filter Name="Դļ" Filter="cpp;c;cc;cxx">
<File RelativePath=".\console.c">
</File>
</Filter>
</Files>
</ASMProject>
添加文件
/* 定义控制台应用程序的入口点 */
#include "console.h"
#include "ExportFuns.h"
int main(int argc, char* argv[])
{
/* TODO: 在此处添加自己的代码 */
printf("计算结果是: %d\n", SampleFunSum(100, 200));
return 0;
}
#ifndef _CONSOLE_H_
#define _CONSOLE_H_
#include <stdio.h>
/* TODO: 在此处引用程序需要的其他头文件 */
#endif /* _CONSOLE_H_ */
添加文件
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论