Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linking Error Windows VS2017 LNK2001: unresolved external symbol "char const * const Aws::Http::CONTENT_TYPE_HEADER" #908

Closed
jghankins opened this issue Jul 4, 2018 · 4 comments

Comments

@jghankins
Copy link

What platform/OS are you using?

Windows 64bit

What compiler are you using? what version?

qmake 3.1

What's your CMake arguments?

-G "Visual Studio 15 2017 Win64"

Can you provide a TRACE level log? (sanitize any sensitive information)

C:\Qt\Qt5.11.1\Tools\QtCreator\bin\jom.exe -f Makefile.Debug
link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /SUBSYSTEM:WINDOWS "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='' processorArchitecture=''" /MANIFEST:embed /OUT:debug\amazon.exe @d:\Users\jhankins\AppData\Local\Temp\1\amazon.exe.6992.31.jom
mainwindow.obj : error LNK2001: unresolved external symbol "char const * const Aws::Http::CONTENT_TYPE_HEADER" (?CONTENT_TYPE_HEADER@Http@Aws@@3PEBDEB)
debug\amazon.exe : fatal error LNK1120: 1 unresolved externals
jom: D:\Users\jhankins\Documents\dev\build-amazon-Desktop_Qt_5_11_1_MSVC2017_64bit-Debug\Makefile.Debug [debug\amazon.exe] Error 1120
jom: D:\Users\jhankins\Documents\dev\build-amazon-Desktop_Qt_5_11_1_MSVC2017_64bit-Debug\Makefile [debug] Error 2
13:36:55: The process "C:\Qt\Qt5.11.1\Tools\QtCreator\bin\jom.exe" exited with code 2.

@singku
Copy link
Contributor

singku commented Jul 5, 2018

Hello, looks like this is the same problem as #151. Could you please taking a look at the solution in that issue?

@singku
Copy link
Contributor

singku commented Jul 15, 2018

Hi,

  • If you use Nuget to pull AWS SDK for C++ libraries, you can update your package version to solve this problem.
  • If you build the libraries by yourself and specify compiler and linker options, you should define preprocessor macros USE_WINDOWS_DLL_SEMATICS and USE_IMPORT_EXPORT.
  • If you use CMake to generate solution file, you can use find_package(AWSSDK required) to correctly locate and link against AWS SDK for C++ libraries. Taking a look at this example

@singku
Copy link
Contributor

singku commented Jul 15, 2018

Reopen if you still have problems.

@btgoodwin
Copy link

I've run into this same linking issue when building amazon-s3-gst-plugin. The build uses meson which seems to only be happy if we let it use pkg-config, which only becomes happy if we patch aws-sdk-cpp's pc files.

Do you all have any updated recommendations (seeing as this is from '18)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants