Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Encountered problem in compiling files

Status
Not open for further replies.

thilaks83

Junior Member level 1
Junior Member level 1
Joined
Sep 17, 2005
Messages
19
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,468
hi.. i have a source code tat i found from the net which i could not compile...i kindly request for help in this matter...i've attached the source codes tat i have with tis msg...thank u very nuch
:)
 

I see that you found newdespr.h, but it seems like the wrong version. I created a new header file, and then repaired various problems with obsolete C syntax until the code compiled quietly with GCC 3.4.2 (mingw-special). The executable runs and does interesting things, but I don't know if it's correct.

gcc -Wall *.c -o newdes2

By the way, you may want to read Scott's 1996 message "Revision of NEWDES":
https://groups.google.com/group/sci.crypt/msg/7fb986b231fa9dc5
 

well im glad tat u managed to compile those files...can u attach the compiled files together with the files tat u created with tis message...?cos i tried compiling the files tat u modified..stil got errors...did u use microsoft visual c++ editor?...it will be very helpful and kind of u if u can help me in this matter...i'l refer to it to undersatnd it better and use it for my project asap...thank u very much..:)
 

What errors do you get?
I assume you are using Windows, not Linux.
I already said the compiler I used.
I also tried Visual C++ 5.0, and it compiles fine:

cl /W3 *.c /Fenewdes2.exe

I fixed a couple more obsolete C problems that VC++ warned about. Beware, the source code is still full of old styles.

Here's my modified source code and compiled executables from GCC and VC++.
 

excuse me sir...ru trying to say tat source codes can only be compiled in linux? how do we compile it in windows?
 

I'm using Windows 2000. GCC 3.4.2 (mingw-special) and Visual C++ 5.0 are both Windows compilers. I run the compiler by opening a Windows Command Prompt, and then typing the command that I mentioned above.

I just now tried compiling it in Linux with GCC 3.3.5 (Debian 1:3.3.5-13). I renamed all the source files to lower-case, and removed the non-portable #include <io.h> from nd2main.c. It compiled fine, except for a few harmless warnings.
 

if u have done th corrections in visual c++ then u compiled it then u would be having the project workspace rite? can u upload tat? cos i cudn open the .exe file tat u gav me..so can i compile it in visual c++ using the workspace tat u alredi done? thank u sir....
 

I don't use "projects" in Visual C++. I simply unzipped the newdes source files, and then ran the compiler/linker from the Windows Command Prompt like this:

cl /W3 *.c /Fenewdes2.exe

I don't understand "cudn open the .exe file". I think "cudn" means "could not", but I don't understand "open". Did you try to launch it by double-clicking? That won't work because it's a command-line program, so you must run it from the Windows Command Prompt.
 

thank u very much...i already managed to run the newdes source code...but there's 1 prob...i don understand how to go further..i mean how to do the encryption part...i don understand the instruction wic comes wen running it in windows prompt...
 

Run "newdes2" without any paramaters, and it will show you its command line syntax and options. If you don't know how to run command line programs and piping, please search Google for a tutorial on the Windows Command Prompt. For example, this should encrypt and then decrypt a directory listing:

dir | newdes2 -e -c -u -k mypassword | newdes2 -d -c -u -k mypassword

However, I see some erratic behavior, so good luck finding the bug. Remember that the source code still has obsolete junk such as read() and write(). It may also have problems with text/binary file mode.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top