Help compiling UVNC - VS2005 & SDK 2003 R2 - 1 error left

Test the syntax here, shout, do whatever (discuss about the forum if you want ...) but please behave ;) ... and spam is not welcome

Help compiling UVNC - VS2005 & SDK 2003 R2 - 1 error le

Postby Puppet » 2006-08-17 21:59

This is my first post on this forum although I have read alot of post related to compiling.

I'm trying to compile winvnc.

I have VS2006 and SDK 2003 R2 installed and I've worked out several errors on my own and by using this forum. I've reached an end to the forums help from past posts. I hope someone could help me out as I've already tried to help myself.

I have Ultra VNC RC30 that I downloaded from SVN using the client. I have placed lib and include paths for the SDK first in my options. This helped things greatly.

My current error is :

Performing Pre-Link Event...
buildtime.cpp
Linking...
LINK : fatal error LNK1104: cannot open file 'atlthunk.lib'


I searched for the file in all locations on my drive and it doesn't even exist.

I hate to take up other peoples valuable time with this problem that is most likely one that my inexperience is causing.

Thank you all in advance for helping me with this problem and for the information I've already found and used from this forum.
Last edited by Puppet on 2006-08-18 15:00, edited 3 times in total.
The grass may not be greener on the other side, but it just might have less weeds...
.
;)
.
Puppet
20
20
 
Posts: 38
Joined: 2006-08-16 13:51
Location: US

Re: Compiling UVNC With VS2005 & SDK 2003 R2

Postby Puppet » 2006-08-18 14:57

Can someone please assist in resolving this error.

This is the only error I have remaining. 16 of the 17 projects in the solution build and produce release versions. I just need some help with this one error so winvnc compilation can also complete.

Thank you in advance.
Puppet
20
20
 
Posts: 38
Joined: 2006-08-16 13:51
Location: US

Re: Help compiling UVNC - VS2005 & SDK 2003 R2 - 1 erro

Postby Puppet » 2006-08-18 18:30

Anyone...hello???

Anybody there???

This error can't be one that stumps the forum. Can it?
Puppet
20
20
 
Posts: 38
Joined: 2006-08-16 13:51
Location: US

Re: Help compiling UVNC - VS2005 & SDK 2003 R2 - 1 erro

Postby redge » 2006-08-18 19:22

UltraVNC 1.0.9.6.1 (built 20110518)
OS Win: xp home + vista business + 7 home
only experienced user, not developer
redge
Super-Mod
Super-Mod
 
Posts: 6815
Joined: 2004-07-03 17:05
Location: Switzerland - Geneva

Re: Help compiling UVNC - VS2005 & SDK 2003 R2 - 1 erro

Postby Puppet » 2006-08-19 21:15

redge wrote:did you read it ?
Can anybody get UltraVNC 1.01 to compile?


Hi Redge.
Thank you very much for replying.

I have read that thread many times and acted upon the suggestions offered within. I will read it again in case I missed something directly related and helpful to solving this error.

I realize that there are not so many people using and have compiled using VS2005 and SDK 2003 R2. Those few will be of the developer class and I'm hoping that one of them can offer some help. I may have even caused my own problem since the projects had to be converted from VS6 to VS2005. I'm not sure.

I'll admit I'm not a developer but I'm also not a stranger to the coding and compiling world either. I have taken this as far as I feel I could and just need a little help from the experts.

I will check the thread you suggested again but if someone has an answer to this problem please post it.
Puppet
20
20
 
Posts: 38
Joined: 2006-08-16 13:51
Location: US

Re: Help compiling UVNC - VS2005 & SDK 2003 R2 - 1 erro

Postby Puppet » 2006-08-21 17:42

ok...I did some searching on MSDN. The atlthink.lib file has to do with 64 bit or 32 bit compiling.

Does this spark any thought ...

Has anyone else had this error. I can't be the only one.

Please advise what to do.
Puppet
20
20
 
Posts: 38
Joined: 2006-08-16 13:51
Location: US

Re: Help compiling UVNC - VS2005 & SDK 2003 R2 - 1 erro

Postby Puppet » 2006-08-22 11:30

Can anyone please help with this error...

I've read on this forum that future developement for Ultra vnc will be done with VC2005 . For those who have already made the switch to this platform can you please offer some helpfull suggestions as to what can be done to overcome this error. I'm new to VS2005 and the 32 bit vs. 64 bit scenario and in need of some assistance. thank you in advance.
Puppet
20
20
 
Posts: 38
Joined: 2006-08-16 13:51
Location: US

Re: Help compiling UVNC - VS2005 & SDK 2003 R2 - 1 erro

Postby Rudi De Vos » 2006-08-22 12:19

I never had the error when compiling on VS2005. (full version)
ATL nor MFC is used by ultravnc.

Did you auto converted the project or created it lanual, looks like a project
setting error.

For VS2005, use the latest SDK.

VC60 require SDK 2003, as the newer does not longer support VC60
Rudi De Vos
Admin & Developer
Admin & Developer
 
Posts: 5471
Joined: 2004-04-23 10:21

Re: Help compiling UVNC - VS2005 & SDK 2003 R2 - 1 erro

Postby Puppet » 2006-08-22 13:22

Rudi De Vos wrote:I never had the error when compiling on VS2005. (full version)
ATL nor MFC is used by ultravnc.

Did you auto converted the project or created it lanual, looks like a project
setting error.

For VS2005, use the latest SDK.

VC60 require SDK 2003, as the newer does not longer support VC60


Hi Rudi. I have read so many of your posts... this is almost like talking to Bill Gates right now.

Thank you for replying. I'm sorry I'm new to VS2005 and advanced programming like this. I don't want to take up too much of your time and thank you very very much for the help.

I have the full version of Visual Studio 2005 with SDK Windows 2003 R2.

I autoconverted - when I openned the project/solution VS2005 ask if I wanted to convert and I clicked yes. If you feel it is a project setting error please let me know what to try.

I have the ATL and MFC Directories listed in my directories list in the project. Should I remove them? I will try removing them until you reply to this.

Thank you again.
Puppet
20
20
 
Posts: 38
Joined: 2006-08-16 13:51
Location: US

Re: Help compiling UVNC - VS2005 & SDK 2003 R2 - 1 erro

Postby Puppet » 2006-08-22 13:58

I'm using RC30 source that I downloaded using svn client. I downloaded it because it was suggested in another post in another thread that this will have VS2005 project files.
Puppet
20
20
 
Posts: 38
Joined: 2006-08-16 13:51
Location: US

Re: Help compiling UVNC - VS2005 & SDK 2003 R2 - 1 erro

Postby Puppet » 2006-08-22 14:00

I removed the atl and mfc directories from the list of include directories and received multiple other errors when compiling hide desktop.cpp. The count was over a hundred. Below I pasted only some since many were redundant and a waste to paste them all.

The GOOD news is the atlthunk.lib not found error is gone!!

HideDesktop.cpp
c:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\include\atlalloc.h(80) : error C2065: 'LLONG_MIN' : undeclared identifier
c:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\include\atlalloc.h(80) : error C2057: expected constant expressionc:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\include\atlconv.h(1045) : error C3861: 'memcpy_s': identifier not found
c:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\include\atlconv.h(1061) : error C3861: 'memcpy_s': identifier not found
c:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\include\atlconv.h(1082) : error C3861: 'memcpy_s': identifier not found
c:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\include\atlchecked.h(30) : error C2146: syntax error : missing ';' before identifier 'AtlCrtErrorCheck'
c:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\include\atlchecked.h(30) : error C2433: 'errno_t' : 'inline' not permitted on data declarations
c:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\include\atlchecked.h(30) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\include\atlchecked.h(30) : error C2146: syntax error : missing ')' before identifier 'nError'
c:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\include\atlchecked.h(30) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\include\atlchecked.h(30) : error C2059: syntax error : ')'(72) : error C2039: 'wmemcpy_s' : is not a member of '`global namespace''
c:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\include\atlchecked.h(72) : error C2064: term does not evaluate to a function taking 1 arguments
c:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\include\atlchecked.h(77) : error C2039: 'memmove_s' : is not a member of '`global namespace''c:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\include\atlchecked.h(289) : error C2039: '_get_errno' : is not a member of '`global namespace''
c:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\include\atlchecked.h(289) : fatal error C1003: error count exceeds 100; stopping compilation


I'll remove the defualt alt and mfc directories too.
Puppet
20
20
 
Posts: 38
Joined: 2006-08-16 13:51
Location: US

Re: Help compiling UVNC - VS2005 & SDK 2003 R2 - 1 erro

Postby Rudi De Vos » 2006-08-22 14:42

Correct.... ultravnc is using some mfc code, forgot it....
Didn't wrote that nice code, topbar in fullscreen mode.

So you need to put it back.

If you are using the express version, atl is not supported.
You can try...

Go to the \include\atl folder under the PSDK directory, and:
in atlbase.h around line 300 change the block around "#pragma include atlthunk.lib" to:
[...]
};
#pragma pack(pop)

/*
PVOID __stdcall __AllocStdCallThunk(VOID);
VOID __stdcall __FreeStdCallThunk(PVOID);

#define AllocStdCallThunk() __AllocStdCallThunk()
#define FreeStdCallThunk(p) __FreeStdCallThunk(p)

#pragma comment(lib, "atlthunk.lib")
*/

// workaround for not having atlthunk.lib in PSDK or VC++ 2005 Express Edition
#define AllocStdCallThunk() HeapAlloc(GetProcessHeap(),0,sizeof(_stdcallthunk))
#define FreeStdCallThunk(p) HeapFree(GetProcessHeap(), 0, p)

#elif defined (_M_AMD64)
#pragma pack(push,2)

[...]in atlwin.h around line 1753, replace "for(i = 0;" with "for(int i = 0;"
Rudi De Vos
Admin & Developer
Admin & Developer
 
Posts: 5471
Joined: 2004-04-23 10:21

Re: Help compiling UVNC - VS2005 & SDK 2003 R2 - 1 erro

Postby Puppet » 2006-08-22 16:28

.
Hi Rudi and thank you again for your great assistance.

I don't understand why I'm having these troubles with the full VS2005 Pro version but the code changes you posted did the job!! :)

I made the modifications like you suggested, put the atl and mfc directories back in and also had to add,
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib\IA64, to the directories list because another lib was not found but the error for this missing .lib was past the atlthunk.lib error which had gone away.

I think and hope these posts and this thread will help other people in the future as more move to the VC '05 platform (express or full). .
.
.
Last edited by Puppet on 2006-08-28 13:41, edited 1 time in total.
The grass may not be greener on the other side, but it just might have less weeds...
.
;)
.
Puppet
20
20
 
Posts: 38
Joined: 2006-08-16 13:51
Location: US

Re: Help compiling UVNC - VS2005 & SDK 2003 R2 - 1 erro

Postby redge » 2006-08-22 17:49

someone are ready to create the step by step ready to compile for newers without reading all the topic.
(I'm not interested, i'm just end user and support level usage nor programming)
UltraVNC 1.0.9.6.1 (built 20110518)
OS Win: xp home + vista business + 7 home
only experienced user, not developer
redge
Super-Mod
Super-Mod
 
Posts: 6815
Joined: 2004-07-03 17:05
Location: Switzerland - Geneva

Re: Help compiling UVNC - VS2005 & SDK 2003 R2 - 1 erro

Postby Puppet » 2006-08-28 13:39

redge wrote:someone are ready to create the step by step ready to compile for newers without reading all the topic.
(I'm not interested, i'm just end user and support level usage nor programming)


Hi redge!

I'll gladly post my configuration for compiling with the platform that I'm using to contribute to the project. I thought I would be able to post the configuration and the steps but the code compiles but doesn't execute.

I have a problem with the release version that I was going to start a new thread for but thought instead to continue here in case others have or will experience it as they move to the same compiling environement.

I hope some very experienced ultra vnc developers read this post and maybe offer some help. I don't stand much of a chance to work out this problem alone. I'll check over my settings, directories, etc., incase I have done something wrong or to cause this . . . which is very likely.

After compiling successfully, I tried to run the winvnc and it crashes upon startup.

I get the following error:

An unhandled win32 exception occured in winvnc.exe [1824].

I'm not well versed in advanced programming to figure out the cause or how to correct it.

I do get a unique warning while compiling the omnithread library that may point to the cause of this crash. The warning is:

------ Build started: Project: omnithread, Configuration: Release Win32 ---
Compiling...
nt.cpp
.\nt.cpp(484) : warning C4297: 'omni_thread_wrapper' : function assumed not to throw an exception but does
The function is extern "C" and /EHc was specified
Creating library...
Build log was saved at "file://c:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\Projects\UltraVNC-SVN_RC30\winvnc\omnithread\Release\BuildLog.htm"
omnithread - 0 error(s), 1 warning(s)


I'm going to try debug instead of release to see if I gain additional information.
Last edited by Puppet on 2006-08-28 17:12, edited 1 time in total.
Puppet
20
20
 
Posts: 38
Joined: 2006-08-16 13:51
Location: US

Re: Help compiling UVNC - VS2005 & SDK 2003 R2 - 1 erro

Postby Puppet » 2006-08-28 17:07

This is the debug output:

The thread 'Win32 Thread' (0xa38) has exited with code 0 (0x0).
Unhandled exception at 0x00000000 in winvnc.exe: 0xC0000005: Access violation reading location 0x00000000.

It probably doesn't help much but for completeness sake I thought I'd post it.
Last edited by Puppet on 2006-08-28 17:13, edited 2 times in total.
Puppet
20
20
 
Posts: 38
Joined: 2006-08-16 13:51
Location: US

Re: Help compiling UVNC - VS2005 & SDK 2003 R2 - 1 erro

Postby Puppet » 2006-08-28 17:37

[syntax="c"] //
// Wrapper for thread creation.
//

extern "C"
#ifndef __BCPLUSPLUS__
unsigned __stdcall
#else
void _USERENTRY
#endif
omni_thread_wrapper(void* ptr)
{
omni_thread* me = (omni_thread*)ptr;

DB(cerr << "omni_thread_wrapper: thread " << me->id()
<< " started\n");

if (!TlsSetValue(self_tls_index, (LPVOID)me))
throw omni_thread_fatal(GetLastError());


//
// Now invoke the thread function with the given argument.
//

if (me->fn_void != NULL) {
(*me->fn_void)(me->thread_arg);
omni_thread::exit();
}

if (me->fn_ret != NULL) {
void* return_value = (*me->fn_ret)(me->thread_arg);
omni_thread::exit(return_value);
}

if (me->detached) {
me->run(me->thread_arg);
omni_thread::exit();
} else {
void* return_value = me->run_undetached(me->thread_arg);
omni_thread::exit(return_value);
}

// should never get here.
#ifndef __BCPLUSPLUS__
return 0;
#endif
}[/syntax]

I pasted the code from nt.cpp, as shown above, and hilighted line 484 in red. The if statement is true and an exception is thrown.

Moderated by redge at 2006-08-28 19:46:
replaced code by syntax=c
Last edited by Puppet on 2006-08-28 19:46, edited 2 times in total.
Puppet
20
20
 
Posts: 38
Joined: 2006-08-16 13:51
Location: US

Re: Help compiling UVNC - VS2005 & SDK 2003 R2 - 1 erro

Postby Puppet » 2006-08-28 18:27

I'll take any helpfull suggestions for resolving this problem.

I'm now looking through .h files and actually changed some code in nt.cpp. I changed it back of course because it made things worse. This is some advanced coding...very impressive. I wish I could code like this, maybe in time.

I must be doing something to cause this since it seems no one else has experienced this error. I probably won't be the last.

Any help or suggestions?
Puppet
20
20
 
Posts: 38
Joined: 2006-08-16 13:51
Location: US

Re: Help compiling UVNC - VS2005 & SDK 2003 R2 - 1 erro

Postby Puppet » 2006-08-28 20:21

Thanks redge. I just noticed the change you made. The code snippet I posted isn't double spaced anymore.
Puppet
20
20
 
Posts: 38
Joined: 2006-08-16 13:51
Location: US

Re: Help compiling UVNC - VS2005 & SDK 2003 R2 - 1 erro

Postby Puppet » 2006-08-28 22:26

I don't know if this helps any but I get the same message while in debug mode instead of release and also in version 1.0.1 of the source code not just RC30.


Compiling...
nt.cpp
.\nt.cpp(484) : warning C4297: 'omni_thread_wrapper' : function assumed not to throw an exception but does
The function is extern "C" and /EHc was specified


I think this warning is definately related to the crash of winvnc as soon as it starts.

Could it be the platform I'm using, VS2005 with SDK 2003 R2? What can I do to correct or work around?

The code compiles but doesn't run...

Has anyone seen this warning or problem?
Last edited by Puppet on 2006-08-29 13:44, edited 2 times in total.
Puppet
20
20
 
Posts: 38
Joined: 2006-08-16 13:51
Location: US

Re: Help compiling UVNC - VS2005 & SDK 2003 R2 - 1 erro

Postby Puppet » 2006-08-30 22:42

This may have soemthing to do with 32bit vs 64bit. It's just a guess but as I'm trying to find a solution for this, the issue comes up almost every time because ntdll.dll is involved.

Does this help at all??

Please help.
Puppet
20
20
 
Posts: 38
Joined: 2006-08-16 13:51
Location: US

Re: Help compiling UVNC - VS2005 & SDK 2003 R2 - 1 erro

Postby Puppet » 2006-09-01 16:24

I tried replacing PSDK Windows Server 2003 R2 with PSDK Windows 2003 Server SP1. Although uninstall and installs were completely successfull, the change in SDKs did not help. The warning message wich prevents winvnc.exe from starting still comes up while compiling:

Compiling...
nt.cpp
.\nt.cpp(484) : warning C4297: 'omni_thread_wrapper' : function assumed not to throw an exception but does The function is extern "C" and /EHc was specified


I can't believe I'm the only one getting this error. There must be someone who has experienced this. Please, if you know how to resolve this problem post your knowledge.

I'm using:

Visual Studio 2005 Pro (Full installation)
PSDK Windows 2003 Server R2
Desktop OS is XP SP1 (I don't think the desktop OS makes any difference but I'm including it's version for completeness...)

I really am trying to figure this out on my own but I'm not doing so well. Although I've learned much so far, I don't have enough knowledge and skill to fix this problem.

Please, can someone offer some assistance ?? :cry:

I don't know if this is allowed and redge, the moderator, will edit this offer out if it's not allowed but I can offer the VS2005 Pro CDs on an ftp server for whoever can help me solve this successfully. :wink:

There should be an emoticon of a gun to the head and the trigger about to be pulled.
Last edited by Puppet on 2006-09-01 16:24, edited 2 times in total.
Puppet
20
20
 
Posts: 38
Joined: 2006-08-16 13:51
Location: US

Re: Help compiling UVNC - VS2005 & SDK 2003 R2 - 1 erro

Postby Puppet » 2006-09-06 18:46

Anyone have any ideas??

Any help to solving this problem is very much appreciated. I really need to get this to compile AND run.
Puppet
20
20
 
Posts: 38
Joined: 2006-08-16 13:51
Location: US

Re: Help compiling UVNC - VS2005 & SDK 2003 R2 - 1 error le

Postby Tobiasgar » 2011-08-25 06:54

Does anyone know whether the final VS 2005 SP1 can be installed over the beta, or whether that's even necessary? :surprise:
Tobiasgar
 
Posts: 1
Joined: 2011-08-25 06:50

Re: Help compiling UVNC - VS2005 & SDK 2003 R2 - 1 error le

Postby Rudi De Vos » 2011-08-25 08:33

Compiling...
nt.cpp
.\nt.cpp(484) : warning C4297: 'omni_thread_wrapper' : function assumed not to throw an exception but does The function is extern "C" and /EHc was specified


This is a warning, not an error.
winvnc compile fine with this warning unless you have your compiler set to stop on warnings.
turn off "Warnings as Errors" -WX
Rudi De Vos
Admin & Developer
Admin & Developer
 
Posts: 5471
Joined: 2004-04-23 10:21

Re: Help compiling UVNC - VS2005 & SDK 2003 R2 - 1 error le

Postby B » 2011-08-25 10:40

Rudi, the thread's 5 years old, resuscitated by a possible spammer. I'm going to lock it.
B
Super-Mod
Super-Mod
 
Posts: 2347
Joined: 2009-09-09 14:05


Return to Off topic posts (Sandbox)

Who is online

Users browsing this forum: No registered users and 1 guest