unresolved external symbol "class Fl_Graphics_Driver * fl_graphics_driver" - graphics

I am trying to implement a cpp project in Visual Studio 2017 on Windows 10 with FLTK and face the following error:
Severity Code Description Project File Line Suppression State
Error LNK2001 unresolved external symbol "class Fl_Graphics_Driver * fl_graphics_driver" (?fl_graphics_driver##3PAVFl_Graphics_Driver##A) Project 1 C:\Users\username\somefolder\Project1-Skeleton\ImageWidget.obj 1

Related

LNK2019 unresolved symbol compiling LuaJava with Visual Studio 2012

I am working with visual studio 2012 to compile LuaJava. The problem I am having is when I call the linker. The line that calls the linker in the makefile is:
link /dll /LIBPATH:"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib\x64"
/LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\lib\amd64"
/out:luajava-1.1.dll src\c\luajava.obj
"C:\Program Files (x86)\Lua\5.1\lib\lua5.1.lib" /VERBOSE
This seems to almost be linking everything successfully, until it gets to the Lua library.
The linker outputs the following when I try to make the project:
...//linking of other libraries
Finished searching libraries
Unused libraries:
C:\Program Files (x86)\Lua\5.1\lib\lua5.1.lib
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\lib\amd64\OLDNAMES.lib
luajava.obj : error LNK2019: unresolved external symbol lua_close referenced in function Java_org_keplerproject_luajava_LuaState__1close
luajava.obj : error LNK2019: unresolved external symbol lua_newthread referenced in function Java_org_keplerproject_luajava_LuaState__1newthread
luajava.obj : error LNK2019: unresolved external symbol lua_gettop referenced in function Java_org_keplerproject_luajava_LuaState__1getTop
...//lots of these errors
luajava-1.1.dll : fatal error LNK1120: 88 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\BIN\x86_amd64\link.EXE"' : return code '0x460'
Stop.
I'm confused as to why it says that the Lua library is unused, and then complains when it can't find the Lua library functions.
You can not link a 32 bit library to your 64 bit application. After some searces I do not believe LuaJava has a x64 download so to use this you must change your application to 32 bit.
Edit:
A second method would be to recomile LuaJava as a 64 bit dll. Here is a very recent post about that: LuaJava compile error "Unresolved external symbol"

LNK2019 Error: Project converterd in Visual Studio 2010 but can not compile it

I need to compile a project which is automatically created from a simulation programm. I tried to compile it with Microsoft Visual Studio C++ 2010. After converting the project i have the following error LNK2019:
1>libcarmaker.a(DataDict.o) : error LNK2019: unresolved external symbol ___fpclassifyf referenced in function DDictStr2Place
1>libcarmaker.a(DataDict.o) : error LNK2019: unresolved external symbol __fpclassify referenced in function _DDictStr2Place
1>CarMaker.win32.exe : fatal error LNK1120: 2 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========,
There are a lot of threads relating to this error but none of those solutions worked for me.
Could anyone help me how to solve it??
fpclassify is supported only in Visual Studio 2012. In VS 2010 it is _fpclass, so you should rename where the function is called.
Source

SFML linker problems on eclipse VC++

I am trying to use the SFML library for audio in my project.
I am developing in eclipse juno for c++ and am using SFML v1.6.
I added sfml-audio-d.lib, sfml-main-d.lib, and sfml-system-d.lib into
C/C++ General > paths and symbols>libraries
I also defined a macro named SFML_DYNAMIC into
C/C++ Build>Settings>C++ Compiler>Preprocessor 'Defines /D' section
I added the directory that contains all the dlls into the PATH environment variable.
In my code I make use of sf::SoundBuffer, but when I try to build the project I get the following linker error:
Chunk.obj : error LNK2001: unresolved external symbol "private: static class sf::SoundBuffer * Chunk::breakBlockSound" (?breakBlockSound#Chunk##0PAVSoundBuffer#sf##A)
MyProject.exe : fatal error LNK1120: 1 unresolved externals
Had to rebuild the project in VS2010 before using it. Works now.

Error LNK2019 Directx10 VC++2010

I am trying to learn about DirectX 2010, after setting up the Libraries
how i installed the Libraries:-
VC++ 2010-View-other windows-Property manager
i opened the Microsoft.Cpp.Win32.user
VC++ Directories :-
Include Directories: C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include
Library Directories: C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Lib\x64
here is the Error list i get:-
Error 1 error LNK2019: unresolved external symbol _D3DX10CreateEffectFromFileW#48 referenced in function "long __cdecl InitDevice(void)" (?InitDevice##YAJXZ) c:\Users\ahmed_saad\documents\visual studio 2010\Projects\CodeName_Yarab\CodeName_Yarab\Main.obj CodeName_Yarab
Error 2 error LNK2019: unresolved external symbol _D3D10CreateDeviceAndSwapChain#32 referenced in function "long __cdecl InitDevice(void)" (?InitDevice##YAJXZ) c:\Users\ahmed_saad\documents\visual studio 2010\Projects\CodeName_Yarab\CodeName_Yarab\Main.obj CodeName_Yarab
Error 3 error LNK1120: 2 unresolved externals c:\users\ahmed_saad\documents\visual studio 2010\Projects\CodeName_Yarab\Debug\CodeName_Yarab.exe 1 1 CodeName_Yarab
i am using Windows 8 pro x64
It might be that you'll need to link to a .lib-file, because DX ist not among the usual libraries.
Look for a .lib file and add it to your Linker properties.

Can't build Allegro 5 solution in MSVC 2012

I am struggling for hours to build my first Allegro 5 application in Visual Studio 2012, using Windows 7 x64.
I have followed all the steps of this tutorial: http://wiki.allegro.cc/index.php?title=Windows,_Visual_Studio_2010_and_Allegro_5#Download which means that the Allegro directory is in c:/allegro/ and all the libraries are added in both the debug and release configurations.
I also changed my subsystem to Windows, so now it says "Windows (/SUBSYSTEM:WINDOWS)"
1>------ Build started: Project: AllegroTesting, Configuration: Debug Win32 ------
1>main.obj : error LNK2019: unresolved external symbol __imp__al_install_system referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol __imp__al_rest referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol __imp__al_map_rgb referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol __imp__al_create_display referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol __imp__al_destroy_display referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol __imp__al_flip_display referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol __imp__al_clear_to_color referenced in function _main
1>c:\users\skypower\documents\visual studio 2012\Projects\AllegroTesting\Debug\AllegroTesting.exe : fatal error LNK1120: 7 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
For anyone wondering, the issue was resolved for skypower in this thread on the allegro.cc forums: Problem installing allegro 5 on vs 2012
It boiled down to specifying the wrong linker input libraries when following the Visual Studio 2010 setup instructions on the relevant Allegro.cc wiki page. Make sure to type the actual version of Allegro instead of typing 5.0.x (i.e. the x should be replaced with the minor version, which is currently 8, so type the version of 5.0.8).
(some extra context if you read that original thread - the x I'm referring was previously a ? in the wiki page's setup instructions)
I struggled with this problem for a long time,pulled half my hair off,and then i finally tried something. I'm using Windows 8 and VS2012 and Allegro 4.2 cause I got it right using the older version.
Link to get the 4.2 binary => http://en.sourceforge.jp/projects/sfnet_alleg/downloads/allegro-bin/4.2.0/allegro-msvc6-4.2.0.zip/
Once you unpack it, there'll be 4 files => bin,include,lib and the readme file.
Copy the include and lib files in C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC
Fire up VS and create a Win32 Project,the when prompted with Application setting,check Empty project and click OK.
Insert a source file in and paste this code =>
#include <allegro.h>
int main(void) {
allegro_init();
set_gfx_mode(GFX_SAFE, 640, 480, 0, 0);
install_keyboard();
textout_ex(screen, font, "Hello World!", 1, 1, 10, -1);
textout_ex(screen, font, "Press ESCape to quit.", 1, 12, 11, -1);
while(!key[KEY_ESC]);
allegro_exit();
return 0;
}
END_OF_MAIN()
Now right click on the project in the solution explorer->properties->Linker->Input->Additional Dependencies. Click on it reveal the drop down menu->edit and in the blank space at the top enter 'alleg.lib' ->OK->OK.
Now copy the 3 dll files in the bin folder from the unpacked Allegro 4.2 folder.
Go to where you saved your project, default is my documents->visual studio 2012->projects. go into the folder with your project name->Debug folder. here you will find the .exe file for your project. paste the dll files here.
go to VS2012. press f7 to compile your program,should be no errors. press ctrl+f5 to run.
10.you get a black window saying hello and press esc to exit. That's it! :D

Resources