How to compile and run LISP project? - debugging

I am new to LISP, currently using LispWorks and ListBox IDE on window server 2008.
I want to know that, how can we compile and run LISP project, contain 350 LISP source file.
and what will be generate after compilation and how can i run it...?
and what's techniques are available to debug lisp project.
(it is old technology, so I cannot get much help from internet)

LispWorks comes with a lot of documentation. This documentation is also available on their website.
LispWorks can:
organize source code with a system management tool
save images with saved state
compile individual files to loadable machine code
create shared libraries
create stand-alone applications
Their Delivery User Guide describes how to generate applications.
The documentation of DEFSYSTEM describes how to organize source code and how to compile systems.

Related

GSL-Shell: Can I add precompiled libraries designed to extend Lua?

Can GSL-Shell use third party libraries designed to extend Lua/LuaJIT on windows? e.g.
http://luaforge.net/projects/vclua/
http://luaforge.net/projects/iup/
http://www.keplerproject.org/luasql/
Like many "(windows) users" I do not want to invest time in learning to compile source code.
This makes Lua very attractive - a very stable core with "add-ons" in the form of pre-compiled DLLs. I had hoped that simply finding compiled DLLs and placing them in the cpath would allow me to "add batteries" and expand Lua to suit my needs.
However, it appears that these libraries may contain links to other supporting DLLs (unfortunately including lua51.dll and lua.5.1.dll - DLL HELL http://lua-users.org/lists/lua-l/2010-11/msg01025.html).
GSL_Shell adds significant functionality to Lua; with routines for scientific computation and reading CSV files. http://www.nongnu.org/gsl-shell/
I could not find documentation for GSL-Shell explaining which Lua libraries had been compiled in to the executable. Nor could I figure out if it possible to use the libgsl-0.dll as an add-on for a standard Lua installation.
The added functionality of GSL-Shell is very attractive and I would like to learn how to use this software, before investing the time I would like to know if the environment is extendable?
Many Thanks
Kind Regards

Visual Studio C++ Solution in Maven2

A new project is coming up that will require interaction between Java and C++. It's been decided that the project will be built via Maven2.
Unfortunately I don't know anything about Maven and the Java guys don't know anything about C++.
They have their build chain all set up with various reports being emitted for each part related to CheckStyle, Findbugs, Corbortura(?) etc. and they want the same to be done with the C++ side.
Currently we have 4 apps that need building: 2 services, a tray app and a simple dialog based application. I've been told I need to have a pom for each and configure each to output to a target directory, have the tool chain produce the reports - the most particular being the code coverage which the client wants 100%.
I have sourced the tools - Bullseye and QA-C++ and requested eval copies - but I am dismayed to find there is very little information on C++ & Maven, and what little there is seems to be horror stories.
Does anyone on SO have a good story about it (or have link to blog post)?
Is there a simple explanation anywhere for configuring a Visual Studio solution (preferably C++) to be Mavenized?
I am expecting pain but I am getting increasingly wary of this venture - but unfortunately the project manager is Java side and seems hell-bent on Mavenizing it.
See the following stack over flow on the topic.
Using Maven for C/C++ projects
Hope it helps

How to use Windows Forms in a C/C++ application?

I have an existing project created using C/C++ under a development environment.
Currently we want to facelift the existing form using a Window Forms application but the problem is the existing project is using Common Runtime Library = No /CLR and Runtime Library = /MTd.
But the a Windows Forms application is using Common Runtime Library = /CLR and Runtime Library = /MDd.
Please advise if it possible to use a Windows Forms application to create a form in the existing project?
Is there any tutorial regarding this?
The comment from MSDN was:-
Caution Do not mix static and
dynamic versions of the run-time
libraries. Having more than one copy
of the run-time libraries in a process
can cause problems, because static
data in one copy is not shared with
the other copy. The linker prevents
you from linking with both static and
dynamic versions within one .exe file,
but you can still end up with two (or
more) copies of the run-time
libraries. For example, a dynamic-link
library linked with the static
(non-DLL) versions of the run-time
libraries can cause problems when used
with an .exe file that was linked with
the dynamic (DLL) version of the
run-time libraries. (You should also
avoid mixing the debug and non-debug
versions of the libraries in one
process.)
http://msdn.microsoft.com/en-us/library/2kzt1wy3(VS.71).aspx..
The simple answer is no. A more accurate answer is kind of, but you probably wouldn't want to.
It is possible to use Windows Forms (i.e. managed code) for your user interface and something else (e.g. non .NET/unmanaged code) for your domain logic. However I'd guess that if you're asking this question then that is going to be a bit much for you to do at the moment.
I suggest that you create a user interface with Windows Forms and then have that user interface call a native C/C++ DLL. Google for PInvoke on how to call an unmanaged dll (C/C++) from managed (.NET) code.
If you did that then you would be much better positioned to answer this question.
My company software often has to have modules which mix managed and unmanaged code and user interfaces. What we do is to separate the modules into their own executables and expose the functionality as COM localserver objects. This way, the unmanaged code can have a user interface written in managed code.
However, you need to do alot of plumbing to get it to work. We do it this way because our applications have been deployed in the field for years and it will take years to give the entire program a makeover into .NET

Find Programming Language Used

Whats the easiest way to find out what programming language an application was written in?
I would like to know if its vb or c++ or delphi or .net etc from the program exe file.
Try PEiD
of course if they used a packer, some unpacking will need to be done first :)
Start it up and check what run-time DLLs it uses with Process Explorer.
If that doesn't make it immediately obvious, search the web for references to those DLLs.
Most disassemblers (including Olly I think) can easily show you the text contained in an EXE or DLL, and that can also sometimes give a clue. Delphi types are often prefixed with T as in TMyClass.
If it's a small executable with no DLL references and no text you might be SOL. At that point you'd need to look for idioms of particular compilers, and it would be mostly guesswork.
There is an art to detecting what language a program was written in. It is possible but there are no hard and fast rules. It takes a lot of experience (and it also leads to the question "Why would you want to..." but here are a few ideas on how to go about it.
What you're looking for is a "signature". The signature could be a certain string that is included by the compiler, a reference to an API that is quite common in the programming tool being used, or even a style of programing that is common to the tools being used, visible in the strings contained in the application.
In addition, there are styles to how an application is deployed: various configuration files found in the deployment directory, dlls and assemblies and even images, directories or icons.
Java applications wrapped in a self-launching executable will contain references to java libs, and will likely have certain libraries or files included in the same directory that indicate that it's java.
As indicated in other answers a managed assembly will show certain signs as well: you can open it in Reflector etc. While it is correct that c# and VB are "interchangable" once compiled, it is not true that they are identical. If you use Reflector to disassemble VB code you will quite often see that the assembly references the Microsoft.VisualBasic.dll assembly. You'll be able to tell the difference between Mono applications because they will most likely contain references to the mono assemblies.
Many compilers assemble and link code in certain ways, and leave footprints behind. For example, examining a window executable using "strings: tab in Process Explorer, you'll see a lot of strings. Using these you may be able to determine programming styles, methods called, error or trace methods withint the exe.
An example is that compilers use different mechanisms for localization: Microsoft stores localized strings in XML files or resource files. Other compilers will use a different tactic.
Another example is c++ name mangling. The CodeWarrior compiler uses a different algorithm to mangle the names of the member variables and functions of a call than Visual Studio.
I suppose you could write a book on the subject of accurately determining the lineage of any executable. This subject would probably be called "programming archeology".
You could try using Depends to see what runtime dependancies it has, which might give some clues.
The easiest way is to ask the developer of the program. It does not require any knowledge and utility programs.
Determine Delphi Application
Use eda_preview270.exe (from here) or some other spy tool and check the window class names. If they read like TButton or TfrmBlubb, it's a VCL app. If there is an "Afx" in them, it's probably MFC.
Compiled languages (by this I mean no scripting languages, or Java, .NET, etc.) are compiled into CPU assembly instructions, which is essentially a one-way conversion. It is not usually possible to determine which language a program was written in. However, using a dependency walker, you could potentially determine which runtime library the program was loading (if any) and therefore determine which language it used (e.g. MS Visual C++ 9 uses msvcr90.dll).
you can check is that a .net assembly or not by trying to open with ildasm.exe tool
PE Detective works best for me.
In general, you can't.
If you can load it into Reflector, you know it is a managed assembly.
That's a good question. There isn't any general way to tell, but I bet most compilers and libraries leave a mark in the resulting EXE file. If you wanted to spend a lot of time on it, you could gather a bunch of EXEs written in known languages and scan for common strings. I would image you'd find some.
Dependancy Walker, which someone else mentioned would be a good way to look for telltale dependencies, like versions of MSVCRT, etc
i'd try running the .exe thru a 'strings' program to get assorted hints.
If I remember correctly PE Explorer Disassembler gives some information about compiler that creates given not .net and java binary, for .net use Reflector or ILDAsm tool
The easiest way that I found (at least in computer games) was to look in the "redist" folder nested within the game's main folder. It might be obvious to some of you that are more experienced in programming yourself, but the specific purpose of the MSI in this folder is to allow the setup.exe file to automatically install the prerequisites for the game itself.
For example:
In Empire Total War, there is an MSI called "vcredist_x86-sp1.exe". This indicates that the game/program was written in Microsoft's "Visual C 2005" in the .NET Framework (usually).
In fact, if you open the MSI/EXE, the installer should immediately indicate the language it's written in and which version.
The reason I'm familiar is because I code in C# and VB in the .NET Framework and we auto-install the prerequisites for our business app.
Hope this helps!

Setting up a large Xcode project

I have a large exiting C++ project involving:
4 applications
50+ libraries
20+ third party libraries
It all builds fine on Windows using VS8, Linux using QMake (project uses Qt a lot). I also build it on OS X using QMake but I was wanting to setup an Xcode project to handle it in an IDE. I'm struggling to setup proper configuration to easily define dependencies, both to internal libraries and to the third party. I can do property sheets and .pri files in my (disturbed) sleep, but would appreciate some advice on building such large projects in Xcode.
I've been experiencing with Xcode configuration files and #including one from another but it does not seem to work as I would expect, especially when defining standard locations for header files etc.
Is there some good book describing the process of setting up Xcode (remember it's C++, I'm not wanting to learn ObjC at this time)?
Or maybe a good open source project I could learn from?
Thanks!
Step in to Xcode may be the book you're looking for. It's got a whole section devoted to using AppleScript to automate configuration includes. I've been going through the book myself on O'Reilly Safari as I've found myself in a situation similar to yourself!

Resources