Update: UltraVNC 1.4.3.6 and UltraVNC SC 1.4.3.6: https://forum.uvnc.com/viewtopic.php?t=37885
Important: Please update to latest version before to create a reply, a topic or an issue: https://forum.uvnc.com/viewtopic.php?t=37864

Join us on social networks and share our announcements:
- Website: https://uvnc.com/
- GitHub: https://github.com/ultravnc
- Mastodon: https://mastodon.social/@ultravnc
- Facebook: https://www.facebook.com/ultravnc1
- X/Twitter: https://x.com/ultravnc1
- Reddit community: https://www.reddit.com/r/ultravnc
- OpenHub: https://openhub.net/p/ultravnc

compiling 10951

User avatar
Rudi De Vos
Admin & Developer
Admin & Developer
Posts: 6863
Joined: 2004-04-23 10:21
Contact:

Re: zlib-1.2.5: Bug Fix VS2008

Post by Rudi De Vos »

My PC
intel i7 ( 4X cores with ht)
OS ssd in raid0
LAN 1gb wired and 300MB WIfi

I guess we also can exlude this one...

sockets are sync, no async

All initial communication is done in a single thread
start_undetached(); split the viewer of

Code: Select all

void ClientConnection::Run()
{
	havetobekilled=false;
	forcedexit=false;
	// Get the host name and port if we haven't got it
	if (m_port == -1) 
	{
		GetConnectDetails();
		// sf@2002 - DSM Plugin loading if required
		LoadDSMPlugin(false);
	}
	else
	{
		LoadDSMPlugin(false);
		// sf@2003 - Take command line quickoption into account
		HandleQuickOption();
	}

	// add user option on command line
	if ( (strlen(	m_pApp->m_options.m_cmdlnUser) > 0) && !m_pApp->m_options.m_NoMoreCommandLineUserPassword) // Fix by Act
		strcpy(m_cmdlnUser, m_pApp->m_options.m_cmdlnUser);

	// Modif sf@2002 - bit of a hack...and unsafe
	if ( (strlen(	m_pApp->m_options.m_clearPassword) > 0) && !m_pApp->m_options.m_NoMoreCommandLineUserPassword)
		strcpy(m_clearPasswd, m_pApp->m_options.m_clearPassword);

	if (saved_set)
	{
		saved_set=FALSE;
		Save_Latest_Connection();
	}

	GTGBS_CreateDisplay();
	GTGBS_CreateToolbar();
	CreateDisplay();

	DoConnection(); // sf@2007 - Autoreconnect - Must be done after windows creation, otherwise ReadServerInit does not initialise the title bar...

	//adzm 2009-06-21 - if we are connected now, show the window
	ShowWindow(m_hwndcn, SW_SHOW);

	// adzm - 2010-07 - Fix clipboard hangs - watch the clipboard now that our message pump will not be blocking on connection
	WatchClipboard();

	Createdib();
	SizeWindow();

	// This starts the worker thread.
	// The rest of the processing continues in run_undetached.
	LowLevelHook::Initialize(m_hwndMain);
	start_undetached();  [color=red]<<<<<<<<<<<split thread[/color]	
	EndDialog(m_hwndStatus,0);
}

Code: Select all

void ClientConnection::DoConnection()
{
	havetobekilled=true;
	// Connect if we're not already connected
	if (m_sock == INVALID_SOCKET) 
		if (strcmp(m_proxyhost,"") !=NULL && m_fUseProxy) 
			ConnectProxy();
		else
			Connect();

	SetSocketOptions();

	SetDSMPluginStuff(); // The Plugin is now activated BEFORE the protocol negociation 
						 // so ALL the communication data travel through the DSMPlugin

	if (strcmp(m_proxyhost,"")!=NULL && m_fUseProxy)
		NegotiateProxy();

	NegotiateProtocolVersion();

	std::vector<CARD32> current_auth;
	Authenticate(current_auth);

//	if (flash) {flash->Killflash();}
	SendClientInit();

	ReadServerInit();

	CreateLocalFramebuffer();

	SetupPixelFormat();

    SetFormatAndEncodings();

	reconnectcounter=m_reconnectcounter;
	
	havetobekilled=false;;
}
Louis
40
40
Posts: 64
Joined: 2008-09-13 20:43

Re: zlib-1.2.5: Bug Fix VS2008

Post by Louis »

Rudi,

We are looking into the same part of the code, somewhere area the problem must be.

I was just wondering about things like:
- which proceses / threads are there
- what is their task
- bij which task / main programm are they started

Also looking into codeparts which surprise me, but that can be due that looking at the naming I make a false assumtion about their task


Take this piece of code I was just lloking at when I recieved your mail
I just added some comment without furher analyses so perhaps completely stupid


// sf@2007 - Autoreconnect
void ClientConnection::DoConnection()
{
havetobekilled=true;
// Connect if we're not already connected
if (m_sock == INVALID_SOCKET)
if (strcmp(m_proxyhost,"") !=NULL && m_fUseProxy)
ConnectProxy();
else
Connect();
>> LVB I hope that the connect clears the recieve buffer
We create the socket, buffer is allocated by the OS.
They only can contain data send from server, and if it caontain data
we need it.


>> LVB hum, seems to be the first thing to do before the connect
The socket options we use can be set after connect, the function also initilase the stream, this require the socket. SetSocketOptions();

SetDSMPluginStuff(); // The Plugin is now activated BEFORE the protocol negociation
// so ALL the communication data travel through the DSMPlugin

>> LVB OK

if (strcmp(m_proxyhost,"")!=NULL && m_fUseProxy)
NegotiateProxy();

NegotiateProtocolVersion();
>> OK


std::vector<CARD32> current_auth;
Authenticate(current_auth);
>> OK

// if (flash) {flash->Killflash();}

>> add clear recieve buffer
>> don't forget to set the default buffer soutable for jumbo frames (at definition)
You can't clear the buffer, if buffer contain data it is send by the server and need to be handled. Also removing any data will break encryption
( all data is streaming, remove a single bit break sync)


SendClientInit();
ReadServerInit();

>> Why here ??
CreateLocalFramebuffer();
Function is absoluted, it put a mutex lock on the buffer... could be removed.
Last edited by Louis on 2011-03-06 23:48, edited 1 time in total.
Louis
40
40
Posts: 64
Joined: 2008-09-13 20:43

Re: zlib-1.2.5: Bug Fix VS2008

Post by Louis »

Rudi,

Some comments to the code you posted (can be stupid)

void ClientConnection::Run()

{

havetobekilled=false;

forcedexit=false;

// Get the host name and port if we haven't got it

if (m_port == -1)

{

GetConnectDetails();

// sf@2002 - DSM Plugin loading if required

LoadDSMPlugin(false);

}

else

{

LoadDSMPlugin(false);
>> LVB strange is in both if and else ==> so should no be here
The if/else execute AB CA,order, if AB AC also works it can be place before the if/else
// sf@2003 - Take command line quickoption into account

HandleQuickOption();

}



// add user option on command line

if ( (strlen( m_pApp->m_options.m_cmdlnUser) > 0) && !m_pApp->m_options.m_NoMoreCommandLineUserPassword) // Fix by Act

strcpy(m_cmdlnUser, m_pApp->m_options.m_cmdlnUser);



// Modif sf@2002 - bit of a hack...and unsafe

if ( (strlen( m_pApp->m_options.m_clearPassword) > 0) && !m_pApp->m_options.m_NoMoreCommandLineUserPassword)

strcpy(m_clearPasswd, m_pApp->m_options.m_clearPassword);



if (saved_set)

{

saved_set=FALSE;

Save_Latest_Connection();

}



GTGBS_CreateDisplay();

GTGBS_CreateToolbar();

CreateDisplay();



DoConnection(); // sf@2007 - Autoreconnect - Must be done after windows creation, otherwise ReadServerInit does not initialise the title bar...
>> strange I would assume that do connect is in the conneciotn thread where I would expect the display in the main program/ thread
Connect require display color settings, and display require server dimensions. On start, threads would need to wait, just a lot simpler
to split after both can run independed.


//adzm 2009-06-21 - if we are connected now, show the window

ShowWindow(m_hwndcn, SW_SHOW);
>> strange the doconnect halfway the window actions
Could be removed, not needed

// adzm - 2010-07 - Fix clipboard hangs - watch the clipboard now that our message pump will not be blocking on connection

WatchClipboard();
>> hope that this is not the clipboard but a vncviewer storage area
This is the real viewer clipboard, server and viewer share the clipboard,
the viewer is added to the clipboard chain.


Createdib();

SizeWindow();
>> again the actions window and connection related completely mixed up, I just do not understand


>> I think the intention of the thread below is to trap ?? or send ?? controls to ?? or from ?? the server

// This starts the worker thread.

// The rest of the processing continues in run_undetached.

LowLevelHook::Initialize(m_hwndMain);
The Hook allow to block special keypresses and send them remote.
Else the window key would always be local.

start_undetached(); <<<<<<<<<<<split thread
Split of the communication, function need to continue to start the viewer
messagepump
EndDialog(m_hwndStatus,0);

}

>> do not understand that at all, Why is that function a separate thread, does not seems to make sence at all

>> did already comment on part of the code below
Code:
void ClientConnection::DoConnection()

{

havetobekilled=true;

// Connect if we're not already connected

if (m_sock == INVALID_SOCKET)

if (strcmp(m_proxyhost,"") !=NULL && m_fUseProxy)

ConnectProxy();

else

Connect();



SetSocketOptions();



SetDSMPluginStuff(); // The Plugin is now activated BEFORE the protocol negociation

// so ALL the communication data travel through the DSMPlugin



if (strcmp(m_proxyhost,"")!=NULL && m_fUseProxy)

NegotiateProxy();



NegotiateProtocolVersion();



std::vector<CARD32> current_auth;

Authenticate(current_auth);



// if (flash) {flash->Killflash();}

SendClientInit();



ReadServerInit();



CreateLocalFramebuffer();



SetupPixelFormat();



SetFormatAndEncodings();



reconnectcounter=m_reconnectcounter;



havetobekilled=false;;

}
Last edited by Louis on 2011-03-07 00:03, edited 1 time in total.
Louis
40
40
Posts: 64
Joined: 2008-09-13 20:43

Re: compiling 10951

Post by Louis »

Rudi,

Something completly else. I suddenly realized that almost all subroutines I saw, "do not have parameters" huuuueeee .........

They have of course but most constants and variables seems to be global .........

Something beeing their for over ten year probably, but ...... not a good idea any way.


Louis
User avatar
Rudi De Vos
Admin & Developer
Admin & Developer
Posts: 6863
Joined: 2004-04-23 10:21
Contact:

Re: compiling 10951

Post by Rudi De Vos »

Louis,

Source is cpp, this is an object oriented language.
Parameters are defined at class level and can be used by class members.
Take a look at clientconnection.h
The class isolation make it thread save, there exist only a few global vars
like localization chars and command_line.
-----------------

You should be run it in a debugger to see why some thing happen at certain places.

I tried to add some comment to you comment.
User avatar
Rudi De Vos
Admin & Developer
Admin & Developer
Posts: 6863
Joined: 2004-04-23 10:21
Contact:

Re: compiling 10951

Post by Rudi De Vos »

I'm almost 95% sure the problem is on the server site.
Server should always send...
begin
subupdate1 (size,position)
subupdate1 (data)
subupdate2 (size,position)
subupdate2 (data)
subupdate3 (size,position)
subupdate3 (data)
end
server messages
begin
...
end

If something trigger a server message insite the loop
server send
subupdate2 (size,position)
subupdate2 (data)
server message
subupdate3 (size,position)

viewer read
subupdate2 (size,position)
subupdate2 (data)
subupdate3 (size,position) <<<<size is wrong, it's the actual server message data...

The server use a lot of threads, and send can be called from different ,
if some mutex protection fail some strange things can happen..
The viewer is simple, communication happen in a single thread and recv
is serialized.
Louis
40
40
Posts: 64
Joined: 2008-09-13 20:43

Re: compiling 10951

Post by Louis »

Rudi,

Is this link perhaps related to the debug issue I/we have?

http://leptonica.org/vs2008doc/building ... aries.html

Something else .. unlikely but ..... You use an intel CPU my cpu is AMD ...
As I said unlikely ....

Louis
Louis
40
40
Posts: 64
Joined: 2008-09-13 20:43

Re: compiling 10951

Post by Louis »

Rudi,

A few things:
- As you know I can build a debug64 version, however
- when trying to build a x64 release version I get a fatal error

7>S:\UltraVNC\vncviewer\buildtime.cpp : fatal error C1083: Cannot open compiler generated file: 'Release\buildtime.obj': No such file or directory
7>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(108,5): error MSB3073: The command "cl /nologo /MT /FoRelease\ /FdRelease\ /c buildtime.cpp
7>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(108,5): error MSB3073: :VCEnd" exited with code 1.
7>
7>Build FAILED.
7>
7>Time Elapsed 00:00:26.92
========== Rebuild All: 6 succeeded, 1 failed, 0 skipped ==========


Further on (minor):
- the viewer allway show win32 (also when it is a x64 version)
- the copy right is still 2010
- IMHO it would be better to de fine a version string constant,
I find e.g. version info evevery where in the code

Major:
// sf@2009 - Sanity check
if (bufsize < 0 || bufsize > 104857600) // 100 MBytes max
{
//LVB20110306
MessageBox(NULL, "DEBUG Sanity check: bufsize > 100 MByte!" , NULL, NULL);

The buffer creation and or test and or test moment is really one of the
issues


Louis
User avatar
Rudi De Vos
Admin & Developer
Admin & Developer
Posts: 6863
Joined: 2004-04-23 10:21
Contact:

Re: compiling 10951

Post by Rudi De Vos »

The project options in the source you download are correct.
I don't see how the option can be wrong in your download while it
compile proper on a VirtualPC image ( fresh installed)

This article is taking about mixing release and debug builds.
and multi threaded dll / non dll builds.

Settings are set for each subproject
project properties->configuration properties->c++->code generation
Louis
40
40
Posts: 64
Joined: 2008-09-13 20:43

Re: compiling 10951

Post by Louis »

Rudi,

a few points:

strange
- I can compile the viewer again. However .... I did see strange effects yesterday. Do not understand at all why they are gone now
- I noticed yesterday that I had to compile the project in a certain order
(I had to compile the debug version, before I could compile the release version). Very strange .... Even more that it is OK today ....
- also got an impression ...... that VS might be using computer related settings

Top VS GUI select Debug x64
Solution explorer window
select SOlution
Select vncviewer
Right click and select Rebuild all
Ouput should look like this
1>------ Rebuild All started: Project: zlibstat, Configuration: Debug x64 ------
2>------ Rebuild All started: Project: zip32, Configuration: Debug x64 ------
3>------ Rebuild All started: Project: unz32lib, Configuration: Debug x64 ------
4>------ Rebuild All started: Project: omnithread, Configuration: Debug x64 ------
1> adler32.c
2> api.c
1> compress.c
1> crc32.c
1> deflate.c
1> gzclose.c
1> gzlib.c
1> gzread.c
1> gzwrite.c
1> infback.c
1> inffas8664.c
1> inffast.c
1> inflate.c
1> inftrees.c
1> ioapi.c
1> trees.c
1> uncompr.c
1> unzip.c
1> zip.c
5>------ Rebuild All started: Project: rdr, Configuration: Debug x64 ------
6>------ Rebuild All started: Project: libjpeg, Configuration: Debug x64 ------
A hint please(1)
- I needed some extra functions, so I added a class (lib with my funcions/subs), called LVB
- I compiled a testfunction; That worked
- at a certain moment I had a compile problem and I removed the class
- problem is that it is clear to me how to add a class, but not how to get rid of it .....
- I removed the related LVB.cpp and LVB.h files and did expect that to work, since I was not refering to those files, however

when compiling that instance of the code set I get the following error

7>Log.cpp(150): warning C4267: 'argument' : conversion from 'size_t' to 'DWORD', possible loss of data
7> LowLevelHook.cpp
7> LVB.cpp
7>c1xx : fatal error C1083: Cannot open source file: 'LVB.cpp': No such file or directory
7> MessBox2.cpp

How do I get rid of the non existing reference !!!!????
How should I remove a class ? Seems so simple "just select and push delete (but that is not allowed)

Just select the files in the solution explorer,LVB.cpp and lvb.h
and press delete. NOt in the class view, but the solution explorer


A hint please(2)
- I did want to output a number as part of a string
- and I was shocked to discover that C++ does not native support string vars
- and what is this simple in VB:
- "this is string number: " & CStr(counter) or alternative
- "this is string number: " & counter.tostring
Seems to be far more difficult in C++
- how would your code look?

char szText[256];
int a=0;
sprintf(szText," some text %i \n", a);




Last point and most sevire one
- still can not use the debugger
- I do not even know what is wrong with the binary
- I wonder if you could put a zip/rar on the website containing all compiled versions (release + debug 32 and 64 bit) of that troublesome Zlib files
- I could perhaps use tham as a replacement for the localy generated files which seems to be wrong.
- just as a very dirty workarround of course. We need a good solution as well.
- or perhaps, if it does not work ... the problem might be on a diffenrend place than we are thinking now ......

I can not extract zlib,all generated files goes in
same folder.
Copied
H:\ultravnc_195\UltraVNC Project Root\UltraVNC\vncviewer\X64
This contain the release and debug build for all files

http://www.uvnc.eu/download/X64.zip


Louis
Last edited by Louis on 2011-03-08 20:29, edited 1 time in total.
Louis
40
40
Posts: 64
Joined: 2008-09-13 20:43

Re: compiling 10951

Post by Louis »

Thanks!

- Up to now I compiled the files via menu build => rebuid solution ant that 4 times (32bit / 64 bit and debug/release)
- do have the feeling that it not different here (still 4 actions and not onle one :(

- Yeaah you where damn right, I tried to delete if from the class view

- the text tratment, OK still very very clumsy compared with VB

- something wrong with the ZIP it looks like if it is not there (or perhaps not accessable)


Louis
Louis
40
40
Posts: 64
Joined: 2008-09-13 20:43

Re: compiling 10951

Post by Louis »

Thanks! Zip downloaded.

I will test later this week. I do not have time tomorrow,


Louis
Louis
40
40
Posts: 64
Joined: 2008-09-13 20:43

Re: compiling 10951

Post by Louis »

Rudi,

My intention was to use the libjpeg.lib as generated on your machine as substitude for the one generated on my machine which seems to fail.

However the zip does not include de libjpeg directory.

First thing to check however is if the MD5's are identical (hoping the build does not include a date or so which changes the MD5).

For info the MD5 of the libjpeg.lib as just generated on my system

MD5 checksum of "S:\UltraVNC\libjpeg\x64\Debug\libjpeg.lib" :
07 63 70 e9 c8 06 b1 fe 60 4c 3b 51 2a 4f 3b a8

Please check jours and put your libjpeg dir including generated files online


Louis
Louis
40
40
Posts: 64
Joined: 2008-09-13 20:43

Re: compiling 10951

Post by Louis »

Rudi,

I hope to solve the zlib related debug blokking binairy format issue. As a temporairely step:
- I would like to check if the md5 sum of the debug binairys as compiled by jou reaaly differ (if the problem is what the message sugest)
- and if so temporarely use your zlib debug binairys as a work arround for the problem

As described in previeus mail.

If you have other sugestions how to tackle / find the problem. More than welcome.


Louis
Louis
40
40
Posts: 64
Joined: 2008-09-13 20:43

Re: compiling 10951

Post by Louis »

Rudi,

I discoverd that beside visual studio2010, you also need to install
- DirectX SDK (and incude that directorys in UVNC) and ....
- you also need to install windows 7.1 SDK (x86,x64,Itanium)
'because of
"S:\UltraVNC\zlib-1.2.5\contrib\vstudio\vc10\zlibstat.vcxproj : warning : Platform 'Itanium' referenced in the project file 'zlibstat' cannot be found. Please make sure you have it installed under '%VCTargetsPath%\Platforms\Itanium'. "

I still have problems related to zlib. You have to (batch) build it in a certain order. Do not know how / which one
(S:\UltraVNC\zlib-1.2.5\contrib\vstudio\vc10)

Still problems like

Touching "x86\TestZlibDllDebug\Tmp\testzlibdll.unsuccessfulbuild".
ClCompile:
testzlib.c
c1 : fatal error C1083: Cannot open source file: '..\..\testzlib\testzlib.c': No such file or directory

since that does not work, compiling UVNC viewer does noet work as well
1>LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/PROFILE' specification
1>LINK : fatal error LNK1181: cannot open input file 'S:\UltraVNC\winvnc\winvnc\Debug\libjpeg-turbo-win.lib'
1>
1>Build FAILED.

------------------

When starting from a fresh "tarball"
- having VS2010 profesional, DXSDK en WINSDK (7.1) installed,
- (C:\Program Files\Microsoft SDKs\Windows\v7.1)
I can build the viewer but still can not debug it. It might be related to references to 7.0A WIN SDK elsewere.
- (C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A)

So, let put it this way, assuming that you can just download, compile and debug, is a bit optimistic ..........

Despite major effort, I did not jet manage :(


Louis
User avatar
Rudi De Vos
Admin & Developer
Admin & Developer
Posts: 6863
Joined: 2004-04-23 10:21
Contact:

Re: compiling 10951

Post by Rudi De Vos »

I donwnloaded it myself.
Made a new virtual image,
-installed VS
(custom install, select c++ and removed all other)
-installed Directx SDK
-Updated INclude/lib for Directx

Loaded vncviewer.sln and pressed compiled.

I realy don't understand the need to download all other SDK's.
VS2010 maintain the SDK's with is auto update function.

libjpeg-turbo-win.lib: This is not used by the viewer, but this is a server
library. The viewer use the standard jpeglib.
testzlib.c: we don't use this file

Are you staring with the correct sln file
Image
Does it look the same ?
Image
Framework contain the relation between the differnt projects, build
order is auto set by the framework
Image
Image
Last edited by Rudi De Vos on 2011-03-12 23:28, edited 2 times in total.
Louis
40
40
Posts: 64
Joined: 2008-09-13 20:43

Re: compiling 10951

Post by Louis »

Rudi,

Thanks for all. I noticed one perhaps important difference within your example being you are starting VS with ^vncviewer.sln^ file where I was starting with ^vncviewer.vcxproj^.

However it did not solve my compiling problems.

So I decided to a releavively radical step, being to reinstall my computer based on a clean backup from half a year ago (took me one day :>).

After doint that:
- I applied VS2010 express C++ (as extra on VS2010 VB allready there)
- VS2010 SP1
- Direct X SDK (to C:\Program Files (x86)\Microsoft DirectX SDK leaving version string away in the path)
- fresh copy of UVNC files

More or less it did not work because the VS express version is crippled / does not have e.g. the x64 and itanium compilers.

To compensate for that I installed the three windows 7.1 SDK's GRMSDK_EN_DVD(_X86).iso, GRMSDKIAI_EN_DVD(_Itanium).iso, GRMSDKX_EN_DVD(_X64).iso as downloaded from MS

However I am facing problems:
- can not add the required extra reference and lib paths (direct X)
- when continuing trying to build the vncviewer:
1>------ Build started: Project: zip32, Configuration: Debug x64 ------
1>Error: The "ConfigurationGeneral" rule is missing from the project.
etc

when trying to debug, the old zlib related problems:
- libjpeg - debug 64 project out of date
- would you like to build it
- again configuration general rule is missing from project

So, still problems all over :<

Looks like I need to use / buy the VS ultimate edition (at least the profesional edition) to build the project.

I am not going to do that.
I can perhaps reinstall the trail version.

When using the visual basic version, I never runned into this kind of problems.

Microsoft seems to have taken special care to the C++ edition to make sure that you have to buy the payed version, if you want to do serieus things.

Not sure that you can not make it working using the express version in combination with the mentioned Windows and DirectX SDK's. Not sure however if it is worth the trouble!!!

Also not sure it solves the zlib problems, it all started with


Louis
User avatar
Rudi De Vos
Admin & Developer
Admin & Developer
Posts: 6863
Joined: 2004-04-23 10:21
Contact:

Re: compiling 10951

Post by Rudi De Vos »

The vncviewer.vcxproj is the proj for vncviewer without the library's or
relation between them. You just loaded one part.

Yes, then you have trouble, because you need to build your own relation between all parts.

You realy need to use the solution project, to import the framework
with all required libs dependency's etc...


I understand now why you had a lot of trouble compiling it, adding all other parts manual, building order etc isn't done in 5 minutes.
Louis
40
40
Posts: 64
Joined: 2008-09-13 20:43

Re: compiling 10951

Post by Louis »

Rudi,

It might be true that I tried to compile too much, but problem stays even when using the ^vncviewer.sln^

Debug x64 (or32) start ==>
- libjpeg - debug out of date
- would you like to rebuild it

1>------ Build started: Project: libjpeg, Configuration: Debug x64 ------
1>Error: The "ConfigurationGeneral" rule is missing from the project.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

- and ... no way yet (for me) .... to make it running

Sincerely,


Louis
User avatar
Rudi De Vos
Admin & Developer
Admin & Developer
Posts: 6863
Joined: 2004-04-23 10:21
Contact:

Re: compiling 10951

Post by Rudi De Vos »

All your problems has to with with an incorrect install of the compiler.
Possible mixing express/full is breaking it.

libjpeg is the standard jpeg lib
http://gnuwin32.sourceforge.net/packages/jpeg.htm

I can't help with the compiler issue's.
Again, out of the box on a fresh installed XP/Vista or WIN7
-install visual studio 2010 ( non express)
-Directx SDK
- update path for directx
-press compile...

I installed it many times to (VirtualPC) be able to debug on different OS's.
Louis
40
40
Posts: 64
Joined: 2008-09-13 20:43

Re: compiling 10951

Post by Louis »

Rudi,

I have been very bussy last days, but after restoring a backup, appling latest updates from every thing (followed by generation of a new backup) I have been installing:
- visual studio 2010 express (was allready on the original backup)
- direcx sdk
- windows sdk
- visual studio profesional trail
- visual studio SP1

I still have the old problem "libjpeg.lib" unrecognised or unsupported binary format.

I am almost sure there is something wrong within the zlib project, just do not know what (solving the problem is the next step).

When creating the lib a log is created. I copied the log below (sorry do not know how to attach a file in this blog). I hope it gives you a clou.


Sincerely,


Louis


Build started 16-3-2011 21:22:10.
1>Project "S:\UltraVNC\libjpeg\libjpeg.vcxproj" on node 2 (build target(s)).
1>InitializeBuildStatus:
Creating "x64\Debug\libjpeg.unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\x86_amd64\CL.exe /c /Zi /nologo /W3 /WX- /Od /D WIN32 /D _DEBUG /D _LIB /D _CRT_SECURE_NO_WARNINGS /D _MBCS /Gm /EHsc /RTC1 /MTd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"x64\Debug\\" /Fd"x64\Debug\vc100.pdb" /Gd /TC /errorReport:prompt jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jmemmgr.c jmemnobs.c jquant1.c jquant2.c jutils.c
jutils.c
jquant2.c
jquant1.c
jmemnobs.c
jmemmgr.c
1>jmemmgr.c(306): warning C4267: '+=' : conversion from 'size_t' to 'long', possible loss of data
1>jmemmgr.c(366): warning C4267: '+=' : conversion from 'size_t' to 'long', possible loss of data
1>jmemmgr.c(976): warning C4267: '-=' : conversion from 'size_t' to 'long', possible loss of data
1>jmemmgr.c(990): warning C4267: '-=' : conversion from 'size_t' to 'long', possible loss of data
jidctred.c
jidctint.c
jidctfst.c
jidctflt.c
jfdctint.c
jfdctfst.c
jfdctflt.c
jerror.c
jdtrans.c
jdsample.c
jdpostct.c
jdphuff.c
jdmerge.c
jdmaster.c
jdmarker.c
Generating Code...
Compiling...
jdmainct.c
jdinput.c
jdhuff.c
jddctmgr.c
jdcolor.c
jdcoefct.c
jdatasrc.c
jdatadst.c
jdapistd.c
jdapimin.c
jctrans.c
jcsample.c
jcprepct.c
jcphuff.c
jcparam.c
jcomapi.c
jcmaster.c
jcmarker.c
jcmainct.c
jcinit.c
Generating Code...
Compiling...
jchuff.c
jcdctmgr.c
jccolor.c
jccoefct.c
jcapistd.c
jcapimin.c
Generating Code...
Lib:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\x86_amd64\Lib.exe /OUT:"x64\Debug\libjpeg.lib" /NOLOGO /MACHINE:X64 x64\Debug\jcapimin.obj
x64\Debug\jcapistd.obj
x64\Debug\jccoefct.obj
x64\Debug\jccolor.obj
x64\Debug\jcdctmgr.obj
x64\Debug\jchuff.obj
x64\Debug\jcinit.obj
x64\Debug\jcmainct.obj
x64\Debug\jcmarker.obj
x64\Debug\jcmaster.obj
x64\Debug\jcomapi.obj
x64\Debug\jcparam.obj
x64\Debug\jcphuff.obj
x64\Debug\jcprepct.obj
x64\Debug\jcsample.obj
x64\Debug\jctrans.obj
x64\Debug\jdapimin.obj
x64\Debug\jdapistd.obj
x64\Debug\jdatadst.obj
x64\Debug\jdatasrc.obj
x64\Debug\jdcoefct.obj
x64\Debug\jdcolor.obj
x64\Debug\jddctmgr.obj
x64\Debug\jdhuff.obj
x64\Debug\jdinput.obj
x64\Debug\jdmainct.obj
x64\Debug\jdmarker.obj
x64\Debug\jdmaster.obj
x64\Debug\jdmerge.obj
x64\Debug\jdphuff.obj
x64\Debug\jdpostct.obj
x64\Debug\jdsample.obj
x64\Debug\jdtrans.obj
x64\Debug\jerror.obj
x64\Debug\jfdctflt.obj
x64\Debug\jfdctfst.obj
x64\Debug\jfdctint.obj
x64\Debug\jidctflt.obj
x64\Debug\jidctfst.obj
x64\Debug\jidctint.obj
x64\Debug\jidctred.obj
x64\Debug\jmemmgr.obj
x64\Debug\jmemnobs.obj
x64\Debug\jquant1.obj
x64\Debug\jquant2.obj
x64\Debug\jutils.obj
libjpeg.vcxproj -> S:\UltraVNC\libjpeg\x64\Debug\libjpeg.lib
FinalizeBuildStatus:
Deleting file "x64\Debug\libjpeg.unsuccessfulbuild".
Touching "x64\Debug\libjpeg.lastbuildstate".
1>Done Building Project "S:\UltraVNC\libjpeg\libjpeg.vcxproj" (build target(s)).

Build succeeded.

Time Elapsed 00:00:01.82



[/img]
Louis
40
40
Posts: 64
Joined: 2008-09-13 20:43

Re: compiling 10951

Post by Louis »

Rudi,

From some where on the web (http://www.toymaker.info/Games/html/64_bit.html), quite old but so is the zlib code, may be related


Visual Studio 2003 does not support debugging 64 bit applications so I just created a release 64 bit configuration. You need to specify the target machine. This has to be specified in the linker command line box:

/machine:AMD64

For Intel development use: /machine:AI64

Another issue is that you cannot run the 64 bit version from within Visual Studio. You get an 'Unable to start debugging' message with: 'The specified file is an unrecognised or unsupported binary format'.

This all makes developing 64 bit applications in Visual Studio 2003 a bit of a pain. You have lost the great debugger and so have to resort to log files and printf style output to track down bugs. One very useful setting is under C++ / General in the Visual Studio project property pages called 'Detect 64 bit Portability Issues'. I would advise having this ticked for all development as I found it very useful in spotting cases where type size changes may cause issues. I also enabled asserts in release mode to help track down problems.
Louis
40
40
Posts: 64
Joined: 2008-09-13 20:43

Re: compiling 10951

Post by Louis »

Louis
40
40
Posts: 64
Joined: 2008-09-13 20:43

Re: compiling 10951

Post by Louis »

User avatar
Rudi De Vos
Admin & Developer
Admin & Developer
Posts: 6863
Joined: 2004-04-23 10:21
Contact:

Re: compiling 10951

Post by Rudi De Vos »

Visual studio 2010 debug/compile w32 and X64
Visual studio 2008 debug/compile w32 and X64
If installed on a x64 system.

Itanium -> AI64
All other intel and amd 64bit cpu -> amd64
Louis
40
40
Posts: 64
Joined: 2008-09-13 20:43

Re: compiling 10951

Post by Louis »

Rudi,

I think that the intention of your last replay was to point to a certain setting.

I looked at several places, but do not know where to find that setting (assuming that was what you where hinting at).


Louis
Louis
40
40
Posts: 64
Joined: 2008-09-13 20:43

Re: compiling 10951

Post by Louis »

Rudi,

I just tried to debug S:\UltraVNC\zlib-1.2.5\contrib\vstudio\vc10\zlibstat.vcxproj.

It compiles, but despite the compiler message the output file si not there.

It is probably related. Also see my mail in that forum for more info.

I also searched for the file, but did not find it at all.


Louis
Louis
40
40
Posts: 64
Joined: 2008-09-13 20:43

Re: compiling 10951

Post by Louis »

Ruid,

I just
- downloaded the latest tarbal
- installed nasm and added path
- did include references to my directx sdk path

And tryied to compile (build)

1>------ Build started: Project: omnithread, Configuration: Debug x64 ------
1>Build started 3-4-2011 11:28:54.
1>InitializeBuildStatus:
1> Creating "x64\Debug\omnithread.unsuccessfulbuild" because "AlwaysCreate" was specified.
1>ClCompile:
1> nt.cpp
1>nt.cpp(472): warning C4297: 'omni_thread_wrapper' : function assumed not to throw an exception but does
1> The function is extern "C" and /EHc was specified
1>Lib:
1> omnithread.vcxproj -> S:\UltraVNC\vncviewer\omnithread\x64\Debug\omnithread.lib
1>FinalizeBuildStatus:
1> Deleting file "x64\Debug\omnithread.unsuccessfulbuild".
1> Touching "x64\Debug\omnithread.lastbuildstate".
1>
1>Build succeeded.
1>
1>Time Elapsed 00:00:00.51
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========




tryied to compile (rbuild)

7> vncauth.c
7> minilzo.c
7> d3des.c
7> Generating Code...
7>PreLinkEvent:
7> Description: Setting build time...
7> buildtime.cpp
7>S:\UltraVNC\vncviewer\buildtime.cpp : fatal error C1083: Cannot open compiler generated file: 'Debug\buildtime.obj': No such file or directory
7>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(108,5): error MSB3073: The command "cl /nologo /MTd /FoDebug\ /FdDebug\ /c buildtime.cpp
7>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(108,5): error MSB3073: :VCEnd" exited with code 1.
7>
7>Build FAILED.
7>
7>Time Elapsed 00:00:38.01
========== Rebuild All: 6 succeeded, 1 failed, 0 skipped ==========


So, I regrete but still can not compile the package and of couse alsso not debug it.


Louis
Louis
40
40
Posts: 64
Joined: 2008-09-13 20:43

Re: compiling 10951

Post by Louis »

Rudi,

I tried again to compile the latest sources.
I installed NASM and included the path.

I am quite sure there are (small) mistakes in the make files (what ever you call them here).

As example when compiling the viewer, I get the following error message

7> Generating Code...
7> vncauth.c
7> minilzo.c
7> d3des.c
7> Generating Code...
7>PreLinkEvent:
7> Description: Setting build time...
7> buildtime.cpp
7>S:\UltraVNC\vncviewer\buildtime.cpp : fatal error C1083: Cannot open compiler generated file: 'Debug\buildtime.obj': No such file or directory
7>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(108,5): error MSB3073: The command "cl /nologo /MTd /FoDebug\ /FdDebug\ /c buildtime.cpp
7>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(108,5): error MSB3073: :VCEnd" exited with code 1.

Fact is that the linker is looking into the wrong map. The 'Debug\buildtime.obj' is infact in x64\debug

I do not know how to correct it, but in general it so much easier for you to check ....... I think .......... but not 100% sure given the past discussions

In general, you must be using configsettings, or precompiled files generated by earlier studioversion all probalbly made over time.

That is the only way I can come up with that you can compile ....... and I am figthing to get it working.

Louis
Post Reply