lib

When to use dynamic vs. static libraries

When creating a class library in C++, you can choose between dynamic (.dll) and static (.lib) libraries. What is the difference between them and when is it appropriate to use which? ...

Is it possible to use a C++ .lib file from within a C# program?

Is it possible to use a C++ .lib file from within a C# program? ...

circular dependencies between dlls with visual studio

I have a circular dependency between two functions. I would like each of these functions to reside in its own dll. Is it possible to build this with visual studio? foo(int i) { if (i > 0) bar(i -i); } -> should compile into foo.dll bar(int i) { if (i > 0) foo(i - i); } -> should compile into bar.dll I have created tw...

Tools for inspecting .lib files?

I'm evaluating some underdocumented software. When I build a sample project, I'm getting a linker error that looks like: error LNK2019: unresolved external symbol There aren't a whole lot of lib files with this app, so I can solve this problem with trial and error, but I know there's a more elegant way is to solve this problem. In the ...

Why isn't this library linking with a pragma comment?

I'm using Fmod in a project I'm working on in Visual C++ 2008. If I include ../fmodapi375win/api/lib/fmodvc.lib in Project->Linker->Input, it works fine, but for some reason if I use #pragma comment(lib,"../fmodapi375win/api/lib/fmodvc.lib") instead it works the same as if that line wasn't there: it builds with no linker errors th...

How do I build an import library (.lib) AND a DLL in Visual C++?

I want to have a single Visual Studio project that builds a DLL file and an import library (.lib) file. (An import library is a statically-linked library that takes care of loading that DLL file in other projects that use it). So I went to Visual Studio C++ 2008 Express Edition, created a New Project of type Class Library, and set the ...

Solved! Problem calling a function when it is in a .lib (C++)

I have a class with a static method that looks roughly like: class X { static float getFloat(MyBase& obj) { return obj.value(); // MyBase::value() is virtual } }; I'm calling it with an instance of MyDerived which subclasses MyBase: MyDerived d; float f = X::getFloat(d); If I link the obj file containing X into my ...

Eclipse CDT and lib

Hello, Below I m mentioning what is my requirement. In my project Understand’s API were used. Using that APIs I was able to open database, close it, list the names of a project , list the names of functions in a file n so on. Understand provided a udb.lib for that which I will be including. But in Eclipse CDT, there are plug-ins no ...

SVN Repository Structure and Shared Assemblies

We are trying to restructure our SVN repository and include a lib folder under the trunk to house assemblies that the project depends on. I am curious to know how you guys are dealing with shared assemblies? Do you have multiple copies of them that span across different trunk lib folders? Do you have some kind of build process that will...

Load up the lib files when running Test::Unit tests in Rails?

I've added a few modules and dropped them in my /lib directory and I think the lib directory is loaded magically by Rails (unless I loaded the lib directory somewhere early in my project and forgot about it). However, when I run unit tests that require my additional modules, they are not loaded. Should the lib directory be loaded autom...

Rails /lib modules and

I am writing a custom wrapper for open_flash_chart plugin. It's placed in /lib and load it as a module in ApplicationController. However, I have some Class hierarchy or smth problem. From any controller I can access open_flash_chart functions as OpenFlashChart, Line etc However, in a class in a /lib module, it doesnt work! Any ideas?...

How to update a C++ dll without needing to relink the exe with the lib file?

First off , I'm referring to a Windows environment and VC++ compiler. What I want to be able to do is rebuild a Vc++ dll and maintain compatability with an exe that has already been linked to the lib without having to rebuild the exe or load the dll dynamically using LoadLibrary. In other words, is there a way to add classes and methods...

Why do we still need a .lib stub file when we've got the actual .dll implementation ?

hi folks, i'm wondering why linkers can not do their job simply by consulting the information in the actual .dll files that got the actual implementation code ? i mean why linkers still need .lib files to do implicit linking ? are not the export and relative address tables enough for such linking ? is there anyway by which one can do i...

C Runtime Library Version Compatibility: updates require rebuilds?

How do you construct a library (static lib or a dll/so) so that it isn't sensitive to future updates to the system's C runtime librarires? At the end of July, Microsoft updated a bunch of libraries, including the C runtime libraries. Our app is written with a mix of MFC/C++/VB and some third party libraries, including some that are clos...

Custom library files and web application on shared hosting?

Let me put my issue defining a real scenario: I am using dedicated server where PHP and MySQL are available. My PHP include_path=/var/local/php I am developing a custom cms application, where I am writing my own library which is responsible for communicating with the database and retrieving data based on some key. My application is g...

Java: High-quality soundpackage

Hello, Does anyone know a good lib for playing wav, mp3 (and ogg) where I can: Play Pause Play faster (Slow down) Play backward (mp3!! or ogg!!) Edit volume I want to adjust these things while playing. Thanks ...

From [dll / lib / def / exp] to c/c++ header file

Hi, I have a dynamic library compiled with visual studio. (so 4 files: Library.dll, Library.lib, Library.def and Library.exp) This dll contains exported classes and functions. Is there a way to obtain C/C++ header files (.h) with these files? ...

How to link an arm .o file into an Xcode project

I have a gnu built object file I need to include in an Xcode iPhone project. The .o file format is arm, via 'otool -h': Mach header magic cputype cpusubtype caps filetype ncmds sizeofcmds flags 0xfeedface 12 0 0x00 1 3 1316 0x00002000 But Xcode rejects it, complaining that "file is not ...

C++ linker issues

Hello there, I have this: a.cpp int localfunction () { return 1; } int local_symbol = localfunction(); b.cpp void thirdfunction () {}; main.cpp void main () { thirdfunction (); } When I compile this in a main executable everything works (even with optimizations), and the localfunction is executed at startup even if I don't ...

C++ linker options for DLL (DEF, LIB, etc)

I have downloaded a library for the purposes of writing a program that can uncompress a RAR file. (http://www.rarlab.com/rar/UnRARDLL.exe) This supplies me with unrar.dll, unrar.h, unrar.lib and UnRDLL.def. I have copied the C example code and have tried compiling it with both Dev-Cpp and Eclipse. I don't have much experience using DLL...