Hi all - I recently did the folowing:
- Downloaded the BCI2000 Ver 3.0 sources
- Installed cmake
- Installed Visual Studio 9 (2008)
I subsequently invoked "Make VS2008 Project Files.bat" to generate the VC projects. Thereafter, I loaded ZERO_CHECK.vcproj and attempted to build. However, I am getting an enormous amount of link errors - unresolved external symbol. Following is an example:
>SockStream.obj : error LNK2019: unresolved external symbol _WSAStartup@8 referenced in function "protected: __thiscall streamsock::streamsock(void)" (??0streamsock@@IAE@XZ)
>SockStream.obj : error LNK2019: unresolved external symbol _WSACleanup@0 referenced in function "public: virtual __thiscall streamsock::~streamsock(void)" (??1streamsock@@UAE@XZ)
Any ideas as to what I may not have done/done wrong?
MS VC++ Build
-
- Posts: 58
- Joined: 08 Jun 2009, 12:42
Thanks Griff - I tried what you said to do - same problems. First 2 unresolved symbols follows:
3>SockStream.obj : error LNK2019: unresolved external symbol _WSAStartup@8 referenced in function "protected: __thiscall streamsock::streamsock(void)" (??0streamsock@@IAE@XZ)
3>SockStream.obj : error LNK2019: unresolved external symbol _WSACleanup@0 referenced in function "public: virtual __thiscall streamsock::~streamsock(void)" (??1streamsock@@UAE@XZ)
3>
3>SockStream.obj : error LNK2019: unresolved external symbol _WSAStartup@8 referenced in function "protected: __thiscall streamsock::streamsock(void)" (??0streamsock@@IAE@XZ)
3>SockStream.obj : error LNK2019: unresolved external symbol _WSACleanup@0 referenced in function "public: virtual __thiscall streamsock::~streamsock(void)" (??1streamsock@@UAE@XZ)
3>
-
- Posts: 23
- Joined: 12 Feb 2010, 04:08
The errors you present have to do with Winsock, a low-level socket implementation presented by Microsoft (WSA gives that away).
Normally Visual Studio should be able to locate these files automatically and add them to the path. Search your computer for a file called ws2_32.lib and see whether or not it's path is included in the standard VS settings (In the main screen of VS: Tools -> Options -> Projects and Solutions -> VC++ directories).
It basically looks like the standard paths are either incorrect (installed in the wrong place) or the standard windows includes are not present at all.
If the files for WinSock are present and you can fix the errors with WSA, other paths might also need fixing, so find out which libs your missing and make sure VS can find them.
In case you don't want all kinds of libraries and directories to be searched for all your projects, you could also try to modify the paths in the Project Properties (right click project -> properties -> Configuration Properties -> Linker -> (Additional Library Directories) and (... -> Linker -> Input -> Additional Dependencies)).
If you can't find the files for WinSock on your computer you probably need to install some extra packages for VS (reinstall VS or download new packages/frameworks). If you installed the express edition of VS2008, it could be that you're missing the platform SDK (platform as in Windows). That should be available for free from Microsoft.
Hope this gets you going!
Normally Visual Studio should be able to locate these files automatically and add them to the path. Search your computer for a file called ws2_32.lib and see whether or not it's path is included in the standard VS settings (In the main screen of VS: Tools -> Options -> Projects and Solutions -> VC++ directories).
It basically looks like the standard paths are either incorrect (installed in the wrong place) or the standard windows includes are not present at all.
If the files for WinSock are present and you can fix the errors with WSA, other paths might also need fixing, so find out which libs your missing and make sure VS can find them.
In case you don't want all kinds of libraries and directories to be searched for all your projects, you could also try to modify the paths in the Project Properties (right click project -> properties -> Configuration Properties -> Linker -> (Additional Library Directories) and (... -> Linker -> Input -> Additional Dependencies)).
If you can't find the files for WinSock on your computer you probably need to install some extra packages for VS (reinstall VS or download new packages/frameworks). If you installed the express edition of VS2008, it could be that you're missing the platform SDK (platform as in Windows). That should be available for free from Microsoft.
Hope this gets you going!
@dseebran:
I can reproduce the linker errors on a clean Windows installation but not on the one I'm normally using. It appears that the MSVC projects correctly list the Winsock and other dependencies on one system but not on the other. Unfortunately, I could not find the cause of this behavior but will go on researching and keep you updated.
Thanks for reporting the problem,
Juergen
I can reproduce the linker errors on a clean Windows installation but not on the one I'm normally using. It appears that the MSVC projects correctly list the Winsock and other dependencies on one system but not on the other. Unfortunately, I could not find the cause of this behavior but will go on researching and keep you updated.
Thanks for reporting the problem,
Juergen
@dseebran:
There was a change between CMake 2.8.0 and 2.8.1 that broke the way how BCI2000 used the Qt distribution inside its source tree.
I committed a fix in r2812--updating to the latest BCI2000 version, and re-running the "Make VS2008 Project Files" batch files from the build directory should now result in working MSVC project files.
Thanks again,
Juergen
There was a change between CMake 2.8.0 and 2.8.1 that broke the way how BCI2000 used the Qt distribution inside its source tree.
I committed a fix in r2812--updating to the latest BCI2000 version, and re-running the "Make VS2008 Project Files" batch files from the build directory should now result in working MSVC project files.
Thanks again,
Juergen
Who is online
Users browsing this forum: No registered users and 3 guests