Hi all - hope someone can help me with this because I've been trawling the web looking for an answer to no avail :-(

I'm trying to compile a big project (300+ files) and I seem to have no syntax errors in the code, but I get the following when I try to build

C:\Dev-Cpp\Projects\LAMMPS\Makefile.win [Build Error] [compileAttempt1.exe] Error 255

Sadly this is a bit obscure for me, I don't know what error 255 could be. I'm using bloodshed Dev-C++.

The compile log ends

"The input line is too long.
make.exe: *** [compileAttempt1.exe] Error 255
Execution terminated"

Could this be due to the amount of files in the make? If so - how do I get around it?

Many many thanks to anyone who can help me - or even point me in some new direction. This problem is driving me crazy!!!

Recommended Answers

All 9 Replies

zip up the project and attached it to your post. I'll give it a try. Make sure you deleted all compiler-generated files first to make the zip file smalller.

If you don't want to do that then you can email it to me. PM me and I'll give you my email.

Thanks so much for taking a look - I've upped the files, including my Dev-Cpp file. I also use FFTW (fastest fourier transform in the west). You should be able to put everything into one directory and build, but use the following command line options:

-DMPICH_IGNORE_CXX_SEEK
-DFFT_INTEL

I should mention for anyone reading this that the code is a modified version of the open source code LAMMPS made (or attempt to be made) to compile for windows. Not much needs to be changed but the original code for unix systems is available at http://lammps.sandia.gov/ so anyone looking to do molecular dynamics simulations should go there.

I get the same error message that you reported, and I used Dev-C++ IDE instead of command-line compile. My suggestion for you is to split that project up and make a couple static libraries, or a DLL, out of most of those files. That way the linker doesn't have to deal with all those *.o files except as they appear in the archive libraries.

Thanks for your answers - I'm not familiar with either of these but I tried to figure something out before coming back begging for help.

If I compile all the class/header files into a DLL then, if I understand correctly, I've got to put an include statement in each file that uses something in the DLL, but more importanly I've got to use dllexport commands in all functions etc. that are in the DLL?? This seems like quite a bit of work to solve the problem, if I understand what I've got to do.

As for the response file - can I do this without writing a custom makefile? I couldn't figure out how - I didn't really get what I have to do.

Sorry but I need further help!

You are right about the DLL. If you make it a static library you don't have to do any of that. Just compile the files as is then link your main.cpp with the library.

Thanks for your answers - I'm not familiar with either of these but I tried to figure something out before coming back begging for help.

If I compile all the class/header files into a DLL then, if I understand correctly, I've got to put an include statement in each file that uses something in the DLL, but more importanly I've got to use dllexport commands in all functions etc. that are in the DLL?? This seems like quite a bit of work to solve the problem, if I understand what I've got to do.

As for the response file - can I do this without writing a custom makefile? I couldn't figure out how - I didn't really get what I have to do.

Sorry but I need further help!

Yes a response file would require writing a custom makefile - I thought you were doing that: makefile.jam.

Or you can do what Ancient Dragon suggested - make a number of projects, e.g. one for fftw, one for that other module, etc. and compile them into static libraries (not DLLs). Then in your main project, you can link in the precompiled library (.a or .lib).

I'm pretty sure you can use a DLL file without having to worry about all the dllexport rubbish if you create a DLL import library (.lib), which is just a small library that you link to statically (and it links dynamically to the dll file for you without you having to). See http://www.daniweb.com/forums/thread130987.html for how to make the .lib from the .dll to link to the .dll.

FFTW provides the prebuilt dll files on their site, or you can just use the configure, make scripts to build it yourself on the command line (which may waste some time if you're not set up for it)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.