user-0 提问:  网上下的c源码 从来都是无法运行

回复:
user: user-1
content: 是 linux 的. vc 下也可以.先搞util, 是个 lib 1. 用 word 把 源文件 改存为 txt 的 vc 创建一个 静态库项目 叫 util, 加入所有 文件. 2. rebuild all 就有了 util.lib  然后是其他  vc下不要什么 make

user: user-1
content: 打开C++ IDE 点击 fpgrowth.c rebuild all  加入 其他 文件。  rebuild all  修改 设置。

user: user-1
content: 面的 3个 项目， 一个一个 做。 问题在于， 源文件 不是 txt 格式 （是 网页），要 先转换。如：  /*----------------------------------------------------------------------   File    : fpgrowth.c   Contents: fpgrowth algorithm for finding frequent item sets   Author  : Christian Borgelt   History : 2004.11.21 file created from eclat.c             2004.11.23 absolute/relative support output changed             2004.12.09 filter added (binary logarithm of supp. quotient)             2005.06.20 use of flag for "no item sorting" corrected             2007.02.13 adapted to modified module tabread             2008.01.22 special processing of chains added             2008.05.02 default limit for maximal number of items removed             2008.09.01 adapted to modified modules tract and report             2008.09.02 pruning with perfect extensions added             2008.09.09 more flexible information output control added             2008.10.26 maximum item set size removed from recursion             2008.10.31 adapted to changes in item set reporting             2008.11.13 adapted to changes in transaction management             2009.05.28 adapted to modified function tbg_filter()             2009.10.15 adapted to item set counter in reporter             2009.10.18 treatment of item chains simplified             2009.10.19 closed and maximal item set mining added             2010.02.08 adapted to new repository for filtering             2010.03.03 copy pointer removed from structure FPNODE             2010.03.04 memory system eliminated (now array of nodes)             2010.03.17 head union tail pruning for maximal sets added             2010.07.14 output file made optional (for benchmarking)             2010.07.20 created projections are no longer reallocated             2010.07.25 separate frequent pattern tree module removed             2010.07.26 fixed frequent pattern tree for each recursion             2010.07.27 variant with children/sibling nodes added             2010.07.29 variant added that processes the tree top-down             2010.07.30 simple node structure variant redesigned             2010.08.03 complex node variant with item reordering added             2010.08.05 top-down processing with single tree added             2010.08.19 item selection file added as optional input             2010.08.22 adapted to modified modules tabread and tract             2010.08.30 bug in header table initialization fixed             2010.10.15 adapted to modified interface of module report             2010.11.24 adapted to modified error reporting (tract)             2010.12.07 added some explicit type casts (for C++)             2010.12.11 adapted to a generic error reporting function             2010.12.20 adapted to function tbg_ifrqs() (filter problem)             2011.03.20 optional integer transaction weights added             2011.07.08 adapted to modified function tbg_recode()             2011.08.17 adapted algorithm variants to finding generators             2011.08.28 output of item set counters per size added             2011.08.29 bug in rec_single() fixed (perfect extensions)             2011.09.16 choice of item loop direction generalized             2011.09.21 added use of 16-items machine for simple trees             2011.09.27 bug in algorithm and mode checking fixed (hut)             2012.04.09 bug in function rec_single() fixed (isr_xable())             2012.05.25 masking of packed items added to proj_simple()             2012.05.30 simple tree functions split w.r.t. use of fim16             2012.06.19 use of 16-items machine for complex trees added             2012.06.20 function fpg_adjust() added (consistency check)             2013.03.07 direction parameter added to sorting functions             2013.04.02 adapted to type changes in module tract             2013.10.15 checks of return code of isr_report() added             2013.10.18 optional pattern spectrum collection added             2013.10.31 bug in function fpg_adjust fixed (check of mrep)             2013.11.12 item selection file changed to option -R#             2014.05.12 option -F# added (support border for filtering) ------------------------------------------------------------------------   Reference for the FP-growth algorithm:     J. Han, H. Pei, and Y. Yin.     Mining Frequent Patterns without Candidate Generation.     Proc. 19th ACM SIGMOD Int. Conf. on Management of Data     (SIGMOD'00, Dallas, TX), 1-12.     ACM Press, New York, NY, USA 2000   Top-down variant on single tree (option -ad):     Top-Down FP-Growth for Association Rule Mining     K. Wang, L. Tang, J. Han, and J. Liu.     Proc. 6th Pacific-Asia Conf. on Advances in Knowledge Discovery     and Data Mining (PAKDD 2002, Taipei, Taiwan), 334-340.     Springer-Verlag, London, United Kingdom 2002 ----------------------------------------------------------------------*/ #include <stdio.h> #include <stdlib.h> #include <stdarg.h> #include <string.h> #include <limits.h> #include <float.h> #include <math.h> #include <time.h> #include <assert.h> #include "memsys.h" #ifndef ISR_PATSPEC #define ISR_PATSPEC #endif #ifdef FPG_MAIN #ifndef PSP_REPORT #define PSP_REPORT #endif #ifndef TA_READ #define TA_READ #endif #endif #include "fpgrowth.h" #include "fim16.h" #ifdef FPG_MAIN #include "error.h" #endif #ifdef STORAGE #include "storage.h" #endif  /*----------------------------------------------------------------------   Preprocessor Definitions ----------------------------------------------------------------------*/ #define PRGNAME     "fpgrowth" #define DESCRIPTION "find frequent item sets " \                     "with the fpgrowth algorithm" #define VERSION     "version 5.8 (2014.05.13)         " \                     "(c) 2004-2014   Christian Borgelt"

user: user-2
content: 计算机组成原理→DOS命令（文件、目录、子目录、.、..、/、\、……）→汇编语言→C语言（不包括C++）、代码书写规范→数据结构、编译原理、操作系统→计算机网络、数据库原理、正则表达式→其它语言（包括C++）、架构……

user: user-0
content: 引用 8 楼 philip_puma 的回复:linux 轻松无压力。  是用的IDE 还是直接make命令？

user: user-0
content: 引用 8 楼 philip_puma 的回复:linux 轻松无压力。  是吗 linux下运行出来了？用的什么编译器？

user: user-3
content: 很明显，修改Makefile

user: user-4
content: ..................... 这

user: user-5
content: linux 轻松无压力。

user: user-0
content: 引用 1 楼 jerry_dqh 的回复:有什么错误贴出来， 网上下的可能有时候要修改一下makefile。 放在eclipse新建一个c++项目里make target, build   报错又不一样了 ..\src\tract.h:56:18: fatal error: random: No such file or directory  #include <random>                   ^

user: user-0
content: Microsoft Windows [版本 6.1.7601] 版权所有 (c) 2009 Microsoft Corporation。保留所有权利。  C:\Users\lenovo>make make: *** No targets specified and no makefile found.  Stop.  C:\Users\lenovo>cd /d D:\learn\fpgrowth\fpgrowth\src  D:\learn\fpgrowth\fpgrowth\src>make cd ../../util/src;  make memsys.o  ADDFLAGS="" 系统找不到指定的路径。 makefile:73: recipe for target '../../util/src/memsys.o' failed make: *** [../../util/src/memsys.o] Error 1  D:\learn\fpgrowth\fpgrowth\src>cd /d D:\learn\fpgrowth\tract\src  D:\learn\fpgrowth\tract\src>make cd ../../util/src;  make arrays.o   ADDFLAGS="" 系统找不到指定的路径。 makefile:200: recipe for target '../../util/src/arrays.o' failed make: *** [../../util/src/arrays.o] Error 1  D:\learn\fpgrowth\tract\src>cd /d D:\learn\fpgrowth\util\src  D:\learn\fpgrowth\util\src>make gcc -std=c99 -Wall -Wextra -Wno-unused-parameter -Wconversion -pedantic  -DNDEBU G -O3 -funroll-loops -DARRAYS_MAIN -c arrays.c -o sortargs.o gcc   sortargs.o -o sortargs make: *** No rule to make target 'lists.c', needed by 'listtest.o'.  Stop.  D:\learn\fpgrowth\util\src>      百度一个离线的mingw ,只设了环境变量 path=D:\mingw\bin  然后有3个makefile

user: user-6
content: 有什么错误贴出来， 网上下的可能有时候要修改一下makefile。