How to include/link C .lib files in a Delphi project - c

We have a .lib file with functionality that must be included in a Delphi application.
It is easy to include .obj files, but for some unknown reason, this won't work for .lib files. The help is not very helpful on this. And a google search did not help that much (most helpful was to use an other linker but I would like to avoid it if possible).
One solution could be using C++ builder to create a package, but I'm not very fond of it.
So the question is, does anybody know a way to include a C .lib file into a Delphi project (so the functionality can be used)? Or is there a way to split the .lib file into .obj files.
(By the way we use 2006.

You can use the tlib.exe tool that comes with C++Builder. If you don't have C++Builder you can download the free C++Compiler 5.5 (http://cc.codegear.com/Free.aspx?id=24778) and use the tlib.exe from it.

Related

Using static libraries on a C project in XCode 4.5.2

I'm new to Xcode so not really keen on it yet. In my college is used visual studio to program in C in which they create a solution and fill it with an application and then include static libraries with .h and .c files. Been trying to do this in Xcode but can't seem to include them or add dependencies like in Visual Studio
One approach is just using the standard gcc command line options for static library linking which you can specify using the XCode project settings. This will work if the static library is installed and accessible in the standard locations.
Alternatively you can add a static library explicitly to your project and set the dependencies and search paths for headers etc appropriately. This may sound a bit involved, but there's not really that much to do, and you only need to set it up once. It's all done in the same place as other project settings, and you can use the search box to find exactly where to enter the options.
I'm assuming you don't want to actually build the static library with your project. if you do there's more to do - basically you need to set up the static library project, set it as a target dependency, and setup a build step to copy the resulting library.

libxml/xmlversion.h file not found in windows

I want to do XMLParsing in c(windows). for that i need the libxml/xmlversion.h file. so can any one please tell me how to find or include the file in visual studio 2008.
thanks in advance.....
You can download the complete libxml library (including the include files) from the downloads section at the libxml website. A Windows binary version of the libraries (so you won't have to compile the library itself) is available from the maintainer of the windows port.

which file generated after compilation in C#?

i want to know that after compiling the file in C# which type of file is generated?
It would have to depend on the type of project. If it is a console application it will be an exe file. If there are multiple projects and one console app then the other projects will be compiled as DLL files. Obviously this doesn't include web projects.
Probably a .dll or a .exe is the answer you are looking for

Programmatically creating VS solution/project files

I have a C project with a very nice rake build system in place. Unit test runners, mocks, as well as some boilerplate code, are generated.
The requirement is for the pc based stuff to be available in VS. I know the VS .sln and .proj formats are undocumented.
I also know that cmake can generate VS solution files as long as it's own files are up-to-date so my fallback solution is to create the cmake file structure/lists and use it to create the VS solutions.
Since my fallback reeks of duplication, I am looking for pointers to any other tools, templates or documentation that would allow me to create VS project and solution files.
Thanks for all the help
Actually, .vcproj file format is documented and you can find it on the MSDN website:
http://msdn.microsoft.com/en-us/library/2208a1f2(v=VS.100).aspx
And here is the Solution file documentation:
http://msdn.microsoft.com/en-us/library/bb165951(VS.80).aspx
I'm sure you can find more useful information on MSDN.

Adding GraphicsMagick to an Xcode project

I have created a Foundation Tool in Xcode, and want to use some functions from the GraphicsMagick image manipulation library. The library has been compiled and installed on my computer using MacPorts. I added libGraphicsMagick.3.dylib and libGraphicsMagickWand.2.dylib to my project as external frameworks.
What other steps must I take to use these libraries in my application, and how would I import their headers to use their functions in my code?
Thanks
UPDATE: Made some progress. Used the .a static libraries instead of the dylibs, added them to my project, then added the header files for magick and wand. I'm trying to compile, but I get this error:
alt text http://cl.ly/f4233cddbae23e1a19fc/content
Searched around a bit, and apparently this problem occurs because 2 of the typedef enum declarations that GraphicsMagick and ImageMagick use are already defined in OS X framework headers. The enums in question are ColorInfo and ExceptionInfo.
The only way to fix it is to go through the source and rename every occurance of those enums to a new name that isn't already taken. However, the iPhone does not have this issue and GraphicsMagick will compile just fine. Unfortunately, I don't think the people behind the library are willing to rename their enums just to get it to compile on OS X.

Resources