Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » cannot build dependent projects in eclipse(makefile:31: *** multiple target patterns. Stop.)
cannot build dependent projects in eclipse [message #683602] Tue, 14 June 2011 04:37 Go to next message
Mrunmoy Samal is currently offline Mrunmoy SamalFriend
Messages: 2
Registered: June 2011
Junior Member
Hi,

I am trying to build a main project dependent on a static library project called "sort". I always get an error message
"makefile:31: *** multiple target patterns. Stop."

I am using eclipse on Windows 7 with version
Eclipse IDE for C/C++ Developers

Version: Helios Service Release 2
Build id: 20110218-0911

I searched online and found people saying something about paths not correct, like somekind of ":" in the paths. So I followed their advice and changed the include direcotory paths and library paths to '/cygdrive/d/msamal/projects/eclipse" but it still doesnt work...

The static library project builds successfully and generates .a file. But the main project does not build. Any help will be appreciated.

cygwin installed at c:\cygwin
eclipse installed at c:\program files\eclipse
project files/workspace set to d:\msamal\projects\eclipse

for some reason i cannot attach project files, so pasting makefile here:-

***************************************************************************
################################################################################
# Automatically-generated file. Do not edit!
################################################################################

-include ../makefile.init

RM := rm -rf

# All of the sources participating in the build are defined here
-include sources.mk
-include subdir.mk
-include objects.mk

ifneq ($(MAKECMDGOALS),clean)
ifneq ($(strip $(C_DEPS)),)
-include $(C_DEPS)
endif
endif

-include ../makefile.defs

# Add inputs and outputs from these tool invocations to the build variables

# All Target
all: record_sort.out

dependents:
-cd D:/msamal/projects/eclipse/sort/Debug && $(MAKE) clean all

# Tool invocations
record_sort.out: $(OBJS) $(USER_OBJS) D:/msamal/projects/eclipse/sort/Debug/libsort.a
@echo 'Building target: $@'
@echo 'Invoking: Cygwin C Linker'
gcc -static -L"/cygdrive/d/msamal/projects/eclipse/sort" -o"record_sort.out" $(OBJS) $(USER_OBJS) $(LIBS)
@echo 'Finished building target: $@'
@echo ' '

# Other Targets
clean:
-$(RM) $(OBJS)$(C_DEPS)$(EXECUTABLES) record_sort.out
-@echo ' '

.PHONY: all clean dependents
.SECONDARY:
D:/msamal/projects/eclipse/sort/Debug/libsort.a:

-include ../makefile.targets

***************************************************************************

Thanks,
Sam
Re: cannot build dependent projects in eclipse [message #685836 is a reply to message #683602] Mon, 20 June 2011 10:32 Go to previous messageGo to next message
Mrunmoy Samal is currently offline Mrunmoy SamalFriend
Messages: 2
Registered: June 2011
Junior Member
Can anyone please provide some help??
Re: cannot build dependent projects in eclipse [message #685967 is a reply to message #685836] Tue, 21 June 2011 07:01 Go to previous message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
Quote:
record_sort.out: $(OBJS) $(USER_OBJS) D:/msamal/projects/eclipse/sort/Debug/libsort.a

There are still colons in your makefile. The dependency for the main target still uses the Windows path with colons.

There are two open bug reports about this.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=117013
https://bugs.eclipse.org/bugs/show_bug.cgi?id=181713

You should read them. There are some workarounds mentioned.


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Previous Topic:CDT installed, but unable to create C++ projects or switch to C++ perspective
Next Topic:Codan static analysis, where to download?
Goto Forum:
  


Current Time: Wed Apr 24 14:54:35 GMT 2024

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

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

Back to the top