just a brief intro - I'm a newbie Windows programmer, although for whatever it's worth ( possibly not alot ! ) I have 20 years experience crossdeveloping C/C++ for embedded systems. I thought I'd take a look at Notepad++, since I enjoy using it and have some ideas I'd like to try out.
I'm trying to use Visual C++ 2005 Express SP1 ( which also refers to itself as Visual Studio 8 ), together with the Platform SDK ( 2003 R2 ), to build Notepad++. I can compile PowerEditor and Scintilla, but linking is failing.
Rather than dump all 800+ unresolved externals here, I'll just reproduce a couple of examples, the first from Scintilla and the second from PowerEditor :
1>PlatWin.obj : error LNK2019: unresolved external symbol __imp__CreatePalette@4 referenced in function "public: void __thiscall Palette::Allocate(class Window &)" (?Allocate@Palette@@QAEXAAVWindow@@@Z)
2>AboutDlg.obj : error LNK2019: unresolved external symbol __imp__DrawIcon@16 referenced in function "protected: virtual int __stdcall AboutDlg::run_dlgProc(unsigned int,unsigned int,long)" (?run_dlgProc@AboutDlg@@MAGHIIJ@Z)
Clearly, I'm missing something fundamental here. Would any kind person like to give me a hint ?:). I did notice that the Scintilla build didn't appear to have built the GTK files, but certainly most of the unresolved stuff does not correspond to GTK symbols, it looks more like primitive Windows stuff.
Mark de Roussier
Hokay, I seem to have got this fixed now. I thought I'd just let folk know where I was going wrong, just in case it helps anyone.
Firstly, I had assumed that I should/could use the contents of the Scintilla 'vcbuild' directory. If I had read the Scintilla readme carefully, I would have read the line that says :
'The Visual C++ 6.0 project (.dsp) files are no longer supported but are left
in the download for people that are prepared to update them.'
I had imported the old .dsp files into VC 2005 Express. Ahem. By looking at the contents of scintilla.mak from the win32 directory, I was able to see what libraries I needed, and add them to my Scintilla project in VC 2005 Express. That fixed Scintilla.
I added the same libraries to the PowerEditor/Notepad++ project. That fixed alot of the unresolved items, but not all. By Googling around on the remaining unresolved, I found that I also need to add Advapi32.lib and comdlg32.lib to PowerEditor.
So now I can build Notepad++ :). I'm not 100% sure that my configuration is ideal, but it works. There are some minor details outstanding. The post-build events for PowerEditor contain references to a Font directory that does not exist. However, this does not seem to prevent Notepad++ from working. What *does* prevent Notepad++ from working 'first time' is the need to copy the Scintilla .dll and some .xml files into the directory where the executable is located ( visual.net/Debug or visual.net/Release ), but that's understandable, and easy to resolve.
Well, afaik it doesn't use any specific libraries (except scintialla.dll %) so i think it's just a problem of exporting form VC6 to VC2005 Express...
You should simply open project properties, level "General" and change property "Inherited Project Propery Sheet" from file UpgradeFromVC60.vsprops to CoreWin.vsprops in the same directory. This will include all libraries which was included in VC6 by default (this is valid not only for NP++ :). Dunno why UpgradeFromVC60.vsprops doesn't contain them...
Great ! That does sort things out without needing a specific list of libraries, for both Scintilla and PowerEditor. Thanks,
Mark de Roussier
BTW, question to Donho: if i change some things in NP++ (fix some bugs or added features) - can i (and how) give it to you somehow to take a look and maybe include those things into next official releases, if you like it?
You can submit your patch to :
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.