Old 1st March 2016, 10:39   #1
Junior Member
Join Date: Mar 2016
Posts: 2
Problems compiling custom version of NSIS


Following is the machine environment:
1. Windows 7 64 Bit enterprise.
2. Python 2.6,
3. Scons 2.4.1,
4. On Scons prompt, ZLIB_W32 path set to C:\Dev\Zlib1.2.7
5. VS2013 professional.

Command used: scons SKIPUTILS="MakeLangId","NSIS Menu"

I am able to build the NSIS code which I download from svn link of the official NSIS site.
The problem starts when I want to add some cpp source / header files to the NSIS code to customize behavior.

I have added my cpp files in the sconstruct scripts at Contrib\system, Contrib\nsexec and Source\exehead.

The build output is attached. Also the sonctruct scripts which I have modified.

Thanks in advance.
Attached Files
File Type: txt NSISBuild.txt (4.8 KB, 116 views)
File Type: zip ScontrictFiles.zip (2.0 KB, 85 views)

Last edited by Anders; 1st March 2016 at 21:23. Reason: Changed title
kapil is offline   Reply With Quote
Old 1st March 2016, 20:17   #2
Major Dude
JasonFriday13's Avatar
Join Date: May 2005
Location: New Zealand
Posts: 893
The build environments for the plugins and the exehead are C based, this is for compatibility with older systems by not using the CRT. You are trying to compile C++ code in a C environment, that's why you get all these errors about missing external symbols. If you can, try porting the code to C and then it will work.

Alternatively you can add the CRT to the list of libraries, but be aware that as soon as you do this, the installer will now require the MSVCRT redistributable package installed on the clients machine before the installer will even run, and installers that don't run are a major headache for the end user.

"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me)
Wiki Profile
JasonFriday13 is offline   Reply With Quote
Old 1st March 2016, 21:18   #3
Anders's Avatar
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,332
MSVCRT does not exist in minimal installs of Windows 95. The math plugin at least links with some of the CRT .libs, you can look at its files for some hints on how to enable the CRT. Or just create a new project in Visual Studio and compile the plugins that way.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 4th March 2016, 08:30   #4
Junior Member
Join Date: Mar 2016
Posts: 2
Thanks a lot, everybody. We have chosen to go the C way and I am able to build it with my changes.

kapil is offline   Reply With Quote
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