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

Visual Studio Linker Error LNK2019: unresolved external symbol public: static class EClientL0 #3

Closed
rholowczak opened this issue Jan 19, 2016 · 1 comment

Comments

@rholowczak
Copy link

Environment: MS Windows 7 Pro, Visual Studio 2013. TwsApiCpp version 9.71.
When we open the TwsApi.sln solution there is a "One way upgrade" that produces the following warnings (two examples - there are a total of 12):
..\Test_win32\Test.vcproj: Warning: The project file is being backed up to a relative path that differs from the original solution relative path. The difference in folder hierarchy may create problems in opening or building the backed up solution and project.
..\Test_win32\Test.vcproj: MSB8012: $(TargetPath) ('C:\Jts\TwsApiCpp\TwsApiC++\Test_win32.\Debug\Test.exe') does not match the Librarian's OutputFile property value '.\Debug\Test.exe' ('C:\Jts\TwsApiCpp\TwsApiC++_win32\Debug\Test.exe') in project configuration 'Debug|Win32'. This may cause your project to build incorrectly. To correct this, please make sure that $(TargetPath) property value matches the value specified in %(Lib.OutputFile).

Issue: When building the "Test" project in Visual Studio 2013 (and possibly in other versions of VS), the following error appears on linking:

error LNK2019: unresolved external symbol "public: static class EClientL0 * __cdecl EClientL0::New(class EWrapperL0 *)" (?New@EClientL0@@SAPAV1@PAVEWrapperL0@@@z) referenced in function _main C:\Jts\TwsApiCpp\TwsApiC++\Test_win32\Empty.obj Test

The solution appears to be:

  1. Open up the Test Project Properties and then navigate to Configuration Properties -> Linker -> General. Add the full path the Api folder in the Additional Library Directories. For exmaple: C:\Jts\TwsApiCpp\TwsApiC++\Api
  2. Open up the Test Project Properties and then navigate to Configuration Properties -> Linker -> Input. Add the TwsApi.lib file to the list that appears in Additional Dependencies.

I suspect it is just a matter of references to the Include and lib folders changing during the solution/project update to VS 2013.

@JanBoonen
Copy link
Owner

Indeed, this is a result of Visual Studio not correctly converting the project files of older versions. Probably, it should be closed?

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

2 participants