Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Linker problems

Author
Message
Michael P
18
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 26th Mar 2008 16:03
I'm having some problems getting a plugin (winsock: http://forum.thegamecreators.com/?m=forum_view&t=109593&b=22) to work in visual studio C++ 2008.

Firstly, will that plugin work with the latest version of DGDK and visual studio?

I understand from the thread that the project properties need to be set to Multi-threaded Debug (/MTd) and that the library needs to be included. I have done both of those steps. Now, what libraries to exclude? According to the MSDN library I need to do the following:

-Changed 'Project settings | Linker | Input | Ignore Specific Library' to 'libc.lib, libcmt.lib, msvcrt.lib, libcd.lib, msvcrtd.lib' (see link 1)
-Changed 'Project settings | Linker | System | Sub System' to 'Windows (/SUBSYSTEM:WINDOWS)'. (see link 2)

Link 1:
http://msdn2.microsoft.com/en-us/library/aa267384(VS.60).aspx

Link 2:
http://msdn2.microsoft.com/en-us/library/aa267384(VS.60).aspx

I did all of that, and still had linker errors. Fortunately, I randomly attempted Multi-threaded Debug (/MTd) whilst excluding the libraries: libc.lib, msvcrt.lib, libcd.lib, libcmtd.lib, msvcrtd.lib which are supposed to be excluded for Multithreaded (libcmt.lib); without debug. The programs compiled but with some warnings. Sadly, after trying to use strings fatal linker errors returned and the following debug appears when trying to compile:


That's about it; where am I going wrong?
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 26th Mar 2008 17:00
I'd suggest you use Winsock directly, seeing as it's available to you. Link with ws2_32.lib and include winsock2.h.

Winsock Reference

Michael P
18
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 26th Mar 2008 17:15
Jason said the same thing... tomorrow I'll have a go
Barnski
18
Years of Service
User Offline
Joined: 26th Jan 2006
Location: Switzerland, Zurich
Posted: 27th Mar 2008 13:17 Edited at: 27th Mar 2008 13:25
Michael P,

I just tried with VS2008 and the DarkGDK available from my Order History (with the beta update) and it worked. I did the following...

First, make sure GDK works:
1. create empty Win32 (visual c++) project
2. add new main.cpp file
3. copy example GDK code into main.cpp
4. Goto Tools->Options->Projects and Solutions->VC++ directories
5. make sure you set the include dir of GDK and the !DEBUG! directory of the libs (VS8Debug) (and the DirectX folders)
6. goto project settings (right click on your projectnode->properties)
7. set it to Multithreaded Debug (NOT dll)
6. compile and run the project (it should work without excluding any libs)

Add winsock library:
1. extract my winsock lib-pack to a folder (I refer to it as X)
2. goto project settings (right click on your projectnode->properties)
3. add X to the include directory (for the winsock_plugin.h)
4. add X to the lib directory (for the Barnski'sWinsockPlugin_debug.lib)
5. add "Barnski'sWinsockPlugin_debug.lib" to the additional libraries section in the Linker node
6. compile and run the project (it should work without excluding any libs)

This worked for me. It did give a lot of warnings about a missing Pd80 file for the GDK libs, but nevermind. And the line a lib could conflict with others can also be ignored (as long as it works).

Good luck to you whatever you decide to do!

edit: Thats the code I used to test it with (with strings):


Login to post a reply

Server time is: 2024-09-29 15:25:49
Your offset time is: 2024-09-29 15:25:49