Can't compile samples

Can't compile samples

I am trying to compile the samples in vs 2010, but I keep getting linker errors. I have tried several approaches suggested in the forums (compiler option /MDd etc), but that does not resolve it. Here are some of the errrors. Thanks for your help. Error 1 error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string,class std::allocator >::basic_string,class std::allocator >(class std::basic_string,class std::allocator > const &)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z) referenced in function _ADP_Initialize C:\Program Files (x86)\Intel\Intel Atom Developer Program SDK\0.91\Samples\c\AdpHelloWorld\adpcored.lib(adpcore.obj) AdpHelloWorld Error 2 error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string,class std::allocator >::basic_string,class std::allocator >(class std::basic_string,class std::allocator > const &)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z) C:\Program Files (x86)\Intel\Intel Atom Developer Program SDK\0.91\Samples\c\AdpHelloWorld\adpcored.lib(ADPSoapProxy.obj) AdpHelloWorld Error 3 error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string,class std::allocator >::basic_string,class std::allocator >(class std::basic_string,class std::allocator > const &)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z) C:\Program Files (x86)\Intel\Intel Atom Developer Program SDK\0.91\Samples\c\AdpHelloWorld\adpcored.lib(ADPXmlWriter.obj) AdpHelloWorld
16 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Submission - Have you been able to validate your application developed with Visual Studio 2010?

Hi yosun,

The SDK that we provide developers is not yet supported on Visual Studio 2010. Only Visual Studio 2008 is currently supported. Refer to this link for more information: http://appdeveloper.intel.com/en-us/article/intel-atom-developer-program-software-development-kit-beta-3-release-notes

You may use Visual Studio 2010 and manage to develop your applications, however in case you are getting any errors while using VS2010, we may not be able to advise you as VS2010 is not yet supported.

We recommend that you use Visual Studio 2008 for developing your applications.

Regards
Rooven

Intel Technical Support
Intel® Atom™ Developer Program
Intel AppUp(SM) Center

Regards,
DG Rooven

did you use /NODEFAULTLIB in the compiler options?

Can you post compiler command line for this project?

It looks as if your project is not linking to the CRT runtime resulting in the "unresolved external symbol" errors.

As Dmitry stated setting the option to "ignore all default libraries" will cause this behavior. Please ensure that this is not the case.

Right click on your project and choose Properties. From the properties window select Configuration Properties -> Linker -> Input Section

Thanks for your responses.

I tried different options for "Ignore default libraries" but that did not change the behavior

Here is my command line from the linker section

/OUT:"C:\Program Files (x86)\Intel\Intel Atom Developer Program SDK\0.91\Samples\c\Debug\AdpHelloWorld.exe" /INCREMENTAL /NOLOGO /LIBPATH:"../../../lib" /LIBPATH:"C:\Program Files (x86)\Intel\Intel Atom Developer Program SDK\0.91\lib" "adpcored.lib" "psapi.lib" "shlwapi.lib" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib" /MANIFEST /ManifestFile:"Debug\AdpHelloWorld.exe.intermediate.manifest" /ALLOWISOLATION /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"C:\Program Files (x86)\Intel\Intel Atom Developer Program SDK\0.91\Samples\c\Debug\AdpHelloWorld.pdb" /SUBSYSTEM:CONSOLE /PGD:"C:\Program Files (x86)\Intel\Intel Atom Developer Program SDK\0.91\Samples\c\Debug\AdpHelloWorld.pgd" /TLBID:1 /DYNAMICBASE /NXCOMPAT /MACHINE:X86 /ERRORREPORT:QUEUE

Anesh,

Have you modified the example prior to attempting to compile?
What OS are you using?

Although Visual Studio 2010 is not supported by Intel at this time I see no reason why we cannot get this to work. I will go ahead and test this out on a fresh copy of Visual Studio 2010 and let you know what I find. In the meantime, I suggest that you use Visual Studio 2008 for ATOM SDK development.

Appreciate your prompt response.

No, I have not made any changes myself. vs 2010 upgrade wizard did the conversion and I suppose it made some changes. I will take a fresh copy of the samples and try it again.

windows 7 ultimate x64 (I know that's not supported as well)

I will try to find vs 2008.

Anesh,

You can download a 90 day trial of Visual Studio 2008 Pro here: http://www.microsoft.com/downloads/details.aspx?FamilyID=83c3a1ec-ed72-4a79-8961-25635db0192b&displaylang=en

In any case, it will be interesting to see if it is the upgrade wizard, VS 2010 itself or a configuration issue which caused the errors. I will be looking into this further today. Please report back the results of you test with fresh samples.

I am hitting the same problem with fresh set of samples.

I have been looking around and I wonder if I am hitting the issue talked about in
http://social.msdn.microsoft.com/Forums/en/vcpluslanguage/thread/0d88ad8f-c1a5-4a42-8f5e-96c488914263 ?

Anesh,

That may be, I will know more shortly. VS 2010 installation on VM image underway now.

Anesh,

I have a solution for you. Let me start out by saying that Visual Studio 2010 uses CRT Runtime version 10 by default. The ATOM SDK is statically linked to the CRT Runtime version 9. This is the root cause of the errors that you pasted earlier. Nothing can be done to force the ATOM SDK to work when referenced from a Visual Studio 2010 project using the version 10 of the CRT Runtime. The fix is however simple:

1.) Right click on your project in the solution explorer (example: ) and choose properties
2.) Navigate to 'Configuration Properties' -> General
3.) Change the value of 'Platform Toolset' from 'v10' to 'v90'
* Please ensure version 9 of the CRT Runtime is installed (it will be if you also have Visual Studio 2008 installed)
4.) Click the 'Ok' button and recompile

You can now use the Visual Studio 10 IDE. Note that it is not currently a supported IDE for the ATOM SDK, and as such may present validation issues. Should you submit an application developed using it, please share with everyone your submission results. Please let me know if you have any trouble.

Output:

1>------ Rebuild All started: Project: AdpHelloWorld, Configuration: Debug Win32 ------
1>Build started 5/28/2010 3:10:51 PM.
1>_PrepareForClean:
1> Deleting file "Debug\AdpHelloWorld.lastbuildstate".
1>InitializeBuildStatus:
1> Creating "Debug\AdpHelloWorld.unsuccessfulbuild" because "AlwaysCreate" was specified.
1>ClCompile:
1> AdpHelloWorld.c
1>ResourceCompile:
1> Microsoft (R) Windows (R) Resource Compiler Version 6.1.6723.1
1>
1> Copyright (C) Microsoft Corporation. All rights reserved.
1>
1>
1>ManifestResourceCompile:
1> Microsoft (R) Windows (R) Resource Compiler Version 6.1.6723.1
1>
1> Copyright (C) Microsoft Corporation. All rights reserved.
1>
1>
1>Manifest:
1> Deleting file "Debug\AdpHelloWorld.exe.embed.manifest".
1> Microsoft (R) Windows (R) Resource Compiler Version 6.1.6723.1
1>
1> Copyright (C) Microsoft Corporation. All rights reserved.
1>
1>
1>LinkEmbedManifest:
1> AdpHelloWorld.vcxproj -> C:\Program Files\Intel\Intel Atom Developer Program SDK\0.91\Samples\c\Debug\AdpHelloWorld.exe
1>FinalizeBuildStatus:
1> Deleting file "Debug\AdpHelloWorld.unsuccessfulbuild".
1> Touching "Debug\AdpHelloWorld.lastbuildstate".
1>
1>Build succeeded.
1>
1>Time Elapsed 00:00:03.34
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========

Thank you very much for your prompness, patience and efforts.

I am currently getting vs 2008installed on different machine and will try it from there esp. considering the comments you have made about vs 2010 and validation. If I pursue vs 2010 I will add my findings to the forum.

Thanks again

My pleasure, I look forward to seeing your apps in AppUp. Best of luck.

I am using the twitter example and I changed from v100 to v90, and here is my output:

1>------ Build started: Project: TwitterExampleApplication, Configuration: Debug Win32 ------
2>------ Build started: Project: TwitterExampleComponent, Configuration: Debug Win32 ------
2>LINK : fatal error LNK1181: cannot open input file '..\XMLLite\lib\XmlLite.lib'
1> stdafx.cpp
1>c:\users\harp\desktop\sites\appup\twitter example\twitterexampleapplication\stdafx.h(20): fatal error C1083: Cannot open include file: 'afxwin.h': No such file or directory
========== Build: 0 succeeded, 2 failed, 0 up-to-date, 0 skipped ==========

any possible solution?

Good morning,

The errors you pasted are saying that they cannot find the required library/header files. You will want to search your hard drive for the location of:

XmlLite.lib
afxwin.h

Then adjust your Compiler and Linker Settings to point to the correct path, and rebuild.

Leave a Comment

Please sign in to add a comment. Not a member? Join today