expected type-specifier and cannot convert ‘int*’ in initialization

I have a large amount of code, so I have tried to only include the relevant parts of the code here

I
Last edited on
The first error message tells us, that the linker cannot find the implementation of the indicated constructor. While the second one misses the implementation of ASP::ASp::T_B_P_N(char const*, int). Even your specification doesn't declare those T_B_P_N method.

I didn't really understand your file inclusion strategy. Usually you never should include implementation files (*.cc, *.cpp, ...) but only specification files (*.h, *.hpp, ...).
gh

Last edited on
g
Last edited on
If you don't use an IDE then you may want to write a Makefile (like me). It may help you to have a look around by searching this platform for "Makefile".

A simple Makefile may look as follows:

1
2
3
4
5
6
7
8
9
# Makefile
#
# Coments start with letter '#' and end up to the end of the line.
#
# Your executable may be called "tst".
# It may f.e. depend on ASP.o an main.o (only an example).
#

tst: main.o ASP.o


This is the most simple Makefile. Header and library dependencies are not affected. Yo
Last edited on
g
Last edited on
gh
Last edited on
Its seeems you're using an Integrated Development Environment (IDE). I think it had created your Makefile. I would encourage you to manipulate the build procedure (and as part of it the Makefiles) using this IDE.

Makefiles consists of a series of dependency rules. Left of a colon is written the target while right of it are all its dependencies (other targets or file names which the target depends on). If the command make detects such a dependency description it may know how to create the target out of its dependent files. F.e. it will call the compiler to compile all dependent source files and link them together to a file named with the given target name.

In your Makefile main.cpp.o is an unusal file name. Usually file names consists of a basename and one suffix seperated by a dot. Another unusual expression is that a .o file depends on another .o file. This indeed may make sense in some cases but usually a .o file, which is the binary result of a compilation, depends on its human readable source file like a .cpp one (or .c, .s, .c++, .adb, ...). So I suppose you may have missconfigured something in your project description of your IDE?
Last edited on
Topic archived. No new replies allowed.