Old 23rd May 2007, 19:44   #1
goldy1064
Senior Member
 
Join Date: Jun 2005
Posts: 211
NSIS 2.27 - NSIS Menu fails to link

I have followed all setup instructions in the NSIS Docs Appendix. I have wxWidgets 2.8.3; WXWIN is correctly set; Python 2.5.1; Scons 0.96.93; using a Visual Studio .NET 2003 terminal.

The compilation is fine, but I cannot get it to link:
code:

cl /nologo /GS- /O1 /W3 /MD /EHsc /TP /D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_N
O_WARNINGS /IC:\wxWidgets-2.8.3\include /IC:\wxWidgets-2.8.3\lib\vc_libnsis\msw
/c "Contrib\NSIS Menu\nsismenu\nsismenu.cpp" "/Fobuild\release\NSIS Menu\nsismen
u\nsismenu.obj"
nsismenu.cpp
cl /nologo /GS- /O1 /W3 /MD /EHsc /TP /D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_N
O_WARNINGS /IC:\wxWidgets-2.8.3\include /IC:\wxWidgets-2.8.3\lib\vc_libnsis\msw
/c "Contrib\NSIS Menu\nsismenu\nslinks.cpp" "/Fobuild\release\NSIS Menu\nsismenu
\nslinks.obj"
nslinks.cpp
rc /D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_WARNINGS /IC:\wxWidgets-2.8.3\inc
lude /IC:\wxWidgets-2.8.3\lib\vc_libnsis\msw "/fobuild\release\NSIS Menu\nsismen
u-rc.res" "Contrib\NSIS Menu\nsismenu\nsismenu.rc"
link /nologo /opt:nowin98 /map "/OUT:build\release\NSIS Menu\NSIS.exe" /LIBPATH:
C:\wxWidgets-2.8.3\lib\vc_libnsis advapi32.lib comctl32.lib gdi32.lib shell32.li
b user32.lib wxbase28.lib wxmsw28_core.lib wxmsw28_html.lib "build\release\NSIS
Menu\nsismenu\nsismenu.obj" "build\release\NSIS Menu\nsismenu\nslinks.obj" "buil
d\release\NSIS Menu\nsismenu-rc.res"
wxbase28.lib(baselib_filename.obj) : error LNK2019: unresolved external symbol _
_imp__CoCreateInstance@20 referenced in function "public: bool __thiscall wxFile
Name::GetShortcutTarget(class wxString const &,class wxString &,class wxString *
)" (?GetShortcutTarget@wxFileName@@QAE_NABVwxString@@AAV2@PAV2@@Z)
wxmsw28_core.lib(corelib_app.obj) : error LNK2019: unresolved external symbol __
imp__OleUninitialize@0 referenced in function "void __cdecl wxOleUninitialize(vo
id)" (?wxOleUninitialize@@YAXXZ)
wxmsw28_core.lib(corelib_clipbrd.obj) : error LNK2001: unresolved external symbo
l __imp__OleUninitialize@0
wxmsw28_core.lib(corelib_app.obj) : error LNK2019: unresolved external symbol __
imp__OleInitialize@4 referenced in function "bool __cdecl wxOleInitialize(void)"
(?wxOleInitialize@@YA_NXZ)


There are a total of 72 linker errors link this.
goldy1064 is offline   Reply With Quote
Old 23rd May 2007, 20:07   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Add ole32 to libs in Contrib\NSIS Menu\SConscript and let me know if it works.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 23rd May 2007, 20:09   #3
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Actually, forget about that. You should rebuild wxWidgets with wxbuild.bat. Make sure you delete any intermediate files in the wxWidgets directory before you do that.

Nothing from OLE should be used, as wxUSE_OLE is defined as 0 in setup.h.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 23rd May 2007, 20:53   #4
goldy1064
Senior Member
 
Join Date: Jun 2005
Posts: 211
Sorry, I forgot to mention that I had already done that. I first tried with wxWidgets 2.8.3 and when that failed I tried with 2.8.0. When that also failed, I reverted back to 2.8.3.
goldy1064 is offline   Reply With Quote
Old 23rd May 2007, 20:59   #5
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Then try deleting everything, installing wxWidgets 2.8.4, running wxbuild.bat and compiling again. Somewhere along the way, a wrong setup.h has gotten into your previous build.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 23rd May 2007, 21:09   #6
goldy1064
Senior Member
 
Join Date: Jun 2005
Posts: 211
No change. Any ideas?
goldy1064 is offline   Reply With Quote
Old 23rd May 2007, 21:12   #7
goldy1064
Senior Member
 
Join Date: Jun 2005
Posts: 211
Actually, let me remove the NSIS directory and re-extract and give it one more try.
goldy1064 is offline   Reply With Quote
Old 23rd May 2007, 21:20   #8
goldy1064
Senior Member
 
Join Date: Jun 2005
Posts: 211
Nope, it's still not working.
goldy1064 is offline   Reply With Quote
Old 23rd May 2007, 22:47   #9
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
It worked just fine for me yesterday with wxWidgets 2.8.4. OLE is definitly should not be used due to wxUSE_OLE and that specific code part that the compiler complains about is surrounded with #ifdef wxUSE_OLE. I don't know what's wrong with your build. There must be a stray setup.h laying around somewhere.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 23rd May 2007, 22:49   #10
goldy1064
Senior Member
 
Join Date: Jun 2005
Posts: 211
I'm currently re-installing my development applications and will try again...
goldy1064 is offline   Reply With Quote
Old 23rd May 2007, 22:51   #11
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Manually building wxWidgets while making sure it's using the correct setup.h will do. There's no need to reinstall everything.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 23rd May 2007, 22:54   #12
goldy1064
Senior Member
 
Join Date: Jun 2005
Posts: 211
So, which setup.h is the correct one? And where should it go?
goldy1064 is offline   Reply With Quote
Old 23rd May 2007, 23:19   #13
goldy1064
Senior Member
 
Join Date: Jun 2005
Posts: 211
I have been able to get it to build finally. When I ran the wxbuild.bat from Contrib\NSIS Menu\wx instead of from the root of the extracted NSIS directory, all worked fine.

Thanks for all the help kichik!
goldy1064 is offline   Reply With Quote
Old 24th May 2007, 00:32   #14
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Thanks, I've updated wxbuild.bat to check for that too.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump