Hi all,
I'm struggling with plugin compilation. I tried with the template plugin, then with the src of other plugins, and still no luck.
I use Code::Blocks (with GCC), which can import .vcproj files.
When I open NP++ after having copied the .dll in the plugins dir,
the error is the ANSI vs UNICODE one. I heard (http://sourceforge.net/p/notepad-plus/discussion/331753/thread/2c102dff/) that the error msg is in fact not adapted.
Any idea?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'll agree I've ran into that error when in fact it has nothing to do with ANSI vs UNICODE. I haven't used Code::Blocks anytime recently so I can't help you much with that. You may try to Google for some 3rd party tool that lets you inspect the DLL to make sure the correct functions are getting exported so that N++ can find them. I wish I could help more. If you have any other questions feel free to ask.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I found a fix. Thanks for your idea of inspecting the .dll (I used dllexp.exe and saw that an #ifdef prevented isUnicode to be exported).
For some reason, VS compiles with UNICODE defined. I had to add ;UNICODE in the .vcproj, at lines 205 and 286 for the import in Code::Blocks to work. Now the lines look like:
PreprocessorDefinitions="WIN32;...;UNICODE"
The corresponding change in the Code::Blocks project file (.cbp) is the addition of
<Add option="-DUNICODE" />
in the relevant sections right under
<Add option="-DNPPPLUGINTEMPLATE_EXPORTS" />
Thanks dail8859 for your help.
Last edit: Grahack 2014-10-13
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi all,
I'm struggling with plugin compilation. I tried with the template plugin, then with the src of other plugins, and still no luck.
I use Code::Blocks (with GCC), which can import .vcproj files.
When I open NP++ after having copied the .dll in the plugins dir,
the error is the ANSI vs UNICODE one. I heard (http://sourceforge.net/p/notepad-plus/discussion/331753/thread/2c102dff/) that the error msg is in fact not adapted.
Any idea?
I'll agree I've ran into that error when in fact it has nothing to do with ANSI vs UNICODE. I haven't used Code::Blocks anytime recently so I can't help you much with that. You may try to Google for some 3rd party tool that lets you inspect the DLL to make sure the correct functions are getting exported so that N++ can find them. I wish I could help more. If you have any other questions feel free to ask.
Thanks for your answer, I'll try to debug the .dll.
BTW, could you please tell what do you compile with? Visual Studio?
Yes I've always uses Visual Studios. I've used MSVC 2008, 2010, and been using 2013 as of lately.
I found a fix. Thanks for your idea of inspecting the .dll (I used dllexp.exe and saw that an
#ifdef
preventedisUnicode
to be exported).For some reason, VS compiles with UNICODE defined. I had to add
;UNICODE
in the.vcproj
, at lines 205 and 286 for the import in Code::Blocks to work. Now the lines look like:The corresponding change in the Code::Blocks project file (
.cbp
) is the addition ofin the relevant sections right under
Thanks dail8859 for your help.
Last edit: Grahack 2014-10-13