So I have a background in Java and is starting to learn C++ using Visual Studio. From what I’ve seen, you can put C++ classes and function into .lib and .dll so the linker can use them for other programs. In Java, you can also archive stuffs into jars. So is this comparison correct?
Are .lib and .dll files in C++ comparable to .jar files in Java?
236 Views Asked by MINH TO At
1
There are 1 best solutions below
Related Questions in JAVA
- Add image to JCheckBoxMenuItem
- How to access invisible Unordered List element with Selenium WebDriver using Java
- Inheritance in Java, apparent type vs actual type
- Java catch the ball Game
- Access objects variable & method by name
- GridBagLayout is displaying JTextField and JTextArea as short, vertical lines
- Perform a task each interval
- Compound classes stored in an array are not accessible in selenium java
- How to avoid concurrent access to a resource?
- Why does processing goes slower on implementing try catch block in java?
- Redirect inside java interceptor
- Push toolbar content below statusbar
- Animation in Java on top of JPanel
- JPA - How to query with a LIKE operator in combination with an AttributeConverter
- Java Assign a Value to an array cell
Related Questions in C++
- C++ using std::vector across boundaries
- Linked list without struct
- Connecting Signal QML to C++ (Qt5)
- how to get the reference of struct soap inherited in C++ Proxy/Service class
- Why we can't assign value to pointer
- Conversion of objects in c++
- shared_ptr: "is not a type" error
- C++ template using pointer and non pointer arguments in a QVector
- C++ SFML 2.2 vectors
- Lifetime of temporary objects
- I want to be able to use 4 different variables in a select statement in c ++
- segmentation fault: 11, extracting data in vector
- How to catch delay-import dll errors (missing dll or symbol) in MinGW(-w64)?
- How can I print all the values in this linked list inside a hash table?
- Configured TTL for A record(s) backing CNAME records
Related Questions in LINKER
- How can I use LD to place ARM reset vectors in a program segment
- Need help linking listview to an ArrayAdapter error: Cannot resolve method'SetListAdapter(android.widget.ArrayAdapter<java.lang.String>)'
- Duplicate Symbols with a static library - understand the duplicate symbol error message
- Linker Script Symbols
- How to disable linker relaxation during linking phase of GCC LD?
- Adding Armadillo to Qt project
- Specify a minimum starting address for text segment
- in Makefiles, how to test for gcc's --with-ld option?
- What is the IAR equiavlent of the gcc linker NOLOAD directive?
- Embed Python2 and Python3 interpreters, choose which one to use at runtime
- Turning a statically linked library into a dynamic one
- 'The command line is too long' when linking .obj files in Windows command prompt
- Makefiile with many flags
- Linker errors for OpenBlas (+Armadillo)
- visual studio cannot resolve static functions
Related Questions in .LIB
- Can't call functions from Vfw.h inside Unreal Engine
- Link .lib library using codeblocks
- How do I set up an OpenGL/C++ project with GLM?
- How to access the methods in .lib file in Win 32 console application
- Dynamic link library does not generate a .lib file when compiled (Visual Studio C++ Express)
- Is there a good way to call methods in a c++ library from JavaScript?
- Generating a .lib file when using MinGW
- How to tell my CMake script to place .lib files in output/lib
- Import a C++ .lib and .h file into a C# project?
- trying to build a PortMidi example in Mingw
- Are .lib and .dll files in C++ comparable to .jar files in Java?
- Executing .lib in C compiler
- MSVC use additional include directories of referenced static library project
- Using static Python (pythoncore.lib)
- Compiling Python to a static lib
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
It's a good comparison although not perfect.
Jar files are just archives of .class files, and .class files contain all the information that the Java compiler needs so that you can use class A from class B. It's self-contained.
C++ libraries (.a, .dll, .dylib, etc) are not fully self-contained. They are archives of the .o files created after you compile some .cpp files. However, they are not fully self-contained. The lib is not everything you need. You also need the related include files (typically .h or .hpp, depending on your naming convention).
So yes, they are very similar, although there are important differences.