Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Multiple makefile errors only in Eclipse(Makefile fails only in Eclipse)
Multiple makefile errors only in Eclipse [message #1860527] Sat, 12 August 2023 22:45 Go to next message
Clifton Liles is currently offline Clifton LilesFriend
Messages: 18
Registered: October 2011
Location: Texas
Junior Member
I have two make files that only differ in the file name.
One workes and one had errors on line 6, 11, and all following lines.

So I copied the working make file to the bad project and ran it with out any modifications, and got the same errors.
I have looked through all the project properties and can not find any differences. Also the run configurations appear to be the same( except for the file name).

If I go to a terminal(cygwin) and "make all" it works just fine. the exe file also works.
The makefile output:
make all
MAKE Version 5.43 Copyright (c) 1987, 2019 Embarcadero Technologies, Inc.
Error makefile 6: Command syntax error
Error makefile 11: Command syntax error
Error makefile 12: Command syntax error
Error makefile 13: Command syntax error
O O O
all lines fail after #11.

I have seen several other request for help all with this same signature
(syntax #6, #11, ...).
I have not included the makefile because it does not seem to matter.

Any hints accepted with favor.
Cliff


Failure is not an option. It comes bundled with your Microsoft products.

[Updated on: Sat, 12 August 2023 22:49]

Report message to a moderator

Re: Multiple makefile errors only in Eclipse [message #1860529 is a reply to message #1860527] Sun, 13 August 2023 10:06 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33163
Registered: July 2009
Senior Member
Do both projects have the same project default encoding? Is the file maybe iso-latin encoded and then copied to a project that is UTF-8 encoded?

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Multiple makefile errors only in Eclipse [message #1860532 is a reply to message #1860529] Sun, 13 August 2023 19:01 Go to previous messageGo to next message
Clifton Liles is currently offline Clifton LilesFriend
Messages: 18
Registered: October 2011
Location: Texas
Junior Member
According to NotePad++ the encoding is UTF-8 for both.
Originally The one that worked was encoded with Unix style end of line
and the one that did not was DOS (windows) style end of line. I change the latter to Unix style EOL, with no change.
Nice catch but no joy.
Cliff


Failure is not an option. It comes bundled with your Microsoft products.

[Updated on: Sun, 13 August 2023 23:18]

Report message to a moderator

Re: Multiple makefile errors only in Eclipse [message #1860535 is a reply to message #1860532] Mon, 14 August 2023 07:57 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33163
Registered: July 2009
Senior Member
I doubt it's line endings problems. The file might be UTF-8 encoded and you copied to a project that is windows-1252 encoded, which I think is still the default on Windows; look in the Properties... -> Resource from the project's context menu at that of the file itself. Are the files really byte-for-byte identical? In that case I seems to me it can only be an encoding problem...

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Multiple makefile errors only in Eclipse [message #1860542 is a reply to message #1860535] Mon, 14 August 2023 19:19 Go to previous messageGo to next message
Clifton Liles is currently offline Clifton LilesFriend
Messages: 18
Registered: October 2011
Location: Texas
Junior Member
Seam the same to me. Attached eclpise1 is the one that does not work and eclipse2 is the one that does.
Here are the error messages :
14:13:48 **** Incremental Build of configuration Debug for project helloW2 ****
make all
MAKE Version 5.43 Copyright (c) 1987, 2019 Embarcadero Technologies, Inc.
Error makefile 6: Command syntax error
Error makefile 11: Command syntax error
Error makefile 12: Command syntax error

The diff is the diff between the two makefiles.
If do the make in a cygwin window, it works see below.
--------------------
Cliff@Whitepine /cygdrive/e/Documents and Settings/Cliff/C code/C++/helloW2/src
$ make all
MAKE Version 5.43 Copyright (c) 1987, 2019 Embarcadero Technologies, Inc.
Make1:O: C++ -o hello2.o hello2.cpp
C++ -O2 -g -Wall -fmessage-length=0 -m64 -c -o hello2.o hello2.cpp
Make1:T: C++ -o hello2.o hello2.cpp NEW hello2
C++ -o hello2 hello2.o
ALL Obj:: C++ -o hello2.o hello2.cpp ./hello2

Cliff@Whitepine /cygdrive/e/Documents and Settings/Cliff/C code/C++/helloW2/src
$ ls
hello2.cpp hello2.exe hello2.o Makefile
Cliff@Whitepine /cygdrive/e/Documents and Settings/Cliff/C code/C++/helloW2/src
$ ./hello2.exe
Hello World!!!
-------------------------
I have also tried dos2unix on this makefile. no joy.
Cliff
  • Attachment: eclipse2.png
    (Size: 27.69KB, Downloaded 71 times)
  • Attachment: eclipse1.png
    (Size: 27.91KB, Downloaded 82 times)
  • Attachment: diff.png
    (Size: 50.28KB, Downloaded 94 times)


Failure is not an option. It comes bundled with your Microsoft products.

[Updated on: Tue, 15 August 2023 19:56]

Report message to a moderator

Re: Multiple makefile errors only in Eclipse [message #1860593 is a reply to message #1860542] Fri, 18 August 2023 23:13 Go to previous message
Clifton Liles is currently offline Clifton LilesFriend
Messages: 18
Registered: October 2011
Location: Texas
Junior Member
OK I found the problem! (I think?)
See eclipse3
There is a Debug(now Default) directory and the makefile in that dir. is the problem.
I deleted the Debug dir. and ran the project. The Debug file reappears and I get the same errors. Under the projects->Environment I changed the CWD & PWD to be helloW2.
They remain as I set them. In the Configuration box (eclipse4) was set to 'Debug' was active. I made a new one 'Default'(eclipse5) and deleted the Debug one.
No Joy!
It still creates the a directory, now called, 'Defaults' with the same results.
How do I change the configuration? The configuration under the run+ does not change it. There is no Edit in the 'manage configurations' screen.

Update.
I accidentally deleted the workspace. Well that was my next move anyway.
Imported it again and it works! Joy, joy, joy.
I still do not know what was in those configurations or where they came from.
Update2: see eclipse6.
The Debug/Defaults directory is the result of having the 'Generate Makefiles automatically' check box in the D/D++ Build page(eclipse6).
Now, why the Eclipse generated make files fail, is another question.
Cliff
  • Attachment: eclipse3.png
    (Size: 7.75KB, Downloaded 81 times)
  • Attachment: eclipse4.png
    (Size: 34.12KB, Downloaded 52 times)
  • Attachment: eclipse5.png
    (Size: 8.31KB, Downloaded 55 times)
  • Attachment: eclipse6.png
    (Size: 33.02KB, Downloaded 53 times)


Failure is not an option. It comes bundled with your Microsoft products.

[Updated on: Mon, 21 August 2023 16:39]

Report message to a moderator

Previous Topic:Application runs fine in eclipse, but compilation problem after export
Next Topic:Color Theme
Goto Forum:
  


Current Time: Mon Jun 17 13:33:22 GMT 2024

Powered by FUDForum. Page generated in 0.08329 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top