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

When I try to build cl_dll with Visual Stuido 2015 #1702

Open
busbuyukefe opened this issue Jun 11, 2016 · 14 comments
Open

When I try to build cl_dll with Visual Stuido 2015 #1702

busbuyukefe opened this issue Jun 11, 2016 · 14 comments

Comments

@busbuyukefe
Copy link

busbuyukefe commented Jun 11, 2016

Problem solved.
@SamVanheer thanks for help.

@tschumann
Copy link

Yeah not sure - people have had trouble with the Source SDK and Visual Studio 2015 too. What's the first error? Or is that the whole compile log? Investigating Error C2668 'abs': ambiguous call to overloaded function might lead to something - the compiler should type promote or whatever so I'm not sure what's happening there.

@SamVanheer
Copy link

In VS2015 the fabs function is provided by the standard library, so the #define in cl_dll/cl_util.h needs to be commented out. Otherwise you end up with the declaration in cmath being replaced with the macro, which causes syntax errors.

Calls to abs() that use floats need to be replaced with fabs because abs only works with integers. The rest of the warnings can be dealt with as well, if you don't like them.

@SamVanheer
Copy link

Do you have a liblist.gam file in your mod directory?

@SamVanheer
Copy link

If that's the case the client dll is probably corrupted. That's the only reason it should fail to load it. Try a clean and rebuild, double check the list of errors to make sure nothing went wrong.

@SamVanheer
Copy link

SamVanheer commented Jun 12, 2016

Try adding "fallback_dir" "valve" to liblist.gam. I'm assuming you're still trying to load the client by replacing the default one.

EDIT:
Also, how are you running the game? If you're running it through Visual Studio, you'll have to set the project debugging settings properly so it launches the right executable and sets the correct working directory.

@SamVanheer
Copy link

I have no idea why this is happening. Could you try verifying the game's files and then trying again? Does the default client load? If so, is the name different in any way?

@SamVanheer
Copy link

That loads fine for me as well. If you're still having problems, try setting the platform toolset to v140_xp. You need to have Windows XP support installed for it to be available.

@SamVanheer
Copy link

Try launching it through Visual Studio. If you have the debugging settings set up correctly, it should launch the game and try to load the client. Then check the output window for any errors. If it reports anything missing, try to fix it.

@SamVanheer
Copy link

You need to launch the game in Visual Studio. To do that, you have to set up the debugging settings in the project's Debugging section. See this page for more information on that section: https://msdn.microsoft.com/en-us/library/kcw4dzyf.aspx

You'll have to point it to hl.exe, and if you're running a mod, add the -game parameter.

You'll also have to set the working directory to common/Half-Life in order for it to work correctly.

@SamVanheer
Copy link

Set the Command parameter to the exe path and filename, including the extension.

@SamVanheer
Copy link

So you can't even launch the game? Or is it launching and then failing to load?

@SamVanheer
Copy link

Is Steam running? If so, try running Visual Studio as an administrator. I've seen that error pop up when the game isn't run as admin, so it might work if you do that.

@SamVanheer
Copy link

Then i have no idea how to fix it. That error should only appear if the engine fails to initialize its connection with Steam itself, and as far as i know, that can only happen if Steam is not running or if the game doesn't have the privileges required to connect to it.

@SamVanheer
Copy link

What was the problem?

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