Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

lcclnk problems

173 views
Skip to first unread message

Max

unread,
Mar 7, 2006, 12:59:01 PM3/7/06
to
Hello everyone! I must compile a c program recalling lcc inside a c#
program. Well, if I compile my c program in line command or in IDE I've
not errors, but inside the c# program I obtain the following mistake:

Installation problem
Please enter the path for the <include> header files (for example
c:\lcc\include)
0 errors, 15 warnings
Can't find the path of the lcc libraries.(lcccrt0s.obj missing)
Please enter it now: (for example c:\lcc\lib)
Directory does not exist
. I quit
e:\lcc\bin\lrc.exe -Ie:\dialersetup\nuovo_dialer -IE:\lcc\include
e:\dialersetup\nuovo_dialer\idialer.rc
e:\lcc\bin\lcc.exe -c -IE:\lcc\include -O
e:\dialersetup\nuovo_dialer\idialer.c
e:\lcc\bin\lcclnk.exe -s -subsystem windows -o
e:\dialersetup\nuovo_dialer\lcc\Dialer.exe idialer.res idialer.obj
rasapi32.lib SHELL32.lib WININET.lib
E:\lcc\bin\make.exe: Error code 1

The makefile is:
# Wedit Makefile for project idialer
LCCROOT=e:\lcc
SRCDIR=e:\dialersetup\nuovo_dialer
CFLAGS=-IE:\lcc\include -O
CC=$(LCCROOT)\bin\lcc.exe
LINKER=$(LCCROOT)\bin\lcclnk.exe
OBJS=\
idialer.res \
idialer.obj

LIBS=rasapi32.lib SHELL32.lib WININET.lib
#LIBS=e:\lcc\lib\rasapi32.lib e:\lcc\lib\SHELL32.lib
e:\lcc\lib\WININET.lib
EXE=Dialer.exe

$(EXE): $(OBJS) Makefile
$(LINKER) -s -subsystem windows -o $(SRCDIR)\lcc\Dialer.exe $(OBJS)
$(LIBS)

# Build idialer.res
IDIALER_RC=\
$(SRCDIR)\resource.h\
E:\lcc\include\windows.h\

idialer.res: $(IDIALER_RC) $(SRCDIR)\idialer.rc
$(LCCROOT)\bin\lrc.exe -I$(SRCDIR) -IE:\lcc\include
$(SRCDIR)\idialer.rc

# Build idialer.c
IDIALER_C=\
$(SRCDIR)\resource.h\
$(SRCDIR)\idialer.h\

idialer.obj: $(IDIALER_C) $(SRCDIR)\idialer.c
$(CC) -c $(CFLAGS) $(SRCDIR)\idialer.c
link:
$(LINKER) -s -subsystem windows -o $(SRCDIR)\lcc\Dialer.exe $(OBJS)
$(LIBS)

clean:
del $(OBJS) Dialer.exe

The problem are the libraries, exactly rasapi32.lib, shell32.lib and
wininet.lib. How can I solve this issue?
Is possible to links this library via line command?
Thanks for all!
MAX

jacob navia

unread,
Mar 7, 2006, 1:19:09 PM3/7/06
to
Max a écrit :

> Hello everyone! I must compile a c program recalling lcc inside a c#
> program. Well, if I compile my c program in line command or in IDE I've
> not errors, but inside the c# program I obtain the following mistake:
>
> Installation problem
> Please enter the path for the <include> header files (for example
> c:\lcc\include)
> 0 errors, 15 warnings
> Can't find the path of the lcc libraries.(lcccrt0s.obj missing)
> Please enter it now: (for example c:\lcc\lib)
> Directory does not exist
> . I quit

This means that the linker is unable to read the registry key
where it is stored the location of the path to the libraries.

The message is quite clear:


Please enter the path for the <include> header files (for example
c:\lcc\include)

Apparently you do not read that message so it didn't find the
libraries. Please re-install the software.

> e:\lcc\bin\lrc.exe -Ie:\dialersetup\nuovo_dialer -IE:\lcc\include
> e:\dialersetup\nuovo_dialer\idialer.rc
> e:\lcc\bin\lcc.exe -c -IE:\lcc\include -O
> e:\dialersetup\nuovo_dialer\idialer.c
> e:\lcc\bin\lcclnk.exe -s -subsystem windows -o
> e:\dialersetup\nuovo_dialer\lcc\Dialer.exe idialer.res idialer.obj
> rasapi32.lib SHELL32.lib WININET.lib
> E:\lcc\bin\make.exe: Error code 1
>

The linker exietd with an error.

> The makefile is:

[snip] irrelevant

> The problem are the libraries, exactly rasapi32.lib, shell32.lib and
> wininet.lib. How can I solve this issue?
> Is possible to links this library via line command?
> Thanks for all!
> MAX
>

Just reinstall lcc-win32. Apparently the linker isn't
able to read
HKEY_CURRENT_USER\Software\lcc\lcclnk

Max

unread,
Mar 8, 2006, 4:19:55 AM3/8/06
to
Thanks for your answer, but the registry is ok. The OS is Windows 2003
server and it could be a permission problem. Have you got any suggest?
Thanks a lot,
MAX

jacob navia

unread,
Mar 8, 2006, 4:36:47 AM3/8/06
to
Max a écrit :

If you do not have the permissions to read the registry
lcclnk will never work. You should discuss this with
the system administrator

jacob

Antoine Leca

unread,
Mar 8, 2006, 4:36:27 AM3/8/06
to
En news:1141809595.4...@v46g2000cwv.googlegroups.com,
Max va escriure:

> Thanks for your answer, but the registry is ok. The OS is Windows 2003
> server and it could be a permission problem. Have you got any suggest?

Give NTRegMon a try http://www.sysinternals.com/Utilities/Regmon.html.
It is usually quite clear when you watch the log where the problem is.

The most often case is that the infringing software opens some of the upper
keys with too much requested authorizations, generally
GENERIC_READ|GENERIC_WRITE when it is only about reading, and this is
rightly denied by Windows. Then with the log, the software writer is able to
quickly fix the bug.

OTOH, if lcc-win32 needs to update a HKLM key (for whathever reason), this
right should be granted at installation time (either creating a dedicated
group as does Nero, or allowing Everyone to write); of course it should be
restricted to the smallest possible part of the registry. Also as a sysadmin
I very much prefer to be advised about that kind of things.


Antoine

jacob navia

unread,
Mar 8, 2006, 6:45:23 AM3/8/06
to
Antoine Leca a écrit :

The code in the linker is:

if
(RegOpenKeyExA(HKEY_CURRENT_USER,"Software\\lcc\\Compiler",0,KEY_QUERY_VALUE,&hkeylink)
{
!= ERROR_SUCCESS) {
return(NULL);
}

And if I do not get KEY_QUERY_VALUE... what can I do?

jacob

Antoine Leca

unread,
Mar 8, 2006, 9:10:36 AM3/8/06
to
En news:440ec3c9$0$21279$8fcf...@news.wanadoo.fr,
jacob navia va escriure:

> The code in the linker is:
>
>
(RegOpenKeyExA(HKEY_CURRENT_USER,"Software\\lcc\\Compiler",0,KEY_QUERY_VALUE
,&hkeylink)

OK, sure KEY_QUERY_VALUE (1) is the very minimum right you could request.
Banning it, for *HKCU*, means, in effect, that the current user is banned to
use that application, by *explicit* request of the sysadmin.

So it is more likely that the key, or its path, is effectively absent. Since
it is 2003 server, which is the user which is at hand here? Some
impersonated one?


Or perhaps Jacob you should first create HKCU\Software\lcc and
HKCU\Software\lcc\Compiler, in case it does not exist before (or something
similar)? A lightweight installation, for shared users on the same computer?


Antoine

Carlos Smith

unread,
Mar 8, 2006, 10:46:21 AM3/8/06
to

"jacob navia" <ja...@jacob.remcomp.fr> wrote in message
news:440ea5a6$0$29183$8fcf...@news.wanadoo.fr...

>
> If you do not have the permissions to read the registry
> lcclnk will never work. You should discuss this with
> the system administrator
>
> jacob

the compiler could offer other possibilities.

if the keys are absent from the registry, lcc system
should try environment var LCCHOME to find
lcc home dir.

if this var does not exist, it could check for
a file named lccwin32.ini in the current
directory, or the user home directory if not there.

And a proper order to do this, would be:
1. check for the environ var first.
2. next, check for lccwin32.ini file
3. next check for the registry key.

an option could be added to lcc, that would display where
thing have been found.

Carlos

Max

unread,
Mar 8, 2006, 11:21:06 AM3/8/06
to
Well about this question I'm going to more specific. The register keys
have all the power use permissions like the other folds where is the
other
sources. I've used the regmon while I've done the debug (VS .NET) and
I've
obtained the following mistakes:
605404 58.61582565 csrss.exe:524 OpenKey
HKCU\Console\E:_lcc_bin_make.exe
NOT FOUND
605444 58.61962891 make.exe:3012 OpenKey
HKU\.Default\Software\lcc\Compiler NOT FOUND 605454 58.62901306
csrss.exe:524 OpenKey HKLM\Software\Microsoft\Windows
NT\CurrentVersion\AppCompatFlags\Custom\lcc.exe NOT FOUND 605455
58.62924957 make.exe:3012 OpenKey HKLM\Software\Microsoft\Windows
NT\CurrentVersion\Image File Execution Options\lcc.exe NOT FOUND 605478
58.63473129 lcc.exe:3004 OpenKey HKLM\SYSTEM\ControlSet001\Control\Error
Message Instrument NOT FOUND 605480 58.63493729 lcc.exe:3004 QueryValue
HKLM\Software\Microsoft\Windows
NT\CurrentVersion\Compatibility32\lcc NOT
FOUND 605514 58.84543991 csrss.exe:524 OpenKey
HKLM\Software\Microsoft\Windows
NT\CurrentVersion\AppCompatFlags\Custom\lcclnk.exe NOT FOUND 605515
58.84593964 make.exe:3012 OpenKey HKLM\Software\Microsoft\Windows
NT\CurrentVersion\Image File Execution Options\lcclnk.exe NOT FOUND
605516
58.84643936 lcclnk.exe:2992 OpenKey HKLM\Software\Microsoft\Windows
NT\CurrentVersion\Image File Execution Options\lcclnk.exe NOT FOUND
605538
58.85472870 lcclnk.exe:2992 OpenKey
HKLM\SYSTEM\ControlSet001\Control\Error Message Instrument NOT FOUND
605543 58.85502625 lcclnk.exe:2992 QueryValue
HKLM\Software\Microsoft\Windows NT\CurrentVersion\IME
Compatibility\lcclnk
NOT FOUND
605559 58.85574341 lcclnk.exe:2992 OpenKey HKLM\Software\Microsoft\Windows
NT\CurrentVersion\Terminal Server\Compatibility\Applications\lcclnk NOT
FOUND

Well, lcc has been reinstalled like administrator and the power user
has
the same permissions of the last one. Moreover lcc has only
HKCU\Software\lcc with right keys.
Thanks,
MAX

jacob navia

unread,
Mar 8, 2006, 12:05:02 PM3/8/06
to
Max a écrit :

This is not lcc or lcclnk nor ANY program written by me.
All keys are keys used by the shell cmd.exe (csrss) and NOT by me
so this are not errors of my program.

The ONLY key I use is

HKCU\Software\lcc\compiler

and that key does NOT appear in your listing.

jacob

Max

unread,
Mar 9, 2006, 5:03:31 AM3/9/06
to
Thanks for your suggests! I solved putting a lcc.ini file inside the
WINDOWS folder. This file is simple:

[lcclnk]
libpath=e:\lcc\lib

Thanks again,
MAX

Carlos Smith

unread,
Mar 9, 2006, 6:49:47 AM3/9/06
to
"Max" <vell...@gmail.com> wrote in message
news:1141898611....@i39g2000cwa.googlegroups.com...

Max,

I do not understand !

"My suggests" was more a request/suggestion adressed
to Jacob, to implement a *new* feature in lcc. That
new feature, would allow someone to install lcc
without writing to the registry. The .ini file
trick is available, for example, with the Borland
and the Digital Mars compilers (but not with lcc).

This means, and Jacob should confirm this, that
the current version of lcc, __did not__, read the
.ini ifle you have put in your windows folder.

So, your problem is solved, but this is not due
to that .ini file ! :-)

Carlos

0 new messages