Why do I have Multiple Definitions?
-
-
@VRonin said in Why do I have Multiple Definitions?:
Thanks for your reply. Actually I used a include guard like this.
#ifndef GAMEPLAY_H
#define GAMEPLAY_HI also tried to disable that include command and everything related to this file in the main window, still I have multiple definition problem.
And through the error log, I found that the file is conflict with itself. All errors come from gameplay.h gameplay.o moc_gameplay.cpp gameplay.o
-
@VRonin said in Why do I have Multiple Definitions?:
Thanks for your reply. Actually I used a include guard like this.
#ifndef GAMEPLAY_H
#define GAMEPLAY_HI also tried to disable that include command and everything related to this file in the main window, still I have multiple definition problem.
And through the error log, I found that the file is conflict with itself. All errors come from gameplay.h gameplay.o moc_gameplay.cpp gameplay.o
@MasterBlade
do a complete clean, preferably delete your shadow build folder, rerun qmake and recompile.Let's see if that fixes it.
-
@MasterBlade
do a complete clean, preferably delete your shadow build folder, rerun qmake and recompile.Let's see if that fixes it.
@J.Hilk said in Why do I have Multiple Definitions?:
@MasterBlade
do a complete clean, preferably delete your shadow build folder, rerun qmake and recompile.Let's see if that fixes it.
Sorry I'm new to qt. What is 'shadow build folder'? Does qmake mean 'Build All' in qt Creator?
-
@J.Hilk said in Why do I have Multiple Definitions?:
@MasterBlade
do a complete clean, preferably delete your shadow build folder, rerun qmake and recompile.Let's see if that fixes it.
Sorry I'm new to qt. What is 'shadow build folder'? Does qmake mean 'Build All' in qt Creator?
@MasterBlade
you'll finde the shadow build folder path in your project settings.
Its a folder where all temporary files are created during the compile process and your executable will end up in -
@J.Hilk said in Why do I have Multiple Definitions?:
@MasterBlade
do a complete clean, preferably delete your shadow build folder, rerun qmake and recompile.Let's see if that fixes it.
Sorry I'm new to qt. What is 'shadow build folder'? Does qmake mean 'Build All' in qt Creator?
-
@MasterBlade
you'll finde the shadow build folder path in your project settings.
Its a folder where all temporary files are created during the compile process and your executable will end up in -
hi
the link opens an image of the link :)
Made me go ehh for for a moment.
https://files.fm/u/wh4n4f4aupdate:
the rar file is empty for me.? -
hi
the link opens an image of the link :)
Made me go ehh for for a moment.
https://files.fm/u/wh4n4f4aupdate:
the rar file is empty for me.?@mrjj said in Why do I have Multiple Definitions?:
hi
the link opens an image of the link :)
Made me go ehh for for a moment.update:
the rar file is empty for me.?Yeah, I also can't put links here. The page says it's an ad. ('Post content was flagged as spam by Akismet.com') Maybe you have a higher privilege than me :)
You can try this link. https://ufile.io/m53r2
The rar file looks alright to me. It's 205 KB.
-
@VRonin said in Why do I have Multiple Definitions?:
Do you have non-inline methods defined in the .h file? if so move them to the cpp file
.h file has only classes. There are some functions in the classes of course. Some functions are lengthy and cannot be set as inline. Should I define them in the .cpp file?
-
@VRonin said in Why do I have Multiple Definitions?:
Do you have non-inline methods defined in the .h file? if so move them to the cpp file
.h file has only classes. There are some functions in the classes of course. Some functions are lengthy and cannot be set as inline. Should I define them in the .cpp file?
@MasterBlade said in Why do I have Multiple Definitions?:
Should I define them in the .cpp file?
Yes
-
@MasterBlade said in Why do I have Multiple Definitions?:
Should I define them in the .cpp file?
Yes
@VRonin said in Why do I have Multiple Definitions?:
@MasterBlade said in Why do I have Multiple Definitions?:
Should I define them in the .cpp file?
Yes
Wow that did solve my problem. Many Many Thanks!!!!!!