Installation problem within winXPSP2 + VC++6

Hello all,
I’m planning to use CInt in a custom project(not ROOT), but before than that I have to manage to install it.
My projetc is to use Cint as scripting language to be integrated with my code.
My OS is windowsXP sp.2, I have Microsoft Visual C++ 6.0.
Below ther are the steps I followed to try to install CInt
I downloaded cint5.15.tar.gz, from root.cern.ch/root/Cint.html, I extracted in c:\cint.

I set the environment variabiles in system properties/advanced/environment variabiles, I have verified that in the cmdline them were set (echo %cintsysdir%)
Has ran vcvars32, from a shell, uncommenting the vcsource line and setting it properly
c:\cint>echo %vcsource%
"\Program Files\Microsoft Visual Studio\VC98\bin"
Then I went with the commandline to the “c:\cint\platform\visualCpp6” directory and ran setupXp.bat.

The copying and compiling step went well, but the linking gave me some error, below there is the part of the output that shows the error
cl.exe /nologo /MD /w /W0 /GX /O2 /I “…” /I “…” /I “…\lib\iccst
rm” /I “…\lib\stdstrct” /D “NDEBUG” /D “WIN32” /D “_WINDOWS” /D “G__NEWSTDHE
ADER” /D “G__VISUAL” /D “G__WIN32” /D “G__SHAREDLIB” /D “G__REDIRECTIO” /D “G__P
2FCAST” /Fp".\Release\libcint.pch" /YX /Fo".\Release\" /Fd".\Release\" /FD /c
…\WINNT.C
WINNT.C
link.exe @C:\DOCUME~1\MACQUA~1\LOCALS~1\Temp\nma02680.
Creating library .\Release\libcint.lib and object .\Release\libcint.exp
CALLFUNC.OBJ : error LNK2001: unresolved external symbol _G__exec_bytecode
FUNC.OBJ : error LNK2001: unresolved external symbol _G__exec_bytecode
IFUNC.OBJ : error LNK2001: unresolved external symbol _G__exec_bytecode
STRUCT.OBJ : error LNK2001: unresolved external symbol _G__exec_bytecode
DISP.OBJ : error LNK2001: unresolved external symbol _G__bc_disp_vtbl
ERROR.OBJ : error LNK2001: unresolved external symbol _G__bc_throw_runtime_error
ERROR.OBJ : error LNK2001: unresolved external symbol _G__bc_throw_compile_error
IFUNC.OBJ : error LNK2001: unresolved external symbol _G__bc_compile_function
IFUNC.OBJ : error LNK2001: unresolved external symbol _G__bc_exec_normal_bytecode
IFUNC.OBJ : error LNK2001: unresolved external symbol _G__bc_exec_ctor_bytecode
IFUNC.OBJ : error LNK2001: unresolved external symbol _G__bc_Baseclassctor_vbase
IFUNC.OBJ : error LNK2001: unresolved external symbol _G__bc_exec_virtual_bytecode
IFUNC.OBJ : error LNK2001: unresolved external symbol _G__bc_VIRTUALADDSTROS
NEW.OBJ : error LNK2001: unresolved external symbol _G__bc_new_operator
NEW.OBJ : error LNK2001: unresolved external symbol _G__bc_delete_operator
OPR.OBJ : error LNK2001: unresolved external symbol _G__bc_cancel_VIRTUALADDSTROS
PARSE.OBJ : error LNK2001: unresolved external symbol _G__exec_asm
PAUSE.OBJ : error LNK2001: unresolved external symbol _G__bc_setdebugview
PAUSE.OBJ : error LNK2001: unresolved external symbol _G__bc_showstack
SCRUPTO.OBJ : error LNK2001: unresolved external symbol _G__bc_delete_vtbl
STRUCT.OBJ : error LNK2001: unresolved external symbol _G__bc_struct
VAR.OBJ : error LNK2001: unresolved external symbol _G__bc_REWINDSTACK
VAR.OBJ : error LNK2001: unresolved external symbol _G__bc_conversion
VAR.OBJ : error LNK2001: unresolved external symbol _G__Isvalidassignment_val
VAR.OBJ : error LNK2001: unresolved external symbol _G__bc_assignment
VAR.OBJ : error LNK2001: unresolved external symbol _G__bc_objassignment
.\Release\libcint.dll : fatal error LNK1120: 23 unresolved externals
NMAKE : fatal error U1077: ‘link.exe’ : return code '0x460’
Stop.

Which mistake do I made?
Thanks in advance for any help
Bye

Hi,

please use the new page root.cern.ch/twiki/bin/view/ROOT/CINT (I will make sure that the old page forwards to the new one). CINT now uses a configure script to build; for windows you will probably have to install cygwin or MSYS to get GNU make and a bash shell.

Cheers, Axel.

Thank you Axel, Ill’give it a try.
To use cygwin wich components of it shall I download?
I saw that the installer is a shell to download others components…
In the platform dorectory for cygwin51 there is only a .def file, and no readme, correct?
Sorry for the ignorance, I’m not a *nix specialist…

Hi all,
I’ve downloaded cygwin and the config + make command gave me this output:

PC461 /cygdrive/c/cint
$ configure --arch=msvc7

Writing Makefile.conf…
Writing inc/configcint.h…
Done.
Run “make” to build cint.
Run “make help” to see the available build targets.

PC461 /cygdrive/c/cint
$ make
make -C src
make[1]: Entering directory /cygdrive/c/cint/src' cl -I../inc -O2 -G5 -MD -nologo -wd4996 -GX -GR -wd4181 -DG__CINTBODY -DG__REDI RECTIO -DG__SHAREDLIB -DG__UNIX -DG__WIN32 -DVISUAL_CPLUSPLUS -DG__NEWSTDHEADER -DG__HAVE_CONFIG -DG__NOMAKEINFO -c Api.cxx make[1]: *** [Api.obj] Error 53 make[1]: Leaving directory/cygdrive/c/cint/src’
make: *** [libcint.dll] Error 2

PC461 /cygdrive/c/cint
$

It’s probably a stupid error, but I’m unable to get out from it.
A doubt: it’s correct to use as architecture msvc7?
I put this since I have to integrate it with my project who is written with this IDE and compiled with it.
Then I’ll have to integrate it with kdevelop and this will be another problem…:wink:
thanks for any help

Hi,

well, the real problem is that there still is no documentation on the new build system. Sorry about that. From cygwin you’ll need make and bash. Then edit C:\cygwin\cygwin.bat and insert right on top

Start cygwin and call (the parts behind ‘#’ are my comments) mv /usr/bin/link.exe /usr/bin/link_orig.exe # there is a cygwin tool that is in the way for the linker mkdir /cygdrive/c/cint # or wherever you want CINT to be, /cygdrive/c is cygwin's way of saying "C:" cd /cygdrive/c/cint tar xzf /cygdrive/c/somedir/cint-v5...tar.gz # or wherever you have put the CINT sources cd cint ./configure make -j3
That should do it.
Cheers, Axel.

Thank you, now it works, the compiling of cint…but I’m still not out of it…
I tried with vc++ 6 the testapp project in the demo folder and I managed to compile only manually placing the G__ci.h file with the other sources, after that the compiling went well.
When I tried to run the program the system told me that I had a problem with the missing dll “msvcr80.dll”, I’ve found information about that here:
forums.microsoft.com/MSDN/ShowPo … 8&SiteID=1
that’s a VS7 problem(I have on the same machine VS2005 and VS6).
Ok, this is my problem.
The reason I’m writing here is that I had to use as option to the ./configure --arch=msvc7
The IDe I have to use is vc6, is this correct to configure the system with the msvc7?
I think that for me the right option should be msvc6 (I tried also that, but is unknown to the config script); am I right?
I tried also to translate the testapp project toward VC2005 and it worked the same way.
Is VC6 still supported?
Thanks a lot for your support, I appreciate it very much.
Bye

[quote]Is VC6 still supported? [/quote]Not really. VC6 is quite old (and very buggy) and there are free alternative (including free version of the new Microsoft compiler). Do you really have to use VC6? (if yesm out of curiosity, why?)

Philippe

Well, because the project I’m working on is not a new project and, by now, it runs on VC6…and it is quite next to the 5 million of lines of code…the duty of translate it is huge and frightening everybody…:open_mouth:
The main reason I decided to try Cint is that for every new feature or modification we have to implement we need to put it in the code and I don’t like it a lot this way.
Anyway I’ll try with Vc2005.
In this case the problem of the .h file missing form the project dir is real
Any idea about the problem with the dll?
the solution in the msdn page didn’t worked for me…?
Thanks again…

I’ve found with the “dependency walker”, that is the libcint.dll that needs the “msvcr80.dll”, and the “MSVCP80.DLL”.
I’ve found also in the binary the reference to it.
There could be problems within the libcint.dll compiling process?
Thanks, bye

Hi, I managed to find something more, I hope of interest:
if you put the missing dll in the executable directory, the error message changes and now is that the runtime R6034.
From the explainations on the MS website they say that the application is not loading correctly the dll because it is missing the “manifest”.
So I changed the project option to put manifest outside from the executable and edited it by hand putting inside it the parts regarding the two dlls that can be found in the Microsoft.VC80.CRT.manifest in the “C:\Program Files\Microsoft Visual Studio 8\VC\redist\x86\Microsoft.VC80.CRT” directory that contains the redistributable dlls(I suppose), but with no results, the error remains.
My dubt is that the automatic translation of the project of this demo from vc6 to vc8 has not gone well.
Any idea?
More, in this page
msdn2.microsoft.com/en-us/library/ms235342(VS.80.aspx
MS says that in the dll it’s recommended to put embedded manifest inside the binary, I’ve opened the dll via hex editor and I didn’t find the manifest (I’ve looked for something like the embedded manifest Ifound in the executable).
I don’t know if this can be of any help to solve the problem…
Thanks in advance
Bye
P.S. reference:
msdn2.microsoft.com/en-us/library/ms235560(vs.80.aspx

Hi,

the manifest should be in src/; copy it to where the libcint.dll is and it should work. You’re welcome to fix the Makefile so it embeds the manifest file; please send me the new version once you have it.

Cheers, Axel.

Hi
Thanks for your help, but the problem remains, the error is the same.
One thing I did not told you before is that after the first msgbox with the error R6034, there is another one saying “the application failed to initialise properly (0xc0000142). click on Ok to terminate the application” . I was not able to find informations about this error code.

I 've looked also to the cint-5.16.19-win32.tar.gz packet that (I think) should contain a precompiled version of the cint environment.
In the root dir of this package there is the libcint.dll and libcint.dll.manifest, the cint.exe, cint.exe.manifest and the makecint exe and manifest.

Cint.exe himself has reference to the libcint.dll(I saw that from the hex dump).
Cint.exe form here works, I managed to interpret from there a simple hello world .c script; from that I guess that the loading of the dll works, since cint.exe is so tiny, it has to load the dll(I suppose).

So I tried to use that version, I erased all the files from the other package, then I copied all the files of this package and I reput the missing dll(s) msvcp80.dll and msvcr80.dll next to the executable, I recompiled the test.app demo for win32, the compiling went ok, but the error remains…

Now I’m asking myself if this is a general problem or it’s only on my machine.
I’m attaching the converted project that I’m trying to make it work, I deleted some huge file created during the building, I hope this could be useful at least to determine that this is my machine problem.
Thanks again
Matteo
P.S. Whan I’ll get out from this I guarantee you to write a summarizing document about hte installation issues and to give you the testapp project converted and working…:wink:
TestApp.zip (627 KB)

Hi,

OK, these manifest files are a worthy replacement of the dll hell - they are just as horrible to deal with. So the solution is to embed the manifest; there is no way out. You can run cd where-cint-is mt -nologo -manifest libcint.dll.manifest -outputresource:libcint.dll\;2 and it will work. I will put that into the Makefile and update the binary in the CINT web site.

Axel.

Sorry for the italian title…:wink:
no, it still not working.
To be sure not to having done some mess playing around with sources I deleted all the cint directory and started from scratch from the tar packet.
One thing I saw is that during the compile step is that there is a warning,

I don’t think this is the reason for my problems, but maybe it could be of interest for you:
cl -I…/inc -O2 -MD -nologo -wd4996 -EHs -GR -wd4181 -DG__CINTBODY -DG__REDIRE
CTIO -DG__SHAREDLIB -DG__UNIX -DG__WIN32 -DVISUAL_CPLUSPLUS -DG__NEWSTDHEADER -D
_CRT_SECURE_NO_DEPRECATE=1 -D_SECURE_SCL=0 -D_HAS_ITERATOR_DEBUGGING=0 -DG__HAVE
_CONFIG -DG__NOMAKEINFO -c v6_func.cxx
v6_func.cxx
v6_disp.cxx(2406) : warning C4172: returning address of local variable or temporary

Said that, the configure and make step went well.
Then I copied the manifest file in the c:\cint directory, i ran the below to embed the manifest:
c:\cint>mt -nologo -manifest libcint.dll.manifest -outputresource:libcint.dll;2

Then I converted the testapp project in VC2005 format, I put the G__ci.h between the testapp sources, I rebuilt it all, I put in the debug dir the two missing dll (msvcp80.dll and msvcr80.dll), and rerun the testapp.exe…the same error as before.

Did I followed the correct sequence?

One strange thing I saw is that in the dll the manifest is not embedded as it is in the testapp.exe, looking at the hex editor, there is not manifest string in it, (in the executable there is the xml file).
The ml command doesn`t gave me any message.

Will we come out from the “manifest hell” as Dante (INFERNO – XXXIV)?
“We bounded up, he first and I second,
Until, through a round opening, I saw
Some of the lovely things the heavens hold:
From there we came out to see once more the stars.”

:wink:
Thanks again
Matteo

Hi,

don’t copy any dlls around. Set the PATH to wherever libcint.dll is. Set CINTSYSDIR=C:\cint or wherever CINT is. Make sure that you build TestApp in release mode if you configured CINT without debug, and in debug mode if you passed --debug to CINT’s configure. If you want to switch CINT from debug to release (i.e. run ./configure again with / without --debug) you must run “make clean” before running make again.

Cheers, Axel.

Hi,
I installed the packet in the c:\cint directory, that is the one that contains cin.exe, libcint.dll etcetc.
The CINTSYSDIR variable is setted to “c:\cint”, the path is ok:
";c:\cint;c:\Program Files\Microsoft Visual Studio\VC98\Bin;", of course this is only the relevant part of it.
I ran the configure like this:
" /cygdrive/c/cint
$ configure --arch=msvc8
"
Then I ran the make with
"make -j3"
, I didn’t modified the testapp project unless to convert it to the VS2005 version (done automatically by VS).
In the original project there were only the debug configuration, I tried also the default release (making the ouput dir that didn’t existed and changin’ the options) mode but nothing changed.

The two dll I had to put manually in the output directory were the way I found to go over the “missing dll” error the executable gave me.

What I wish to do is to make the minimum necessary modification to make the “hello world” program (testapp) working, so I didn’t make modifications unless needed(as for the VC6 project conversion) or told to do so.

Thanks (a lot) for your help.
Bye, have a good WE.
Matteo

Hi,

as I said, please don’t copy the dlls. Please try to run your testapp with PATH and CINTSYSDIR set from a cmd.exe shell. Does that work? If it does: set PATH=C:\WINNT\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_6b128700;C:\cint (or whatever it is, you need to check both) in the project settings, debugging, environment variables. Merge environment should be set to true.

If you manage to run your app in cmd.exe then this really is an issue with debugging manipested files within MSVC.

Cheers, Axel.

thank you for your help, sorry for not having understood the problem, here’s the log of my attempts:

I deleted the 2 dlls from the output dir, I rebuild everything from scratch, I ran the application from cmd line, then I had the same error as before, excluding the one about “missing dll”, and this surprised me…:wink:

Practically there is always the R6034 error(and then the 0xc0000142).
Thanks,
Matteo

Hello,
I think the problem comes from the testapp example that’s not suited for some (to me) unknown reason to run well after conversion to VC2005.

I’ll wait for the CINT package to be renewed with a more modern example.
Thanks for your help
Best regards
Matteo

Hi,

As I said: your TestApp example works just fine for me with the current CINT CVS. I am planning to upload a new CINT binary distribution within the next week; you could try that.

Axel.