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

Install failing on visual studio 2017 #14

Open
UHSL-Marcus opened this issue Jan 25, 2019 · 3 comments
Open

Install failing on visual studio 2017 #14

UHSL-Marcus opened this issue Jan 25, 2019 · 3 comments

Comments

@UHSL-Marcus
Copy link

UHSL-Marcus commented Jan 25, 2019

The install is failing on visual studio 2017, on windows 7. I get the following error:

[1/2] Linking CXX shared library clsocket-CMAKE\clsocket.dll
FAILED: clsocket-CMAKE/clsocket.dll clsocket-CMAKE/clsocket.lib 
cmd.exe /C "cd . && "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E vs_link_dll --intdir=clsocket-CMAKE\CMakeFiles\clsocket.dir --manifests  -- C:\PROGRA~2\MIB055~1\2017\PROFES~1\VC\Tools\MSVC\1414~1.264\bin\Hostx86\x86\link.exe /nologo clsocket-CMAKE\CMakeFiles\clsocket.dir\src\SimpleSocket.obj clsocket-CMAKE\CMakeFiles\clsocket.dir\src\ActiveSocket.obj clsocket-CMAKE\CMakeFiles\clsocket.dir\src\PassiveSocket.obj  /out:clsocket-CMAKE\clsocket.dll /implib:clsocket-CMAKE\clsocket.lib /pdb:clsocket-CMAKE\clsocket.pdb /dll /version:4.0 /machine:X86 /debug /INCREMENTAL  Ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib  && cd ."
RC Pass 1: command "rc /foclsocket-CMAKE\CMakeFiles\clsocket.dir/manifest.res clsocket-CMAKE\CMakeFiles\clsocket.dir/manifest.rc" failed (exit code 0) with the following output:
The system cannot find the file specified
ninja: build stopped: subcommand failed.
Install failed.
@lethosor
Copy link
Member

Is clsocket-CMAKE a folder you added? I don't recognize the name, and I'm pretty sure the repo path wouldn't show up in at least the first line.

@UHSL-Marcus
Copy link
Author

I renamed the project but nothing more. I managed to make it work by exporting the classes. I made this definition

#ifdef _SHARED
#define EXPORT __declspec(dllexport)
#else
#define EXPORT __declspec(dllimport)
#endif

And the exported the classes I needed. e.g.

class EXPORT CSimpleSocket {

As a side request, could you give UDP example? I can't get any packets to send in UDP mode.

@warmist
Copy link
Member

warmist commented Jan 28, 2019

I'm not sure if this is the same problem but i've had this happen a few times. The issue is that if you use the ".bat" file that sets up the paths for msvc it's missing the framework setting e.g. default:
%comspec% /k ""D:\Program Files\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"" x86
where as if you want to use "rc", "fxc" or other tools you need to use e.g:
%comspec% /k ""D:\Program Files\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"" x86 8.1

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