1
General / Re: I have a video game files, I need help setting is up in my environment
« on: January 29, 2023, 08:02:12 pm »
Will check the CMakeList.text method later, back to the first initial problem.
I tried running the line of code as you described and used the MIGW32-make (which is working), here is it it contains EVERY cpp file:
compile:
g++ -c main.cpp AIComponent.cpp AIFollow.cpp AIOption.cpp AnimationComponent.cpp AttributeComponent.cpp Bird1.cpp Bow.cpp CharacterTab.cpp DefaultEditorMode.cpp EditorMode.cpp EditorState.cpp Enemy.cpp EnemyEditorMode.cpp EnemySpawnerTile.cpp EnemySystem.cpp Entity.cpp Game.cpp GameState.cpp GraphicsSettings.cpp Gui.cpp HitboxComponent.cpp Inventory.cpp Item.cpp MainMenuState.cpp MeleeWeapon.cpp MovementComponent.cpp PauseMenu.cpp Player.cpp PlayerGUI.cpp PlayerGUITabs.cpp RangedWeapon.cpp Rat.cpp RegularTile.cpp SettingsState.cpp SkillComponent.cpp State.cpp stdafx.cpp Sword.cpp Tab.cpp TextTagSystem.cpp Tile.cpp TileMap.cpp VectorMath.cpp Weapon.cpp -I"personalPath...\include" -DSFML_STATIC
link:
g++ main.o AIComponent.o AIFollow.o AIOption.o AnimationComponent.o AttributeComponent.o Bird1.o Bow.o CharacterTab.o DefaultEditorMode.o EditorMode.o EditorState.o Enemy.o EnemyEditorMode.o EnemySpawnerTile.o EnemySystem.o Entity.o Game.o GameState.o GraphicsSettings.o Gui.o HitboxComponent.o Inventory.o Item.o MainMenuState.o MeleeWeapon.o MovementComponent.o PauseMenu.o Player.o PlayerGUI.o PlayerGUITabs.o RangedWeapon.o Rat.o RegularTile.o SettingsState.o SkillComponent.o State.o stdafx.o Sword.o Tab.o TextTagSystem.o Tile.o TileMap.o VectorMath.o Weapon.o -o jojo -L"personalPath...\lib" -lsfml-graphics-s -lsfml-window-s -lsfml-system-s -lsfml-audio-s -lsfml-network-s -lopengl32 -lfreetype -lwinmm -lgdi32 -lopenal32 -lflac -lvorbisenc -lvorbisfile -lvorbis -logg -lws2_32 -mwindows -lsfml-main
Again I am using this game (https://github.com/Headturna/SFML_RPG)
Well guess what? Got the same error (and 3 warnings)
The errors:
Since the make method is working, why am I not able to compile this video game?
(I tested with a simple green cercle prohect and everything worked fine, but not with this game? )
Edit: nevermind it worked
I tried running the line of code as you described and used the MIGW32-make (which is working), here is it it contains EVERY cpp file:
compile:
g++ -c main.cpp AIComponent.cpp AIFollow.cpp AIOption.cpp AnimationComponent.cpp AttributeComponent.cpp Bird1.cpp Bow.cpp CharacterTab.cpp DefaultEditorMode.cpp EditorMode.cpp EditorState.cpp Enemy.cpp EnemyEditorMode.cpp EnemySpawnerTile.cpp EnemySystem.cpp Entity.cpp Game.cpp GameState.cpp GraphicsSettings.cpp Gui.cpp HitboxComponent.cpp Inventory.cpp Item.cpp MainMenuState.cpp MeleeWeapon.cpp MovementComponent.cpp PauseMenu.cpp Player.cpp PlayerGUI.cpp PlayerGUITabs.cpp RangedWeapon.cpp Rat.cpp RegularTile.cpp SettingsState.cpp SkillComponent.cpp State.cpp stdafx.cpp Sword.cpp Tab.cpp TextTagSystem.cpp Tile.cpp TileMap.cpp VectorMath.cpp Weapon.cpp -I"personalPath...\include" -DSFML_STATIC
link:
g++ main.o AIComponent.o AIFollow.o AIOption.o AnimationComponent.o AttributeComponent.o Bird1.o Bow.o CharacterTab.o DefaultEditorMode.o EditorMode.o EditorState.o Enemy.o EnemyEditorMode.o EnemySpawnerTile.o EnemySystem.o Entity.o Game.o GameState.o GraphicsSettings.o Gui.o HitboxComponent.o Inventory.o Item.o MainMenuState.o MeleeWeapon.o MovementComponent.o PauseMenu.o Player.o PlayerGUI.o PlayerGUITabs.o RangedWeapon.o Rat.o RegularTile.o SettingsState.o SkillComponent.o State.o stdafx.o Sword.o Tab.o TextTagSystem.o Tile.o TileMap.o VectorMath.o Weapon.o -o jojo -L"personalPath...\lib" -lsfml-graphics-s -lsfml-window-s -lsfml-system-s -lsfml-audio-s -lsfml-network-s -lopengl32 -lfreetype -lwinmm -lgdi32 -lopenal32 -lflac -lvorbisenc -lvorbisfile -lvorbis -logg -lws2_32 -mwindows -lsfml-main
Again I am using this game (https://github.com/Headturna/SFML_RPG)
Well guess what? Got the same error (and 3 warnings)
The errors:
Quote
g++ main.o -o jojo -L"personal path...\lib" -lsfml-graphics-s -lsfml-window-s -lsfml-system-s -lsfml-audio-s
-lsfml-network-s -lopengl32 -lfreetype -lwinmm -lgdi32 -lopenal32 -lflac -lvorbisenc -lvorbisfile -lvorbis -logg -lws2_32 -mwindows -lsfml-main
main.o:main.cpp:(.text+0x1e): undefined reference to `Game::Game()'
main.o:main.cpp:(.text+0x2a): undefined reference to `Game::run()'
main.o:main.cpp:(.text+0x3b): undefined reference to `Game::~Game()'
main.o:main.cpp:(.text+0x4e): undefined reference to `Game::~Game()'
collect2.exe: error: ld returned 1 exit status
mingw32-make: *** [Makefile:7: link] Error 1
Since the make method is working, why am I not able to compile this video game?
(I tested with a simple green cercle prohect and everything worked fine, but not with this game? )
Edit: nevermind it worked