I'm trying to get the sample "SimpleOpenGl" from Assimp to work, but I get some linker errors i can't solve. (And yes I am very new)
I get 12 LNK2001 errors (below is two of them)
1>Sample_SimpleOpenGL.obj : error LNK2001: unresolved external symbol _aiTransformVecByMatrix4
1>Sample_SimpleOpenGL.obj : error LNK2001: unresolved external symbol _aiImportFile
When googling "aiTransformVecByMatrix4" it says that it requires cimport, but it is already included, so I am not sure why I am getting this error.
The sample project can be found here: http://assimp.svn.sourceforge.net/viewvc/assimp/trunk/samples/SimpleOpenGL/
Any help is appreciated, thanks.
If you have downloaded assimp, you must have its libraries in any place on your disk. Open your sample properties dialog, select Linker and check the path to external references.
This must give you a clue about where the sample is looking for libraries.
If you are not sure, please post your values so I can help you
Related
I am sure this has come up time and time again. I get the following error:
1>precision.obj : error LNK2001: unresolved external symbol "int nprecision"
in my program precision.cxx I have a #include to u.hxx which has the following declaration:
extern int nprecision
Surely this now reads the variable nprecision as an external variable and should all be fine. I am unsure of what is going on.
Any suggestions would be appreciated. I've done everything I can think of.
Regards
Mat
I get this problem while compiling my code.
Error 14 error LNK2019: unresolved external symbol _findFuncs referenced in function _main H:\pshtoolkit_v1.4-src\whosthere\whosthere.obj whoisthere-alt
What libraries should I link with visual studio in order to resolve the error?
What libraries should I link with visual studio:
The library containing _findFuncs.
OK, not helpful I know, but presumably you know what findFuncs is and you are calling it for a reason. Where did you find out about it? Do you have any documentation?
Maybe you have a typo calling this function (case?), e.g. should it be FindFuncs?
Or is it defined somewhere as a static function?
I have solved the error, it is not the problems with the libraries. The .c file which contains the fincFuncs method had not been properly referenced. Thanks for helping though!
It's actually Linker error which your compiler doesn't resolve that name I think just
do forward declartion for the symbol which you are using in main.
May be you have done forward declaration but missing the definition itself.
Which your linker is looking for
Here it's your function "findfunc"
Check whether it works or not
--------------------Configuration: AllTests - Win32 Debug--------------------
Linking...
AllTests.obj : error LNK2001: unresolved external symbol "int externTestGroupMockDocumentation" (?externTestGroupMockDocumentation##3HA)
AllTests.obj : error LNK2001: unresolved external symbol "int externTestGroupEventDispatcher" (?externTestGroupEventDispatcher##3HA)
Debug/AllTests.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.
AllTests.exe - 3 error(s), 0 warning(s)
Why do I get these errors and how can I resolve them?
Do you have these lines in your AllTests.cpp?
IMPORT_TEST_GROUP(MockDocumentation)
IMPORT_TEST_GROUP(EventDispatcher)
If you do, you also need to have these test groups defined in you build:
TEST_GROUP(MockDocumentation)
TEST_GROUP(EventDispatcher)
James
wondering if you got over this issue,
I am facing the same issue although I have
IMPORT_TEST_GROUP(my_test_group);
in AllTests.cpp and properly defining
TEST_GROUP(my_test_group) {};
in my_test.cpp as per Mr. Grenning's advice.
Notice I have been able to get it to compile by applying either one of the following workarounds:
1- Add the cpp file containing the function definition to the UnitTest project. Or..
2- Have the function definition in the header file (typical if your function is a template)
I don't know if either/any of the suggestions is correct (so not claiming an answer yet), however, I mention my workaround here in the hope others might find it helpful.
N.B. I have CppUTest-3.6 configured with visual studio 2010 according to "D:\cpputest-3.6\docsWalkThrough_VS21010.docx"
Hasan
I am Working on Windows Vista, and have the following code:
#include <windows.h>
// ...
INT vint = NULL;
vint = LZOpenFile(lpFileName,lpReOpenBuf,wStyle);
When I build my program, it fails with linking errors:
fatal error LNK2019: unresolved external symbol _LZOpenFileW#12 referenced in function "int_stdcall LZOpenFile(wchar_t *,struct _OFSTRUCT *,unsigned short)" (?LZOpenFile##YGHPA_WPAU_OFSTRUCT##G#Z)
fatal error LNK1120: 1 unresolved externals
Help me to resolve this problem... Thanks in Advance....
You need to link against Lz32.lib. Make sure you have this lib listed in your linking options.
thank you, Matthew Talbert
first select properties from solution explorer (right click),select linker options and then select command line options ,insert Lz32.lib on that place ......now build succeed without any fatal error......
To link against Lz32.lib in MS Visual 2008:
Project --> Properties
Then see in
--> Linker
--> Input
And in Additional Dependencies simply add Lz32.lib
What library should be included to use TransparentBlt?
This is VC98 (Visual Studio 6) linking to the Gdi32.lib. (Other GDI functions such as BitBlt link as expected), and the compilers compiles with out error or warning.
Even though the Gdi32.lib is included, yet the linker returns this error:
mtcombo.obj : error LNK2001: unresolved external symbol __imp__TransparentBlt#44
C:\Work\Montel\Targ2_12\guitest.exe : fatal error LNK1120: 1 unresolved externals
What am I missing?
AFAIK, you will need the Msimg32.lib
http://msdn.microsoft.com/en-us/library/ms532303(VS.85).aspx
Msimg32.lib
FYI you can search the functions on http://msdn.microsoft.com/library and at the bottom it will tell you what library you need.