-
Notifications
You must be signed in to change notification settings - Fork 69
cpp build error notes
Page listing problems and solutions found for C++ related build errors you might encounter with source builds of new Mason packages.
Say the patch needs to be against Makefile.win...
- cp Makefile.win Makefile.win_
- Manually edit
Makefile.win - diff -u Makefile.win_ Makefile.win > ../../../patchs/some.diff
- then commit that some.diff to git
- then apply it on the fly in the build script with
patch
When I need to create patches that span multiple files I just do git init . && git add . then edit things and do git diff to get the patch out. I later apply it still with the patch command.
When building e.g. mapnik-dependencies, mapnik and node-mapnik all at once, thousands of messages are displayed and it is easy to miss an important one.
With mtee it is possible to view the output on the console and have it redirected to a log file at the same time. The log file can then be searched easily for warnings or errors.
Usage: build.bat | mtee mylogfile.txt
- win-ldd Google Code
-
dumpbin /DEPENDENTS, MSDN: "Dumps the names of the DLLs from which the image imports functions. Does not dump the names of the imported functions. Only the/HEADERSDUMPBIN option is available for use on files produced with the /GL compiler option." - for running processes:
tasklist /mMSDN: Tasklist. Filter tocmd.exe:tasklist /m /fi "imagename eq cmd.exe"
One way is to use dumpbin's /DIRECTIVES option to find which runtime libraries the objects in the .lib want to link with:
dumpbin /directives foo.lib
Look for instances of the runtime libraries specified here (MSDN: CRT Library Features).
For example, you might see:
-
/DEFAULTLIB:MSVCRT: /MD) -
/DEFAULTLIB:MSVCRTD: /MDd -
/DEFAULTLIB:MSVCRT: /MD -
/DEFAULTLIB:LIBCMT: /MT
There will probably be many /DEFAULTLIB directives, so you can search using terms like:
Usage: dumpbin /DIRECTIVES foo.lib | find /i "msvcr"
Install Manta Property Extension.
Afterwards you will see things like 32-bit Library file, 64-bit DLL, 32-bit GUI Application and the like in the details pane.
SOLUTION: Manually create the directory shown in the error message.