Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: undefined reference to `__imp__ZN2sf9VideoModeC1Ejjj'  (Read 2922 times)

0 Members and 1 Guest are viewing this topic.

eveynull

  • Newbie
  • *
  • Posts: 3
    • View Profile
undefined reference to `__imp__ZN2sf9VideoModeC1Ejjj'
« on: October 14, 2018, 08:08:56 pm »
I'm attempting to follow a tutorial making use of SFML however when I attempt a build I am met with the above error...

I believe I am finding & linking & including the packages correctly, however I am a beginner to C++ and so relying the majority of the time on what info I can find from google etc.!

Any identifiable issues with the way I'm setting up this project?






eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10846
    • View Profile
    • development blog
    • Email
Re: undefined reference to `__imp__ZN2sf9VideoModeC1Ejjj'
« Reply #1 on: October 14, 2018, 08:21:02 pm »
If you run CMake with VERBOSE=1 and re-compile, what's the build output?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

eveynull

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: undefined reference to `__imp__ZN2sf9VideoModeC1Ejjj'
« Reply #2 on: October 14, 2018, 08:27:17 pm »
Code: [Select]
"D:\Program Files\JetBrains\CLion 2018.2.4\bin\cmake\win\bin\cmake.exe" --build D:\UNIVERSITY\CLion-projects\HelloSFML\cmake-build-debug-mingw --target all -- -j 4
"D:\Program Files\JetBrains\CLion 2018.2.4\bin\cmake\win\bin\cmake.exe" -HD:\UNIVERSITY\CLion-projects\HelloSFML -BD:\UNIVERSITY\CLion-projects\HelloSFML\cmake-build-debug-mingw --check-build-system CMakeFiles\Makefile.cmake 0
"D:\Program Files\JetBrains\CLion 2018.2.4\bin\cmake\win\bin\cmake.exe" -E cmake_progress_start D:\UNIVERSITY\CLion-projects\HelloSFML\cmake-build-debug-mingw\CMakeFiles D:\UNIVERSITY\CLion-projects\HelloSFML\cmake-build-debug-mingw\CMakeFiles\progress.marks
C:/MinGW/bin/mingw32-make.exe -f CMakeFiles\Makefile2 all
mingw32-make.exe[1]: Entering directory 'D:/UNIVERSITY/CLion-projects/HelloSFML/cmake-build-debug-mingw'
C:/MinGW/bin/mingw32-make.exe -f CMakeFiles\HelloSFML.dir\build.make CMakeFiles/HelloSFML.dir/depend
mingw32-make.exe[2]: Entering directory 'D:/UNIVERSITY/CLion-projects/HelloSFML/cmake-build-debug-mingw'
"D:\Program Files\JetBrains\CLion 2018.2.4\bin\cmake\win\bin\cmake.exe" -E cmake_depends "MinGW Makefiles" D:\UNIVERSITY\CLion-projects\HelloSFML D:\UNIVERSITY\CLion-projects\HelloSFML D:\UNIVERSITY\CLion-projects\HelloSFML\cmake-build-debug-mingw D:\UNIVERSITY\CLion-projects\HelloSFML\cmake-build-debug-mingw D:\UNIVERSITY\CLion-projects\HelloSFML\cmake-build-debug-mingw\CMakeFiles\HelloSFML.dir\DependInfo.cmake --color=
mingw32-make.exe[2]: Leaving directory 'D:/UNIVERSITY/CLion-projects/HelloSFML/cmake-build-debug-mingw'
C:/MinGW/bin/mingw32-make.exe -f CMakeFiles\HelloSFML.dir\build.make CMakeFiles/HelloSFML.dir/build
mingw32-make.exe[2]: Entering directory 'D:/UNIVERSITY/CLion-projects/HelloSFML/cmake-build-debug-mingw'
[ 50%] Linking CXX executable HelloSFML.exe
"D:\Program Files\JetBrains\CLion 2018.2.4\bin\cmake\win\bin\cmake.exe" -E cmake_link_script CMakeFiles\HelloSFML.dir\link.txt --verbose=1
"D:\Program Files\JetBrains\CLion 2018.2.4\bin\cmake\win\bin\cmake.exe" -E remove -f CMakeFiles\HelloSFML.dir/objects.a
C:\MinGW\bin\ar.exe cr CMakeFiles\HelloSFML.dir/objects.a @CMakeFiles\HelloSFML.dir\objects1.rsp
C:\MinGW\bin\g++.exe -g   -Wl,--whole-archive CMakeFiles\HelloSFML.dir/objects.a -Wl,--no-whole-archive  -o HelloSFML.exe -Wl,--out-implib,libHelloSFML.dll.a -Wl,--major-image-version,0,--minor-image-version,0 @CMakeFiles\HelloSFML.dir\linklibs.rsp
CMakeFiles\HelloSFML.dir/objects.a(main.cpp.obj): In function `main':
D:/UNIVERSITY/CLion-projects/HelloSFML/main.cpp:9: undefined reference to `__imp__ZN2sf9VideoModeC1Ejjj'
collect2.exe: error: ld returned 1 exit status
mingw32-make.exe[2]: Leaving directory 'D:/UNIVERSITY/CLion-projects/HelloSFML/cmake-build-debug-mingw'
mingw32-make.exe[1]: Leaving directory 'D:/UNIVERSITY/CLion-projects/HelloSFML/cmake-build-debug-mingw'
mingw32-make.exe[2]: *** [CMakeFiles\HelloSFML.dir\build.make:94: HelloSFML.exe] Error 1
mingw32-make.exe[1]: *** [CMakeFiles\Makefile2:75: CMakeFiles/HelloSFML.dir/all] Error 2
mingw32-make.exe: *** [Makefile:86: all] Error 2

eveynull

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: undefined reference to `__imp__ZN2sf9VideoModeC1Ejjj'
« Reply #3 on: October 15, 2018, 02:25:03 pm »
Was using incorrect version of SFML for the compiler. Rookie error, solved!

 

anything