eclipse, bizarre error when all the code is correct - symbol(s) not found -

Hey everyone :)! I am using Mac Eclipse with GCC to learn c++.

I have improved in my c++ immensely recently but eclipse is throwing a bizarre error at me lately which stops it from compiling anything even when it has no actual code errors.

It says - symbol(s) not found! and make: *** [base constructors and stuff] error 1. But it doesn't point to anywhere in the code source that could possibly be wrong. I am guessing it has something to do with the makefile. But I don't know how makefiles work yet so here it is.

Is there anything that strikes you as bad? If not I'll post my source code to see if there's any small thing I'm doing wrong that might cause mac to throw this error.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
################################################################################
# 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 src/subdir.mk
-include objects.mk

ifneq ($(MAKECMDGOALS),clean)
ifneq ($(strip $(C++_DEPS)),)
-include $(C++_DEPS)
endif
ifneq ($(strip $(C_DEPS)),)
-include $(C_DEPS)
endif
ifneq ($(strip $(CC_DEPS)),)
-include $(CC_DEPS)
endif
ifneq ($(strip $(CPP_DEPS)),)
-include $(CPP_DEPS)
endif
ifneq ($(strip $(CXX_DEPS)),)
-include $(CXX_DEPS)
endif
ifneq ($(strip $(C_UPPER_DEPS)),)
-include $(C_UPPER_DEPS)
endif
endif

-include ../makefile.defs

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

# All Target
all: Base\ Constructors\ And\ Stuff

# Tool invocations
Base\ Constructors\ And\ Stuff: $(OBJS) $(USER_OBJS)
	@echo 'Building target: $@'
	@echo 'Invoking: MacOS X C++ Linker'
	g++  -o "Base Constructors And Stuff" $(OBJS) $(USER_OBJS) $(LIBS)
	@echo 'Finished building target: $@'
	@echo ' '

# Other Targets
clean:
	-$(RM) $(C++_DEPS)$(OBJS)$(C_DEPS)$(CC_DEPS)$(CPP_DEPS)$(EXECUTABLES)$(CXX_DEPS)$(C_UPPER_DEPS) "Base Constructors And Stuff"
	-@echo ' '

.PHONY: all clean dependents
.SECONDARY:

-include ../makefile.targets
closed account (Lv0f92yv)
I cannot see anything that strikes me as strange... Try posting the code that generates this compile error, and the compiler error associated with it.

Sounds like it could be a linker problem?
A) Why multi word target names? IMO only makes the whole thing harder to read, without any gain.
B) Is that the exact error message? Might be a linker error... OR something might be wrong with your makefile (e.g. you using a symbol that was not declared previously) but that's hard to tell as we can't see its full contents.
OK I noticed I hadn't added the destructor for each object. So I put them in and it worked. Whoops haha. I'll remember to look for that next time.

Thanks for your help though guys.

Hanst - I didn't know multiword names made it any difference in readability. I just read the makefile and I see what you mean. I'll make sure to make it a single word from here on :)
Topic archived. No new replies allowed.