zoukankan      html  css  js  c++  java
  • Notepad++在vs2008下编译运行

    参考http://www.cnblogs.com/yedezhanghao/archive/2012/08/17/2644106.html

    最近想找一个开源软件代码来看看,突然发现notepad++是用c++写的,因此下载下来看看源码。

    具体步骤如下:


    1. http://notepad-plus-plus.org/ 下载最新版本的源代码 npp.6.3.2.src.7z

    解压后有两个目录
          npp.6.3.2.src\scintilla
          npp.6.3.2.src\ PowerEditor
    其中Notepad++就是基于Scintilla开发的。所以先编译Scintilla 。


    2.打开Visual Studio Command Prompt (2008),并cd到...\scintilla\win32目录下;
    执行如下命令:
           nmake -f scintilla.mak NOBOOST=1

    注意:从开始菜单程序---Visual Studio 2008---Visual Studio Tools---Visual Studio 2008 命令提示符

    Setting environment for using Microsoft Visual Studio 2008 x86 tools.

    D:\Program Files\Microsoft Visual Studio 9.0\VC>E:

    E:\>cd npp.6.3.2.src\scintilla\win32

    E:\npp.6.3.2.src\scintilla\win32>nmake -f scintilla.mak NOBOOST=1


    于是,相关文件就编出来了。生成的文件在\bin目录下。得到Scintilla.dll。


    3.然后打开PowerEditor\visual.net目录下的工程文件,打开将其转换为2008的工程文件,

    再将Scintilla.dll复制到该Debug文件内或\bin内

    设置为unicode debug模式clip_image001

    然后编译链接。


    问题:很多头文件找不到,比如 FindCharsInRange.h。

    解决方法:include的时候要加上头文件所在文件夹,比如 #include "FindCharsInRange\FindCharsInRange.h"。PS:很多文件都是在 src\WinControls 的子目录里,自己找吧。

    或者,右键项目->属性->配置属性->C++ -> 常规 -> 包含目录 将npp.6.1.5.src\PowerEditor\src\WinControls\目录下的所有子目录包含进去。

    问题:localization.cpp 里说找不到 POS_RELOAD 这个标识符的定义。

    解决方案:这是二流程序猿犯的拼写错误吧,因为这个文件里定义了一个 POS_RELOAOD 常量,注意拼写:一个是 POS_RELOAD , 一个是 POS_RELOAOD 。解决方法,将错就错,把 POS_RELOAD 改为 POS_RELOAOD

    问题:提示xml文件有错
    这个是因为 xml文件名不对的问题。应该是 右键项目->属性->通用配置->生成事件->后期生成事件->命令行 中的xml名字不对。
    config.xml改为 config.model.xml
    langs.xml改为 langs.model.xml
    stylers.xml改为 style.model.xml

    问题:提示找不到Notepad++.exe文件
    解决方案:修改其输出文件名,在右键项目->属性->通用配置->链接器->常规,将输出文件后改为如图
    clip_image002

  • 相关阅读:
    AtCoder Beginner Contest 205
    Codeforces Round #725 (Div. 3)
    Educational Codeforces Round 110 (Rated for Div. 2)【A
    Codeforces Round #722 (Div. 2)
    AtCoder Beginner Contest 203(Sponsored by Panasonic)
    AISing Programming Contest 2021(AtCoder Beginner Contest 202)
    PTA 520 钻石争霸赛 2021
    Educational Codeforces Round 109 (Rated for Div. 2)【ABCD】
    AtCoder Beginner Contest 200 E
    Educational Codeforces Round 108 (Rated for Div. 2)【ABCD】
  • 原文地址:https://www.cnblogs.com/Robotke1/p/3044956.html
Copyright © 2011-2022 走看看