SciTe and VS2012 Compiler - scite

Currently is seems like SciTe is trying to compile with g++ but I need it to compile with the vs compiler. how do I make it do this? its giving me this compiler error:
'g++' is not recognized as an internal or external command,
operable program or batch file.

You need to open cpp.properties file (Menu > Options > Open cpp.properties) then change command.compile.$(file.patterns.cplusplus) property to match your environment, which is set to gcc/g++ by default.

Related

Cannot install design-time package: missing #Classes#TStream#Write$qqrpxvi from vcl50.bpl

Short Version
My design-time package cannot install
because my run-time package library bpl
requires the export #Classes#TStream#Write$qqrpxvi from vcl50.bpl
that does not exist
Long Version
When trying to install a design-time package, Delphi 5 gets a loader error:
The procedure entry point #Classes#TStream#Write$qqrpxvi could not be located in the dynamic link library c:\program files (x86)\borland\delphi5\Projects\Bpl\AvatarDateTimePickerD5.bpl.
Once you clear the error dialog shown by the loader, Delphi shows it's own version of the same error:
So i check the file
I use Depends to check the exports in the dll:
c:\program files (x86)\borland\delphi5\Projects\Bpl\AvatarDateTimePickerD5.bpl
And sure enough, there is no export named:
#Classes#TStream#Write#qqrpxvi
In fact, there's no export that starts with #Classes at all:
Make sure it's loading the right one
So i use Process Monitor to make sure it's reading the correct file. And it is:
So check the runtime build
You'll remember there's usually two packages:
ContosoGrobberD5: run-time
ContosoGrobberD5D: design-time
In this case it's the design-time package that's loading it's dependancy on the run-time package:
AvatarDateTimePickerD5.bpl
So i'll load up that earlier-generated run-time package to watch it build, and it builds without incident:
and it writes to the expected location. And it does all it's file write operations:
It's successfully, correctly, and quite intentionally, not generating a DLL export named:
#Classes#TStream#Write#qqrpxvi
But the corresponding design-time package claims it needs such an import.
Depends says not quite
If i run Depends on the design-time bpl, i see the failed chain:
AvatarDateTimePickerD5D.bpl (design-time dll)
AvatarDateTimePickerD5.bpl (run-time dll)
vcl50.bpl
Missing Export: #Classes#TStream#Read$qqrpvi
Missing Export: #Classes#TStream#Write$qqrpxvi
So apparently it's vcl50.bpl that's missing the export
Check vcl50.bpl for export #Classes#TStream#Write
So i monitor the operation to Install the design-time package, and after some hunting around, it finds it in the path:
In the "System32" folder:
C:\Windows\SysWOW64\vcl50.bpl
So i check the exports of vcl50.bpl. And it's right, there is no export #Classes#TStream#Write$______:
And it looks like the file:
Created: 1/24/2000 4:01 am
SHA-1: 29398F5CD966335EB38377962B12780DDEA9DBDC
So what's going on?

How to Build .exe file from .app file dynamically?

I am working with application developed by Gupta, this Application is divided by 9 modules, For building .exe file from each .app file, I can do it easily via
Project > Build
I am repeating the above steps for each module.
Is there smart way for building all EXEs with one click as one bat file?
Appreciate any help.
You can build Gupta source code with command line:
If you want to compile to .exe then use
cbi63.exe -b "sourcefile" "destinationfile"
in your case this is something like
cbi63.exe -b "ktonline.app" "ktonline.exe"
If you want to compile to .apd use
cbi63.exe -m "sourcefile" "destinationfile"
This works with all Gupta versions. You just have to adjust cbiXXX.exe to your IDE version (e.g. cbi71.exe).

Running clang static checker at project level (iOS app) rather than file by file (xcodebuild)

After solving this Omitted code blocks from clang AST for ObjectiveC, I've tried it on a small Objective C .m file along with an appropriate compile_commands.json and it works properly and I get the entire syntax tree.
Now I'm trying to see if it's possible to run it on the entire xcodebuild
[
{
"directory" : "/Users/xx/Desktop/iOSApplication",
"command" : "xcodebuild clean build CODE_SIGN_IDENTITY=\"\" CODE_SIGNING_REQUIRED=NO -project /Users/xx/Desktop/iOSApplication/iOSApplication.xcodeproj/",
"file" : "iOSApplication.xcodeproj"
}
]
When I tried to then run clang-check -ast-dump /Users/xx/Desktop/iOSApplication/iOSApplication.xcodeproj it gives me the errors error: unknown argument: '-project' and error: unable to handle compilation, expected exactly one compiler job in ''
Is it actually possible to run the AST based checker on the entire xcodeproject? Or how should I go about compiling the files 1 at a time?
I've managed to generate the compile_commands.json by following this guide here http://docs.oclint.org/en/stable/guide/xcodebuild.html
However, I'd still like to be able to run my RecursiveASTVisitor on the entire projects. Or alternatively, pass in the xcode project and enumerate all the source files would probably work too.
Anyone has ideas how to go about passing entire xcodebuild project as parameter for RecursiveASTVisitor?
Right now I'm running my ASTVisitor like this ./MyASTChecker ~/Desktop/directory/sample1.m but I'd like to make it do something like ./MyASTChecker ~/Desktop/directory/sampleproject.xcodeproj
The way I do it is at compile time using scan-build. This works for me with cmake/make based projects.
scan-build --use-analyzer=clang -enable-checker <checker_name> make
This will read the makefile and build everything in there while running the specified checker on each file as it's compiled. If you only want to build with some flags or a specific target, you can do this:
scan-build --use-analyzer=clang -enable-checker <checker_name> make <build_options>
If you instead have a cmake based project. You might first want to generate a makefile in a build directory. I do this for that:
cmake <path_to_cmakelists> -DCMAKE_CXX_COMPILER=c++-analyzer -DCMAKE_CC_COMPILER=ccc-analyzer
This followed by scan-build from above will compile and run checker on the source files while each file is being compiled.
I have only tried this with CMAKE / MAKE but should work with xcode like this:
scan-build --use-analyzer=clang -enable-checker <checker_name> xcodebuild
and with build options
scan-build --use-analyzer=clang -enable-checker <checker_name> xcodebuild <build_options>
You can read more about scan-build here

Using scan-build command for clang code analysis

I have installed scan-build/clang version 2.9 on Ubuntu desktop. I build my C++ source code there using make . As it said scan-build would analyze a project which is built using make if you give
scan-build make
to
but after the make i see a message
scan-build: Removing '/tmp/scan-build-2013-10-16-1' because it contains no reports.
Also tried
scan-build --use-c++=/use/bin/clang++ make
Q1 - What am i doing wrong/missing here. How to use scan-build to analyze all source files.
Q2 - Is there any option to use clang++ --analyze myfile.cpp
to analyze single source file. But it gives an error about a header file included not found 'fatal' error' my.h
what is the option to clang analyze to point it to the folder having header files.
As for Q2, you should be able to use:
scan-build clang++ -c myfile.cpp
or what you suggested:
clang++ --analyze myfile.cpp
but you need to make sure that the compiler knows about all the includes and libraries (you should be able to successfully compile myfile.cpp to an object file without analysis). That includes especially the -I directories.
There is also the -o option to scan-build, which specifies the target directory for HTML report files. Subdirectories will be created as needed to represent separate "runs" of the analyzer. If this option is not specified, a directory is created in /tmp to store the reports, as you already know.
Another useful option would be -v (verbose), which should print any errors that the analyzer might run into.
Last but not least, you should use the analysis with debug builds where the optimization is disabled, but more importantly where the symbols are not stripped.
Not sure if it helps, let me know ...

OpenCV compliation on linux: how to feed to it specific zlib lib?

I want to compile OpenCV with same zlib as I use for compilation of Boost Iostreams (not system default one). I want to compile OpenCV as static lib, having zlib compiled as static lib. Currently I use something like :
../$CMAKE_PATH -DCMAKE_INSTALL_PREFIX=./$OPENCV_INSTALL_SUBDIR -DBUILD_WITH_STATIC_CRT=ON -DBUILD_SHARED_LIBS=OFF -DBUILD_PYTHON_SUPPORT=OFF -DOPENCV_EXTRA_C_FLAGS=-fPIC -DOPENCV_BUILD_3RDPARTY_LIBS=TRUE
make
make install
echo Done!
I wonder: having some $ZLIB_HEADERS and $ZLIB_LIB_FILES_FOLDER path strings how to feed them into cmake to get OpenCV compiled with built by me zlib?
Please try cmake-gui or ccmake. Make sure to toggle advanced mode On (press t in ccmake).
You will find ZLIB_LIBRARY and ZLIB_INCLUDE_DIR.

Resources