Giter VIP home page Giter VIP logo

Comments (5)

T-vK avatar T-vK commented on May 28, 2024

I used Visual C++ with precompiled headers to build it. That's why I had to use #include "stdafx.hpp".
It might work for you if you simply remove that line, but I'm not sure.

from memory-hacking-class.

T-vK avatar T-vK commented on May 28, 2024

Oh man, it looks like I'll have to make a few changes to the code in order to make it compile with g++.
I'll create a new branch with what I got so far tomorrow. I'm currently having an issue linking against psapi.lib, which seems to be called libpsapi.a in Cygwin and is located in /lib/w32api .
The #pragma comment(lib, "psapi") seems to be a Visual C++ thing.
In theory it should work somewhat like this:
g++ Program.cpp Memory.cpp -static -o Program.exe -llibpsapi

I don't know, maybe you know more than me.

from memory-hacking-class.

T-vK avatar T-vK commented on May 28, 2024

Created a new branch gcc. You can clone it with git clone -b gcc git://github.com/T-vK/Memory-Hacking-Class.git.

I tried: g++ -llibpsapi -o Example.exe Memory.cpp Example.cpp -static

Which results in:

/usr/lib/gcc/x86_64-pc-cygwin/6.4.0/../../../../x86_64-pc-cygwin/bin/ld: cannot find -llibpsapi
collect2: error: ld returned 1 exit status

I tried to add the path to the lib using -L/lib/w32api and also by setting environment variables:

export LIBRARY_PATH=/lib/w32api
export LD_LIBRARY_PATH=/lib/w32api

The result is always the same.

from memory-hacking-class.

T-vK avatar T-vK commented on May 28, 2024

I managed to get it to compile:

g++ -o Example.exe Memory.cpp Example.cpp -lpsapi -static

Tell me if it works for you.

from memory-hacking-class.

T-vK avatar T-vK commented on May 28, 2024

I fixed some more bugs. It would be nice if you could try to compile and test Example2.cpp as described in here:
https://github.com/T-vK/Memory-Hacking-Class/tree/gcc

from memory-hacking-class.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.