Problem with userMain example and some questions

Helo CINT users. Some time ago (moths ago!!!) I began my love-hate “affair” with CINT - I had to learn how to use cygwin, what a makefile is, how to use a bash shell… anyway, in the end, I was able to build CINT and integrate it into my app.

My setup: Windows XP, sing MS VC2008 Express for my man app. Cygwin for building CINT. Using CINT v 5.18.00

My app has a small text editor. You can use the editor to make a script, then press the “compile” button and the app sends the script file to the CINT lib so it compiles the script and then my app can call the methods of the script. That part works fine. For this task, I am using the static LibCint, a file that is around 10MB. I guess inside this file are included the interpreter and all its dependencies - am I right?

Now that I have the first step working OK, I want to give the scripts the ability to access methods of my main app. So I started trying to understand how Makecint works. I tried building the tests included in the demo/makecint folder. The “Complex” and “Fileread” tests both compile and run fine, but the “UserMain” does not. It builds fine, but then when run, Cint complains that f1() and f2() were not defined in this scope. I have found some posts showing this same behaviour for previous versions of CINT (5.16) but nothing about this happening with v5.18. Any help regarding this point would be greatly appreciated.

Also, when building the “Complex” and “userMain” examples, I found that some .lib files are created (complex.lib and usermain.lib). Are these files the customized cint versions? Now, why are these files around 4KB, when static libCint.lib is around 10MB? When using CINT with my dictionaries, do I have to link to both libCint.lib AND my customized lib (for example, complex.lib), or only my customized library? Can I have a customized library (a version of CINT with my dictionaries included) and link to them statically?

Thanks in advance for you help.

No one? :frowning:


the lib files generated my makecint are import libraries; you should also get DLL files which contain the dictionaries. And yes, you could take them and link all of CINT plus the dictionaries into a new library. You have to watch out for the order of intialization, though (CINT first, dictionaries later) - so in the end it might be simpler to open the dictionary DLL from your binary / library that in turn links against libCint.dll.

Cheers, Axel.

Hi Axel, thanks for your answer. I´ll think about this and perform some tests to see if i can get it working… but what about the userMain example? Any idea on why it is failing?

Still can´t get it to work :confused: … some help would be nice.


Unfortunately the linker trick use in the UserMain example is no longer supported by windows and/or the linking mechanism we currently have (i.e. the executable ends being link with 2 implementation of the same function, one active user provided one and one (intended to be) inactive provided in the library). On linux, the linker properly picks/uses the user provided one while on Windows it is stuck using the one in the library.

For the time being, we do not intend on lifting this restriction on Windows (because really this technique is too much of a hack).