Archive: Compiling Source Code


Hi. I am a little new to c++ so I imagine it's probably just a stupid mistake/problem I'm causing. But I keep recieving the following error in the bug log:

Compiling...
exedata.cpp
C:\Program Files\NSIS\Source\exedata.cpp(3) : fatal error C1083: Cannot open include file: 'exehead/Release/bitmap1.h': No such file or directory
Error executing cl.exe.


Now I checked and can't find this bitmap1.h file. Does anyone have a solution? Thanks :)


I don't know what development environment you are using (Microsoft Visual C++ 6.0?) but I do know what is causing this - the EXEHEAD sub-project must be built before the main MAKENSIS project.

After EXEHEAD is built, there is a custom build step that runs the BIN2H.EXE program to transform various files into .H headers: EXEHEAD.EXE to EXEHEAD.H, BITMAP1.BMP to BITMAP1.H, and so on. If this custom step isn't working (if you aren't using MS Visual C++, for example), then you will have to run BIN2H by hand from a command-line. I don't know the syntax unfortunately but you can probably figure it out by playing around with it.


Hmm
Yeah I'm using visual c++, and I built the exehead project first. That compiled out fine. But still recieving the error. Thanks for the reply though.


New Error
Ok I figured that out. Thanks for the help there. Now I'm recieving this error.

Compiling resources...
Compiling...
Adler32.c
deflate.c
trees.c
build.cpp
exedata.cpp
makenssi.cpp
script.cpp
tokens.cpp
util.cpp
Linking...
script.obj : error LNK2001: unresolved external symbol _VerQueryValueA@16
script.obj : error LNK2001: unresolved external symbol _GetFileVersionInfoA@16
script.obj : error LNK2001: unresolved external symbol _GetFileVersionInfoSizeA@8
Debug/makenssi.exe : fatal error LNK1120: 3 unresolved externals
Error executing link.exe.

makenssi.exe - 4 error(s), 0 warning(s)


Strange, you aren't linking with the right libraries. You need to add "version.lib" to the library list on the Build Settings: Link Options page.

It should have already been in the DSP project file. But whatever.


I think the issues may be caused if one is using the debug configuration instead of the release configuration.

If you haven't yet compiled under the release configuration, you will get the following error when compiling under the debug configuration because the bitmap1.h file won't be present in the release folder yet:

C:\Program Files\NSIS\Source\exedata.cpp(3) : fatal error C1083: Cannot open include file: 'exehead/Release/bitmap1.h': No such file or directory

First compiling under the release configuration, and then switching back the the debug configuration will fix this error. As for the link errors, adding version.lib to the debug configuration will fix this. I think version.lib is not in the debug configuration of the project file we download.


Yeah I got it all fixed. Thanks for the help :) Though I havn't been seeing any changes when I compile and use the new one. Oh well.


Is there any possibility to obtain this "version.lib"? There are still linker conflicts.

I tried both release and debug configurations. But it does not create the makensis.exe file.


Kariem


What I did was I went to the projects menu, settings, and selected the link tab. Then at the end of the object/library modules I typed version.lib. Then ok and try compiling. See if that works for you :)


Thank you very much Ackbar. Your name fits to your behaviour: Ackbar means "the greatest" in arabic ;). Everything works fine now.

I had problems with the explanations before. I have never used Visual C++ and bought a student version in german yesterday with different menu descriptions.


Thanks again,
Kariem


Compiling with VC++ 5
I am using Visual C++ 5.0 and had no porblem to compile it. I tested the makenssi.exe file created with a script and I had no problem to compile a NSIS installer. Then, when I tested the NSIS generated installer, I got a CRC error. CRCCheck was set to On in my script.