I am trying to use nmake to build a program I downloaded (source). The program is old (1994) but I need to build it for research purposes.
As I'm using windows, I'm calling nmake whilst in the \install\dos\ directory, and receiving:
makefile(62) : fatal error U1052: file '..\source\targets.mak' not
found.
I've checked, and targets.mak does exist in 'X:\Desktop\rsaref\source\targets.mak' so I tried the command:
nmake /F X:\Desktop\rsaref\source\targets.mak
But I now receive the error:
NMAKE : fatal error U1073: don't know how to make 'desc.c'
I have no clue what i'm doing here as i've never used makefiles before, and as this program is highly depreciated, i'm struggling to find advice on how to use it.
Related
Hi I'm new to C Programming and Notepad++. I can't seem to find the solution to this problem when I was configuring C compiler for Windows 10.
NPP_SAVE: C:\Program Files\Notepad++\change.log
CD: C:\Program Files\Notepad++
Current directory: C:\Program Files\Notepad++
gcc -o "change.exe" "C:\Program Files\Notepad++\change.log"
Process started (PID=16420) >>>
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: cannot open output file change.exe: Permission denied
collect2.exe: error: ld returned 1 exit status
<<< Process finished (PID=16420). (Exit code 1)
"change.exe"
; about to start a child process: ""change.exe""
CreateProcess() failed with error code 2:
The system cannot find the file specified.
================ READY ================
The NppExec script I have taken from https://www.youtube.com/watch?v=_dGyVkPkBRI&t=88s
npp_save
cd "$(CURRENT_DIRECTORY)"
gcc-o "$(NAME_PART).exe" "$(FULL_CURRENT_PATH)"
"$(NAME_PART).exe"
Please help advice, thank you.
I'm afraid this cannot work. As far as I see, you are trying to compile the file change.log, which is almost certainly not a C module (or anything else gcc might understand.
Please re-check the FULL_CURRENT_PATH variable in the script you posted. I think there is a misunderstanding in the youtube clip (which I didn't watch), or in the way you tried to reproduce it.
Additionally, such scripts are not an ideal solution to automate the program build and execution any more. You should check out better alternatives such as an IDE (Eclipse, Netbeans, Visual Studio or whatever you prefer...), or learn to write yourself a Makefile (check out the GNU Make tool), which is much more powerful than a cmd script.
PS: Notepad++ is a nice editor, but it isn't an IDE. As soon as you are programming software that consists of several modules and/or header files, you want to surf through these efficiently in order to avoid mistakes.
In need of a bit of help here: I've spent all day trying to compile libvncserver (https://github.com/LibVNC/libvncserver) on a Windows 10 computer. I'm following the commands listed here (https://github.com/LibVNC/libvncserver/blob/master/.appveyor.yml#L48) and running them line by line in my terminal. The issue I'm having is on line 47 (the nmake command), I get the following error in my console:
Has anyone had success compiling this library on Windows, and if so, could you provide some guidance? Am I compiling it correctly by following the appveyor file? Thank you!!
/f should be -f after nmake command
Also you should use the specified include path with double quotes("")
Okay I'm having a particular issue during compilation using the command gcc -shared -o attack_test.so -fPIC attack_test.c. Specifically, when I run the command, I get the error fatal error: ec.h: No such file or directory. Any idea how to fix this issue? Thanks.
EDIT: To give a little more issue background, I'm running this command from the desktop, where my C source code is located. Perhaps there's a specific place I need to put the source and run the command?
EDIT 2: So I was able to get past the above error by running the command sudo apt-get install libssl-dev, and then changing the line #include <ec.h> to #include <openssl/ec.h>, which seemed to negate the issue. Adding the <openssl/...> to the other includes did not work the same way. So now, instead of fatal error: ec.h: No such file or directory, it's fatal error: ec_plugins.h: No such file or directory. Any ideas for possible fixes? Thanks so much!
For reference, I'm building upon the the dos_attack.c source code from this link.
TO BE CLEAR: This is for a project and tested upon in a CLOSED ENVIRONMENT. This is COMPLETELY* for EDUCATIONAL use and for the study of Denial-of-Service and Man-In-the-Middle mitigation techniques.
<ec.h> is intended to refer to a file in the Ettercap include directory, not an OpenSSL header. The same goes for the other ec_*.h headers.
Adding -I/path/to/ettercap/include to your compiler flags should fix this.
I was trying to compile a C exploit for a security class I'm in and was struggling to get GCC to perform. The issue is that my /usr/include folder is missing folders that GCC is looking for to handle the includes of the file. The first error below describes a folder that doesn't exist.
asm/page.h: No such file or directory
What I've tried so far:
Symlink it with my /usr/src/linux-headers-4.4.0-kali1-common/include/* folders, but files within that folder start throwing errors that they in turn can't find other files.
Using GCC's -I parameter to manually specify each folder to look in for my includes but this also doesn't work. (Below)
gcc 10613.c -o workdamnit-I/usr/src/linux-headers-4.4.0-kali1-common/include/asm-generic/ -I/usr/src/linux-headers-4.4.0-kali1-common/include/linux/ -I/usr/src/linux-headers-4.4.0-kali1-common/include/uapi/asm-generic/ -I/usr/src/linux-headers-4.4.0-kali1-common/include/uapi/linux/
ERROR: In file included from /usr/include/stdio.h:33:0,
from 10613.c:2:
/usr/src/linux-headers-4.4.0-kali1-common/include/linux/stddef.h:4:31: fatal error: uapi/linux/stddef.h: No such file or directory
compilation terminated.
I updated the import statement to use page.h from my kali linux common headers. When I tried to run this, I received the below error:
'PAGE_SIZE' undeclared (first use in this function).
Lastly, I tried to compile with wine gcc but this particular exploit uses a socket library that I guess can't be compiled on a windows machine.
GCC version: 5.3.1
Link to exploit: https://www.exploit-db.com/exploits/10613/
My knowledge of C and its compilation requirements is very limited. Any assistance would be greatly appreciated.
Please give a usable and compilable example: https://stackoverflow.com/help/mcve
Based on the errors, it looks like -I/usr/src/linux-headers-4.4.0-kali1-common/include/uapi/linux/ should actually probably be -I/usr/src/linux-headers-4.4.0-kali1-common/include.
I'm trying to run programs I've compiled with GCC. When I run them through cygwin, a windows terminal opens for a couple of miliseconds (or so) giving off the error:
fatal error - MapViewOfFileEx shared 5'(0x66). win32 error 6. Terminating
It's followed by a stack trace. (this was the best shot, had to use video camera)
It doesn't seem to affect the programs but since it's a "fatal error" I suppose it would be good to fix. I tried googling the error, and found that multiple cygwin1.dll in the path shown when running the command
cygcheck -s
could be the cause, but I only found 1 cygwin1.dll.
The problem could have come from when I tried to open a cygwin-created executeable in windows and I read that I should copy the cygwin1.dll into my windows-folder but I simply deleted it after realizing that I needed several more files (libraries).