Cmake unable to link source file
Completed
I have a 3 classes which is customer, doublelinkedlist and queue.
When I build the project, it shows that my main is unable to link to this source file.
What is the problem?

Please sign in to leave a comment.
Hi Yhuang006. When you add executable first argument it's target name. Please see https://cmake.org/cmake/help/latest/command/add_executable.html
Although I change my add executable as follow
If I delete my decleration of my template double linkedlist and addFirst function in my main() function, it can compile.
what is the possible problem?
I can't say for sure without the project.
Why do you think that it's a CLion problem?
The problem happens in the linkage state so cmake cannot link my source files. That’s what I think.
Fixed.
Thanks for your response Maxim.
appreciate it.