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 / DarkNet & CLR?

Author
Message
kklouzal
15
Years of Service
User Offline
Joined: 15th May 2009
Location: Arizona
Posted: 8th Jul 2011 03:27
Hey everyone! I'm trying to make a CLR project for my server application and I can't get it to compile, I've managed to knock it down from 1500 errors to 6!!


Here is how my IDE is configured..
C/C++


Linker


I've tried to switch a bunch of these options around numerous times with no avail.. DarkNet used to have a .pdf file with the proper configuration information I can't seem to find it. Any suggestions?
Mr Bigglesworth
16
Years of Service
User Offline
Joined: 4th Mar 2008
Location:
Posted: 8th Jul 2011 06:36 Edited at: 8th Jul 2011 06:37
Well, your errors are that it cant "find" the comands or functions that you are using in your code. Those functions are:

forceCRTManifestRTM
native_dllmain_reason
native_vcclrit_reason
native_startup_state
native_startup_lock

You could try removing those to see if it works, although that might make more problems

You need to include the correct libraries or add the *.cpp files to your project (which ever one applys).
kklouzal
15
Years of Service
User Offline
Joined: 15th May 2009
Location: Arizona
Posted: 8th Jul 2011 07:02 Edited at: 9th Jul 2011 09:13
Those errors may be that I changed the project property /clr:pure to /clr

But when I put it back to /clr it gives me these 13 errors:



adding msvcmrt to ignore specific library makes things worse.. I haven't a clue what to do from here...thats why I'm posting

EDIT:
maybe if I could just have all the libraries I need to include and ignore that would help since that .pdf file seems to be missing from the latest release..

EDIT:EDIT:
OKAY!!! I've narrowed it down to the fact that I can't set the C/C++ Code Generation Runtime Library to /mt with any /clr options enabled
Set it to /no clr and it cries because it doesnt know how to make the forms fields buttons and such.
I have to have it set to /MD for it to work with /clr enabled...
Does this mean I need to use DarkNet's .dll file instead of trying to link it like this? I haven't a clue how to use a .dll file..

EDIT:EDIT:EDIT:
I'm thinking the only way this is going to be possible is to take the .dll approach and link it or whatever you do to incorporate a .dll file, if this is correct would someone please be able to explain to me how to do this?

THANK YOU ALL!
Michael P
18
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 10th Jul 2011 15:37
Not sure exactly what you are trying to do, you are trying to make a CLR plugin that will work with .NET languages? Or do you want to use managed C++?

If you want to mix managed and unmanaged code you need to set CLR to: 'Common Language Runtime Support (/clr)'. Also check that you have the .NET Framework SDK installed.

kklouzal
15
Years of Service
User Offline
Joined: 15th May 2009
Location: Arizona
Posted: 10th Jul 2011 20:33
Yes sir, trying to use managed c++, /clr is enabled but it cant get /mt set, I have to use /MD, if I try and set /mt it cries and says /mt and /clr are incompatible... So I'm thinking I have to use the .dll you provided and take that method to use DarkNet?
kklouzal
15
Years of Service
User Offline
Joined: 15th May 2009
Location: Arizona
Posted: 14th Jul 2011 03:30 Edited at: 14th Jul 2011 03:42
Am I going to have to find some other means of a network library? or maybe something other than managed code..?
Win32 API looks rough...

EDIT: I'm stuck on my project now... I've almost completed the game and server side as much as I can without having some of the DarkNet functions there help anyone? mike P have you been able to compile DarkNet on a windows forms app??? :/
Michael P
18
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 14th Jul 2011 22:16
If you are using pure managed C++, then this is CLR, so use the CLR DLL, there should be a way for you to do that.

Or if you can mix native and managed code then you could use the regular DLL and call the methods from that just like any ordinary DLL. And also you should be able to use the libraries although there is no debug library for visual studio 2008 because of a bug in VS which won't let that compile for some unknown reason.

kklouzal
15
Years of Service
User Offline
Joined: 15th May 2009
Location: Arizona
Posted: 14th Jul 2011 22:28 Edited at: 15th Jul 2011 02:07
When I ignore these libraries (libcmt;msvcprt)
It compiles but instantly crashes with this:
Debug Output:

When I ignore these libraries instead (libcmtd, msvcrt, atls)
It does not compile and I get these linker errors:

I can ignore (msvcmrt) with the latter
I get only this linker error, but for each of my form files:

So thats not the route..

This is all with Code Generation: Multi-Threaded DLL
and with or without including mikenet.lib && ws2_32.lib produces the same results..

BLEH!! It feels like were so close..

EDIT: EDIT: Mike, could you tell me specifically what libraries I must ignore in the compiler?
kklouzal
15
Years of Service
User Offline
Joined: 15th May 2009
Location: Arizona
Posted: 15th Jul 2011 03:01 Edited at: 15th Jul 2011 05:46
OKAY (sorry for the double posts)
New progress:
Setting:
Additional-Dependencies = ptrustm.lib mikenet.lib ws2_32.lib
Ignore Specific Library = msvcprt;libcmt;atls
gets rid of 'msvcm90.dll' from compiling into the project
but now I get a new error during compile:


EDIT: It compiles fine when I remove the
#include <MikeNet/FullInclude.h>
and the additional dependency libs if they're there when I'm trying
Michael P
18
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 18th Jul 2011 23:46
Quote: "This is all with Code Generation: Multi-Threaded DLL"

Needs to be Multi-threaded (not DLL).

kklouzal
15
Years of Service
User Offline
Joined: 15th May 2009
Location: Arizona
Posted: 19th Jul 2011 09:53
That's what I figured except CLR won't compile as Multi-Threaded (not dll)

Login to post a reply

Server time is: 2024-11-19 09:28:30
Your offset time is: 2024-11-19 09:28:30