1>------ Build started: Project: Setup, Configuration: Debug Win32 ------
1>BoxDemo.obj : error LNK2019: unresolved external symbol _D3DX11CreateEffectFromMemory#24 referenced in function "private: void __thiscall BoxApp::BuildFX(void)" (?BuildFX#BoxApp##AAEXXZ)
1>C:\Users\Josh\Documents\Game Institute\DirectX\Chapter 1\Projects\Setup\Debug\Setup.exe : fatal error LNK1120: 1 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I'm using VS2012 and trying to setup DX11 using a sample program from Frank D Lunas DX11 book. I have no idea what this error message means, any help would be appreciated.
1>------ Build started: Project: Setup, Configuration: Debug Win32 ------
1>Effects11d.lib(EffectAPI.obj) : error LNK2019: unresolved external symbol _D3DCompileFromFile#36 referenced in function _D3DX11CompileEffectFromFile
1>C:\Users\Josh\Documents\Game Institute\DirectX\Chapter 1\Projects\Setup\Debug\Setup.exe : fatal error LNK1120: 1 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Linker cannot find definition of D3DX11CreateEffectFromMemory function. This function is a part of Effects11 framework. And you need to link Effects11.lib to build this program.
Previously, to develop DirectX apps, you must have been DirectX SDK installed.
Now that stand-alone DirectX SDK concerned legacy and now it is a part of Windows SDK (since version 8.0). You`ve got it when installed Visual Studio 2012.
The problem is now this SDK version doesn't include Effect11 framework, among other things.
There are several ways to fix this problems:
Download and install legacy DirectX SDK. When compiling you will get some warnings, because of conflicting old DirectX SDK and new Windows SDK. To solve this you can switch to your project to v110xp toolset or install Windows 7 SDK and switch to v100 in project's options.
In case of this sample program, Mr. Luna included compiled libs in Common folder of source code archive. But I'm not sure if it will work with Win8 SDK.
Correct source code and strip out Effect11 stuff. If you just learning DirectX, it is not easy way.
Some more explanation from Chuck Walbourn - MSFT:
Where is the DirectX SDK?
Effects for Direct3D 11 Update
Related
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
I just finished my project and tried building it in Release for the first time. I've had previous issues with the Windows 7 SDK and the Common7 stuff located in program files(ie they were missing and I had to install them from msdn).
The build is complaining :
1>LINK : fatal error C1350: error loading dll 'msobj110.dll': dll not found
1>Block.obj : fatal error LNK1000: unknown error at 00A14372; consult documentation for technical support options
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
Yet I looked at :
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE
I have the same folder under C:\Program Files..., and IDE is almost empty; doesn't have the ms libraries.
How can I know where Visual Studio picks these dll from? I'm using VS2012.
My application is giving me a linking error when I try to build it.
Error 5 error LNK2001: unresolved external symbol "int __cdecl _AfxInitManaged(void)" (?_AfxInitManaged##YAHXZ) mfcs80ud.lib
I am building the application using Visual studio 2005. I am also linking against WINDDK for Server 2003 and Windows 6.1 SDK if this helps.
I Googled around and noticed people saying that its a precompiled header issue and it should be fixed by setting the /Yc switch in the stdafx.cpp Create/Use Precompiled header property. but that did not fix it for me and I'm not sure how to fix this.
Can someone help please.
I had same problem with Visual Studio 2010.
error LNK2001: unresolved external symbol "int __cdecl _AfxInitManaged
It turned out that was from my mistake to include another stdafx.cpp in other project.
Including more than one stdafx.cpp will produce this symptom.
Seems it solved it self once I restarted my machine.. not sure what was causing it in the first place, even restarting VS and cleaning the solution a gazillion times did not work.
Using Visual Studio 2005 to build a .NET 2003 solution, I encountered the described LNK2001 error. The project did not have a stdafx.cpp file. I added a copy of stdafx.cpp to the project and it built successfully.
I wrote an app with luajit and lua-iup, and link my app with static libs. But I got the following error:
------ Build started: Project: ConsoleApplication1, Configuration: Release Win32 ------
Creating library C:\Users\root\Documents\Visual Studio 2012\Projects\ConsoleApplication1\Release\ConsoleApplication1.lib and object C:\Users\root\Documents\Visual Studio 2012\Projects\ConsoleApplication1\Release\ConsoleApplication1.exp
iup.lib(iupwindows_main.obj) : error LNK2001: unresolved external symbol _main
C:\Users\root\Documents\Visual Studio 2012\Projects\ConsoleApplication1\Release\ConsoleApplication1.exe : fatal error LNK1120: 1 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Am I missing some libs and any idea about this?
As far as I know, IUP's Lua bindings are partially written in Lua. That wouldn't ordinarily be a problem, except that the Lua parts are compiled into the library as pre-compiled bytecode. Lua bytecode and LuaJIT bytecode are different.
The right answer is to change IUP so that it builds with Lua source compiled in rather than bytecode. That will conceivably slow down the startup of an IUP application, but it will make it easier to cross compile IUP and make it possible to use LuaJIT instead of standard Lua.
Here is the answer form the author of IUP, hope this would be helpful to someone that met the same problem as me
It seems that you are building a console application. This means you
need a “main” function. If you try instead to build a Windows
application without a console, then IUP will implement the WinMain
function for you and call your “main” function. In both cases you need
the “main” function.
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