Skip to main content

Posts

Showing posts from June, 2024

How to use gdb in Ubuntu Terminal

Here's a practical, minimal guide for using GDB in Ubuntu terminal — from launching to setting breakpoints and navigating your code. 🧰 Step 1: Compile with Debug Symbols Use -g and disable optimizations ( -O0 preferred for debugging): bash Copy Edit g++ -g -O0 -o myprog myprog.cpp 🚀 Step 2: Launch GDB bash Copy Edit gdb ./myprog You'll see a (gdb) prompt. 🎯 Step 3: Set Breakpoints You can set breakpoints in three main ways : ✅ a. At a function gdb Copy Edit (gdb) break main ✅ b. At a specific file and line gdb Copy Edit (gdb) break myprog.cpp:42 ✅ c. At a method in a class gdb Copy Edit (gdb) break MyClass::doSomething If the symbol is mangled (C++), GDB usually demangles automatically, especially if compiled with -g . ▶️ Step 4: Run the Program gdb Copy Edit (gdb) run 🧭 Step 5: Navigate Command Meaning next or n Step over current line step or s Step into function call finish Run until current function returns continue or c Continue until...

How to set LD_LIBRARY_PATH path in Environment Variable for using cppcms (chatgpt ans)

 ### Option 1: Setting the `LD_LIBRARY_PATH` Environment Variable You can temporarily add the directory containing `libcppcms.so.2` to the `LD_LIBRARY_PATH` environment variable. ```sh export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH ./learnCppcms -c config.js ``` Replace `/usr/local/lib` with the actual path to the directory where `libcppcms.so.2` is installed. ### Option 2: Adding the Library Path to `/etc/ld.so.conf` For a more permanent solution, you can add the library directory to the `/etc/ld.so.conf` file and run `ldconfig` to update the linker cache. 1. Open `/etc/ld.so.conf` in a text editor with root permissions:     ```sh     sudo nano /etc/ld.so.conf     ``` 2. Add the directory containing `libcppcms.so.2` (e.g., `/usr/local/lib`). 3. Save the file and exit the text editor. 4. Run `ldconfig` to update the linker cache:     ```sh     sudo ldconfig     ``` ### Option 3: Using a Wrapper Script You can creat...

Supplier dropshipping websites in india?

  Here are some supplier dropshipping websites in India: Baapstore: One of the oldest dropshipping suppliers in India, offering a wide variety of products across many categories. Features a user-friendly platform for browsing products, placing orders, and tracking shipments. Spocket: A global dropshipping platform with a large selection of products from suppliers in India, the US, and Europe. Offers features like automated inventory syncing and order fulfillment. Dropshipzone: An Indian dropshipping supplier specializing in fashion apparel, accessories, and homeware. Provides competitive pricing and fast shipping within India. Ninjakart Seller Network: A logistics company that also offers dropshipping services for a variety of products. Provides warehousing, packaging, and shipping services for your dropshipping business. SaleHoo: A directory of verified dropshipping suppliers from around the world, including India. Offers a membership fee to access supplier contact infor...